Added Succesful Report Toast#567
Merged
Merged
Conversation
Created a dedicated typescript for toasts, added a toast that appears following a successful report that negates the need for a client redirect.
Added NewLine at EOF in toast.js and reports.js, removed redundant function declaration in web.js
mrjvs
requested changes
Jul 7, 2026
mrjvs
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR!
Found a couple bugs in testing, but nothing that’s hard to fix :D
As suggested, used API=true in the url to indicate usage of the webui rather than console version triggering the toast logic rather than a redirect, whilst still alowing redirects to be used for the console versions. Also removed redundant toast logic from login.js as suggested.
mrjvs
requested changes
Jul 9, 2026
Used autolint (thanks for the tip!)
mrjvs
approved these changes
Jul 10, 2026
Contributor
|
Thank you for your contribution! We're doing a release tomorrow, so your changes are gonna be in prod nice and quick. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #454
Changes:
Summary: Adds a toast notifcation confirming successful post reports, replacing the full-page redirect on report submission.
Problem: Previously, submitting a report via the report modal triggered a native HTML form POST which caused the entire page to reload, giving no feedback to the user that their report was successful.
Modifcations:
New file: apps/juxtaposition-ui/webfiles/web/js/toast.ts
Extracted the Toast, initToast, and startHideToast functions out of web.js into their own module so they can be imported and reused by other client-side modules (previously they were bare, non-exported function declarations only usable within web.js itself).
Modified web.js to remove the local Toast and initToast function declarations as I moved them to toast.ts.
Modified reports.js to invlude the moved toast logic and trigger it when a report is made.
Modified apps/juxtaposition-ui/src/services/juxt-web/routes/console/posts.tsx to handle reports without triggering a refresh of the page.