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

Add react router to persist internal state #53

Merged
merged 15 commits into from
May 7, 2024

Conversation

paolareategui
Copy link
Collaborator

Progress made:

  • Using routes to navigate through the main tabs. A page refresh returns to the same tab.
  • Creating dynamic routes to navigate through existing forms. The URL changes accordingly when a form tab is clicked.

Issues (work in progress):

  • Unexpected behaviour happens when moving the forms. The tab moves but the page doesn't change. And the tabIndex will go past 0 (-1, -2 ...).
  • After deleting a form, the URL remains unchanged (it should navigate to the next remaining form).
  • Essentially, the tabs "need" to be activated (clicked) every time to work correctly.

paolareategui and others added 15 commits April 15, 2024 13:21
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
…notebook-editor

Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Steve Cassidy <steve.cassidy@mq.edu.au>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
…outes> outside map() method. Set moveButtonDisabled to true

Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
Signed-off-by: Paola <paolareategui@hotmail.com>
@paolareategui
Copy link
Collaborator Author

Completed:

  1. Static routes are implemented for the main tabs.
  2. Dynamics routes are created to navigate through the forms.
  3. After a refresh the user will stay on the same tab and route.
  4. Creating, moving and deleting forms will navigate to the correct view and route.

Issue:

I get this warning when I navigate to the "Export" tab for some reason. Even though I didn't touch this component.

"Selector unknown returned the root state when called. This can lead to unnecessary rerenders.
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever anything in state changes."

@stevecassidy stevecassidy merged commit ca8f9e0 into main May 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants