-
Notifications
You must be signed in to change notification settings - Fork 3
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/pxweb2 198 add ability to change codelist on variable #336
Feature/pxweb2 198 add ability to change codelist on variable #336
Conversation
This adds an API call that returns the new values for a chosen codelist in the VariableBox, and plugs that into the existing code for showing new codelists. This means the VariableBox and state now can handle chaning codelists and rendering them. However, the sync to the table is not yet finished. It now stops showing any new values chosen, and shows very little. It also resets the chosen codelists when changing a language, since we cannot reuse values for codelists between languages.
The task has been divided, and the part of getting and showing the defaultSelection for the CodeLists have been moved to a different task. This cleans up the branch and commits the current WIP changes for the new scope of the task.
…elist-on-variable
This makes a new API-call and changes the values of a variable with a selected codelist, when the user makes a new codelist selection. The functinality for resetting to the default selection when switching languages have not been implemented yet. This code is missing the fix for the updated API, to get the correct metadata. So it will still show the incorrect data on first load.
It's best to wait with this one so we can get the API fix merged into it. Will make it much easier to test, when the values are actually correct from the beginning. |
…elist-on-variable
Deploying pxweb2 with Cloudflare Pages
|
…elist-on-variable
Since the variant of the Select component used in the variablebox is it's own component, we do not need the same internal state management as the default Select component. It will only get in the way of how we want to update that componentent from the VaraiblesProvider state in the Selection component/page.
Since we need to be able to handle whenever the api call fails when changing codelists, we need to add the logic for this. This handles that logic, but does not handle showing anything to the user when it happens. That is something we need to speak with the designer about how it should be handled.
…elist-on-variable
…elist-on-variable
…elist-on-variable
There was a problem with a race condition when rendering kodelist values. This adds a check that fixes this, though we may want to look closer at this later. Now atleast the app does not crash.
Since Virtuoso "heavily" complains if we return null or similar, this modifies the previous fix to return an empty div. This div is not rendered, but instead removed by virtuoso before hand.
…elist-on-variable
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
…elist-on-variable
Since we need to indicate to the users when we are waiting on the api response, when they change a codelist. We need some basic functionality for this while the designer looks into how we want this to function in the end. This is a temporary fix, which is similar to the table fading.
…elist-on-variable
This adds resetting some states in the variableboxes when you change codelists in the variable. This fixes some issues with the virtuoso list and search remembering states into a new codelist.
…elist-on-variable
Quality Gate passedIssues Measures |
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.
OK!
This adds an API call that returns the new values for a chosen codelist
in the VariableBox, and plugs that into the existing code for showing
new codelists. This means the VariableBox and state now can handle
changing codelists and rendering them.
I also formatted some files.