feat: add flash messages for passkey registration and deletion feedback #584
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
PasskeyController
to include flash messages for passkey registration and deletion, providing users with contextual feedback about their actions. [1] [2]Frontend Enhancements
#flash-message
div inuserAccount.scala.html
to pass flash messages from the backend to the frontend via data attributes.frontend/janus.js
to read flash messages from the DOM and display them as Materialize toasts using the newdisplayFlashMessages
function. [1] [2]JavaScript Improvements
displayFlashMessages
function infrontend/passkeys.js
to handle the display of success, info, and error messages using Materialize toasts.frontend/passkeys.js
, improving code readability and maintainability.User Experience Improvements
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?