-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat: add conditional routing to single highlight dialog close action #1473
feat: add conditional routing to single highlight dialog close action #1473
Conversation
✅ Deploy Preview for oss-insights ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for design-insights ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍕
🎉 This PR is included in version 1.59.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [1.59.0](v1.58.0...v1.59.0) (2023-08-08) ### 🧑💻 Code Refactoring * replace supabase/ui in design system typography components ([#1438](#1438)) ([38cfb30](38cfb30)) ### 🍕 Features * add a user notifications page ([#1478](#1478)) ([022dc69](022dc69)) * add conditional routing to single highlight dialog close action ([#1473](#1473)) ([1341cba](1341cba)) * add github link to profile ([#1459](#1459)) ([d42bc6d](d42bc6d)) * add support for highlight.new ([#1487](#1487)) ([3daa5c0](3daa5c0)) * improved the UX on the feeds page and scroll behaviour ([#1506](#1506)) ([31c1593](31c1593)) * onboarding auto fetch timezone ([#1488](#1488)) ([ae5cdd7](ae5cdd7)) ### 🐛 Bug Fixes * Feed page responsiveness ([#1490](#1490)) ([67662b2](67662b2)) * feeds page typography and styles improvements ([#1467](#1467)) ([a3b289e](a3b289e)) * on page reload Insights page redirecting to Dashboard ([#1517](#1517)) ([397c36e](397c36e)) * update environment variable for Sentry ([#1521](#1521)) ([56ac14b](56ac14b)) * update release workflow to use GitHub app for semantic versioning ([#1484](#1484)) ([3f1ce84](3f1ce84)) * update user interest logo error for machine learning ([#1474](#1474)) ([a286eda](a286eda)) * uses session to update user info for notifications check ([#1486](#1486)) ([60d787e](60d787e))
Description
This Pull Request introduces conditional routing to the Single Highlight Dialog Close action, bringing a fix to the Initial set-up; when a user clicks on a single highlight from a user profile, a dialog opens on the
/feed/[id]
route. However, when the user clicks on the close button of the dialog, it routes back to the/feed
page, displaying the general highlights.Changes Made
referer
to the single highlight SSR returned props, this was destructed from the Request headersreq.headers
intended to be used in a check to see what page/route (in is returnedurl
value) the single highlight was clicked from. Seereferer
value types below.../feed/[id]
route, hence setting thereferer
to a fixed value.referer
, with each button handling routing in specific manners for different cases.Implementation
Case - When
referer
detects request is made from a page that is NOT the/feed
page.Case - When
referer
detects request is made from the/feed
page.Dialog
component's rootonOpenChange
prop to inject the logic into the dialogues overlay "background-click-to-close" functionalityImplementation
🍕
What type of PR is this? (check all applicable)
Related Tickets & Documents
Fixes #1414
Mobile & Desktop Screenshots/Recordings
screencast-localhost_3000-2023.08.03-03_32_21.webm
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
NA
[optional] What gif best describes this PR or how it makes you feel?