Altinn / Altinn/app-frontend-react
Changing url to new instance, does not trigger refetch of the instance.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description of the bug
When an instance is open in the browser (eg. `http://local.altinn.cloud/ttd/frontend-test#/instance/501337/`**`08083344-4948-4c31-9d84-153bed7dba7f`**`/Task_1/formLayout`) , and then want to switch to another instance (eg **`976f670b-80bf-417f-8eb9-89b7b1c46f94`**), frontend will not replace its internal state properly and show a mix of the two instances
### Steps To Reproduce
1. Ensure that you have two links to instances
* `http://local.altinn.cloud/ttd/frontend-test#/instance/501337/`**`08083344-4948-4c31-9d84-153bed7dba7f`**`/Task_1/formLayout`
* `http://local.altinn.cloud/ttd/frontend-test#/instance/501337/`**`976f670b-80bf-417f-8eb9-89b7b1c46f94`**`/Task_1/formLayout`
2. Make a change to the data in one of the instances
3. Paste the link to the second instance in the url bar
4. See that the data in the first instance is still shown.
### Additional Information
This bug will also be triggered if someone puts a link to another instance of the same app inside an instance. Not sure when or why someone might do that, but it should work.
Contributor guide
Research direction
Start by reproducing the issue using the two instance URLs in the reproduction steps, then trace how URL navigation loads and replaces instance state. Done means opening the second instance shows its data without state from the first, including when navigating through a link to another instance of the same app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100