-
Notifications
You must be signed in to change notification settings - Fork 30
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
Sub form component needs to be represented in the URL #2153
Comments
The current URL schema looks roughly like this:
Where Proposed new schema:
This approach would make it very clear where a user came from, and which context they are in related to the parent form. Alternatively we could do something like this:
Which would play better with "future requirements" related to sub-apps and external round trips, but at the same time that's decidedly out of scope for this initial implementation. Thoughts? Debate? (ping @HauklandJ @olemartinorg @bjosttveit ... other interested parties?) |
@danielskovli As the support for sub forms inherently means support for multiple data elements of the same data (model) type, we'd also have to put some kind of identifier for which data element you're looking at in the URL. Only putting [subform-page] (or [subform-component]/[subform-page]) in the URL is not specific enough - you also need the [which exact subform] part. Me and @HauklandJ just discussed a potential solution - implementing a sub-system in app-frontend for "letting certain components hijack the full form page rendering". So, with examples:
I hope such an abstraction and sub-system would make sense and scale with future functionality. We've talked before about exposing certain app-frontend state in the URL, such as which row you're editing in a repeating group, or which tab you have open in the Tabs component (so that you can maintain that state in navigation history and return to the same place when going backwards), but we haven't landed on anything there, so both repeating groups and tabs keep their state in the components themselves and loses it when you navigate away from them. |
This, Ole Martin beat me to to it 😅 |
@olemartinorg The need to refer to a specific |
Updated issue to include subform page in url |
We should keep in mind the future feature request to support multiple layout-sets per task |
This has been implemented in |
Part of the Underskjema Epic.
When having navigated to a sub form, we need a way to persist state if the browser is refreshed and a logical navigation when the browsers back button is pressed.
This may be solved by giving the sub forms a relative path.
Today the URL looks like this:
[app]/#/instance/[party-id]/[instance-id]/[task]/[page]
General extension of url:
[app]/#/instance/[party-id]/[instance-id]/[task]/[page]/[componentId]/[data-element-id]/[component-page]
Sub form specific:
[app]/#/instance/[party]/[instance-id]/[task]/[page]/[subform-component-id]/[subform-data-element-id]/[subform-page]
The sub form component must be able to add, parse and identify multiple elements (componentId and id) from the URL.
The text was updated successfully, but these errors were encountered: