-
Notifications
You must be signed in to change notification settings - Fork 27
Prefill Molecule Component from URL #722
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
base: main
Are you sure you want to change the base?
Conversation
@mohyware is attempting to deploy a commit to the Main Team on Vercel. A member of the Team first needs to authorize it. |
This is excellent. How is the URL prefilled? I assume you wrote it manually. What would be even more user friendly is that the URL updates automatically as you click on the buttons on the interface. Is that something possible? |
Yeah, I can do that. I was thinking of adding a share button that generates a link based on the currently filled components, so the URL remains clean if the user just wants to share the site without their data. But I can do this as you prefer. |
Both work; choose what you think is best |
30ee58d
to
a66c9d1
Compare
I have implemented the version with the button. However, the second approach can be achieved by commenting this line as shown in this video. Untitled.mp4 |
@minouHub @dcmvdbekerom any idea on whether
I'm in favor of the 1st one (URL parameters are visible): as a user it gives me confidence that the changes in the interface have indeed been reflected in the URL |
I think we should take what Youtube is doing. ExampleYou want to share the highlights of yesterday's rugby match (France-Ecosse): Long story short: 2. only when pressing the "Share" button |
In Airtable; another well-supported app used by millions of users; whenever you adjust Filters/Groups in an interface; the URL changes, and it makes it extremelly easy to share the current page with the current setting by simply copy-pasting the URL (no need to even have a Share button). I personnally this workflow a lot. |
823e801
to
a66c9d1
Compare
…chronization with the form state.
Removed the button, keeping only the first approach. This PR is now ready for review. |
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.
approved for me !
@mohyware @erwanp |
This is a draft PR as I am still working on it.
This implements the ability to prefill the Molecule component from a URL, as @erwanp suggested, so researchers can share a spectrum with others through a direct link.
I will also add a Share button that generates a URL with the current filled data to make sharing easier.
2025-03-13.11-59-21.mp4
Resolves: #203