Skip to content

[feat] Enhance session notification #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 4, 2025
Merged

[feat] Enhance session notification #116

merged 8 commits into from
Apr 4, 2025

Conversation

Aloento
Copy link
Member

@Aloento Aloento commented Apr 2, 2025

Summary of the Pull Request:

This PR includes a series of enhancements and refactors aimed at improving user experience, code maintainability, and performance across the History and Authentication components.

Key Changes:

  1. History Component Cleanup:

    • Removed unused loading skeleton to streamline the UI.
    • Eliminated unnecessary useRef and useInViewport hooks to improve performance and reduce complexity.
  2. Authentication Code Refactor:

    • Removed deprecated and unused OIDC-related imports and authentication logic to simplify the codebase.
    • Refactored error handling logic using useEffect for better reactivity and error awareness.
    • Integrated Fluent UI components for a more cohesive visual design.
  3. User Session Management Enhancements:

    • Implemented toast notifications to alert users on login expiration, improving session visibility.
    • Improved feedback for authentication errors, ensuring a smoother user experience.
  4. UX Adjustment:

    • Reordered the logout menu item to the end of the profile menu to align with common UX patterns.

fixes #112, #102

Aloento added 4 commits April 2, 2025 13:56
Eliminates unnecessary skeleton loading indicators to streamline the code.

Improves performance by removing `useRef` and `useInViewport` hooks.

Reduces complexity and enhances maintainability of the History component.
Cleans up the codebase by removing obsolete user authentication methods and imports related to OIDC.

This simplifies the code structure and reduces potential confusion for future development.
Adds toast notifications for login expiration alerts
Refactors authentication error handling to use `useEffect`
Integrates Fluent UI components for improved UI consistency

Relates to user experience improvements
Adjusts the position of the logout menu item
to enhance user experience by placing it at the end
of the profile menu.

No functionality changes were made.
@sgmv
Copy link
Contributor

sgmv commented Apr 3, 2025

Please check the description for #102 .
User push the button Submit and get 401 and nothing is happened. However, you should redirect to the main page right after the user push the button Submit.

But we can improve it.
Then the user push the button Submit, you should display an element right in the center of the window. And show your message again.

With 3 different points:

  1. User can close the popup and copy-paste from the form the information.
  2. If the user close the popup and push the button submit again - please show the message again.
  3. Replace in the popup button Dismiss to the return to the main page (or back to home, something like this).
image

@Aloento
Copy link
Member Author

Aloento commented Apr 3, 2025

I designed the new error message to pop up in the bottom right corner. Can't use centre of the window popups, they conflict with existing modal popups (modify event). stakeholder already approved the design and behavior.
image

Aloento added 2 commits April 3, 2025 14:48
Replaces direct signoutRedirect calls with signoutSilent for a smoother user experience.

Ensures that the logout process does not disrupt the user flow.

Improves handling of user sessions in the authentication process.
Replaces direct usage of user access token with a utility function for token retrieval.

Enhances separation of concerns and improves code maintainability in the event handling components.
@Aloento Aloento added the gate Merge PR label Apr 4, 2025
@otc-zuul otc-zuul bot merged commit aa815cf into main Apr 4, 2025
7 checks passed
@otc-zuul otc-zuul bot deleted the feat branch April 4, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Merge PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort the user menu
2 participants