Skip to content
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

Feature Request: Make the DrawerProvider handle its own state using the URL and the RouteRouter #174

Open
cccs-nr opened this issue Jan 18, 2024 · 0 comments
Assignees
Labels
assess We still haven't decided if this will be worked on or not enhancement New feature or request

Comments

@cccs-nr
Copy link

cccs-nr commented Jan 18, 2024

Is your feature request related to a problem? Please describe.
The distinguishing feature of Assemblyline's frontend is the ability to open another page in the Drawer as side-by-side viewer. This is a core feature mostly present in AL where others apps are a SPW or implement a tab system (clicking on a link opens it in a tab to keep the context of the previous page).

However, that drawer state isn't managed by the drawer, but by every single pages themselves. that is a huge problem because every page has to handle the state of the other page opened in the drawer and their actions. This causes a huge amount of coupling between components where they should only manage their own state and not another page.

Also, there are some states with the drawer that cannot be recreated using only a URL. Meaning that if a user wants to share their page to another user, that other user won't be able to open that page exactly since some states might cause the page controllers to become disconnected and they won't handle the state correctly.

Describe the solution you'd like
We already use the hash part of the URL to handle the state of the drawer by storing some variables such as the SHA256. But, I propose we go all the way and fully use the hash to control the state of the drawer. The drawer will be provided the same page route handler and will use the hash to show the correct page. By using the URL as a single source of truth or to store global variables (data store), every single state in the frontend will be able to be recreated using the URL. That means that users will be able to recreate any page using only the URL. This will help decouple some of the logic the pages use to handle the global states.

@cccs-nr cccs-nr added enhancement New feature or request assess We still haven't decided if this will be worked on or not labels Jan 18, 2024
@cccs-nr cccs-nr self-assigned this Jan 18, 2024
@cccs-nr cccs-nr changed the title Feature Request: Make the DrawerProvider handle its own state using the URL values and the RouteRouter Feature Request: Make the DrawerProvider handle its own state using the URL and the RouteRouter Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assess We still haven't decided if this will be worked on or not enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant