Skip to content

Cais gateway UI changes - #2

Open
brendanator wants to merge 7 commits into
base-sha/d494bc8c6ad4c6f1008838b2a8d91e044ab53d63from
head-sha/7f4aafd9e21f54c569d1f72ac806e463f0f09e55/2024-03-14T16-41-09
Open

Cais gateway UI changes#2
brendanator wants to merge 7 commits into
base-sha/d494bc8c6ad4c6f1008838b2a8d91e044ab53d63from
head-sha/7f4aafd9e21f54c569d1f72ac806e463f0f09e55/2024-03-14T16-41-09

Conversation

@brendanator

Copy link
Copy Markdown

Revamped the UI and fixed several UI bugs. Only tested on desktop.

@brendanator

Copy link
Copy Markdown
Author

This pull request was cloned from https://github.com/obscuronet/go-obscuro/pull/1614

Note: the URL is not a link to avoid triggering a notification on the original pull request.

@brendanator brendanator left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery logo Sourcery Review:

Hey @brendanator - I've reviewed your changes and they look great!

General suggestions:

  • Consider implementing transitions or animations for smoother visibility changes between UI elements to enhance the user experience.
  • Ensure accessibility is taken into account, especially when toggling visibility of elements, to support a wider range of users.
  • Abstract repeated patterns of behavior, such as toggling element visibility, into reusable functions to improve code maintainability.
  • Verify the UI's responsiveness and compatibility across different browsers to ensure a consistent experience for all users.
Here's what I looked at during the review
  • 🟡 General issues: 4 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.


/* basic style for the accounts table*/
table {
display: none;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery logo suggestion (code_refinement): Setting the table display to none by default and later changing it dynamically via JavaScript suggests a progressive enhancement approach. This ensures that the table is only displayed when it's populated and ready, improving the user experience by not showing an empty or loading state. However, ensure that this behavior is clearly communicated to the user to avoid confusion.

Comment on lines +300 to +301
informationArea.style.display = "none"
informationArea2.style.display = "block"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery logo suggestion (code_refinement): The toggling of visibility between informationArea and informationArea2 based on user actions is a good practice for interactive applications. It helps in keeping the UI clean and focused on the current task. However, consider adding some form of transition or animation to make the change less abrupt and improve the overall user experience.

Comment on lines +369 to +370
beginBox.style.visibility = "hidden";
spinner.style.visibility = "visible";

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery logo suggestion (code_refinement): The use of visibility toggling between the beginBox and spinner elements to indicate loading or processing states is effective. However, ensure that accessibility considerations are taken into account. Screen readers and other assistive technologies might still perceive the hidden content as accessible, potentially confusing users. Consider using aria-hidden attributes or off-screen positioning for better accessibility.

Comment on lines +396 to +397
beginBox.style.visibility = "hidden";
spinner.style.visibility = "visible";

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery logo suggestion (code_refinement): The repetition of the pattern for toggling visibility between beginBox and spinner in different event listeners suggests that this could be abstracted into a function. This would reduce code duplication and improve maintainability. Consider creating a function like toggleVisibility(elementToShow, elementToHide) to encapsulate this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants