8000 feat: add flash messages for passkey registration and deletion feedback by tjsilver · Pull Request #584 · guardian/janus-app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add flash messages for passkey registration and deletion feedback #584

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tjsilver
Copy link
Contributor

What is the purpose of this change?

This pull request introduces enhancements to the passkey management system, focusing on improving user feedback through flash messages, better user interaction in the frontend, and adding comprehensive documentation for JavaScript functions. The most significant changes include displaying success, info, and error messages as toasts, updating the backend t 8000 o support flash messages, and improving the user experience for passkey operations.

Backend Enhancements

  • Updated PasskeyController to include flash messages for passkey registration and deletion, providing users with contextual feedback about their actions. [1] [2]

Frontend Enhancements

  • Added a hidden #flash-message div in userAccount.scala.html to pass flash messages from the backend to the frontend via data attributes.
  • Modified frontend/janus.js to read flash messages from the DOM and display them as Materialize toasts using the new displayFlashMessages function. [1] [2]

JavaScript Improvements

  • Introduced the displayFlashMessages function in frontend/passkeys.js to handle the display of success, info, and error messages using Materialize toasts.
  • Added detailed JSDoc comments to all major functions in frontend/passkeys.js, improving code readability and maintainability.

User Experience Improvements

  • Enhanced the user flow by displaying toasts for actions like passkey deletion cancellation and passkey registration cancellation. [1] [2]

What is the value of this change and how do we measure success?

The UX should be improved with the additional messaging, as well as the DX with the consistent addition of JSDoc comments.

Any additional notes?

  • Cancellation of registration still results in the display of an error message as well as the message that the operation was cancelled.
  • We still have the issue on Firefox of an error being displayed when a passkey has already been registered.

Copy link
Member
@kelvin-chappell kelvin-chappell left a comment

Choose a reason for hiding this comment

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

Good idea! 👍

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
0