-
Couldn't load subscription status.
- Fork 3
Feature/pxweb2 286 footer link location test ssb #229
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 286 footer link location test ssb #229
Conversation
Since we want to keep the project up-to-date, we need to update our dependencies. This updates the Nx packages with the 'nx migrate latest' command, and then with 'npm update'. The individual packages are not updated here.
Update the project with Nx migrate latest
Since we want to keep the project updated, we need to update the dependencies regularly. This updates the project dependencies with the Nx Migrate command. It does not update the non-nx dependencies
Since we want to keep the project updated, we need to update the chromatic cli package to the latest version. This will be tested when the pipeline runs for the PR.
Since we want to keep up with major versions of the packages we use, we need to update style-dictionary to v4. We were on v3. We have a pretty light setup, so the process was fairly minor. The main changes are that the lib where it is installed needed to use ES Modules, and that parts of the code now is async. One change to the output is that it now outputs capital letters for colors, so the variables.css file has many changes. They also change the auto-generated comment at the top of that file to not have a timestamp, so it should now not show it has changed everytime the app is run.
Since we do not want our build output to have unnecessary warnings, we need to fix what we can when we have them. This fixes some warnings about nesting in .scss where there are more styling afterwards. This will be changed in a future version of scss.
* Update react-i18next to v15 Since we want to keep the packages updated, we need to update them when new major versions are released. It seemed that they removed some older, deprecated namespace loading, which is the breaking change. But the changelog is not clear, and this is based on comments made in the issues in the changelog. I could not find any information about what, if any, breaking changes there are for users updating from v14 to v15. Tested locally, and seemed to work as expected. Will also test with the preview that is deployed in the pipeline. * Remove blankspace to force pipeline
…able (#216) * feat: Update and synchronize VB values with selected context This change addresses the issue of time periods sometimes sorted in the wrong order in the table in Pxweb2 (#284). If selectedVBValues was not in sync with variables context, a data fetch without selected variables and values (default selection) was made. In this call time periods was sorted descending. The fix assures that selectedVBValues are always in sync with variables context and also a call to fetch data is only made when variables context is updated. In this way a call to get data from the api always contains information about selected variables and values. The fix also adresses a problem we had when switching table. Before the selected values for table 1 was used when fetching data for table 2. This caused a http 400 error - Non-existent variable. We were trying to get values that existed in table 1 but not exists in table 2. The problem was that the useEffect was triggered by both tableId, selectedVBValues and variables. Now we have limited the useEffect to only be triggered when variables (that is in sync with selectedVBValues) or language is changed. * Formatted document * To force a new build * Removed commented out lines * Force build and publish to Chromatic * Update README.md --------- Co-authored-by: PerIngeVaaje <60141320+PerIngeVaaje@users.noreply.github.com> Co-authored-by: PerIngeVaaje <per.inge.vaaje@ssb.no>
Since we do not want unecessary warnings or errors in the console, we need to remove the ones that appear. This fixes two errors when loading the site, because the useEffect for showing the errors in the console was missing a check for an empty string.
Since we do not want unnecessary errors and warnings in the console, we need to fix the long standing issues of the warnings for missing keys for the variableBox component. There were two such warnings, and this should fix both(finally).
Since we no longer want the selection to reset to the default selection when you change language, we need to change so we retain the selections made. This removes that reset, and we now only make a call for the defaultSelection once.
…selection-on-lang-change Fix/pxweb2 283 remove resetting selection on lang change
…g-variableBox-unique-keys Fix missing unique keys in variableBox component
…-to-tableprovider Add check for empty errorMsg to tableprovider
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.
There is an old comment in app.tsx that should be removed. Otherwise looks good
apps/pxweb2/src/app/app.tsx
Outdated
| )} | ||
| </div> | ||
| <div className={styles.variableBoxContainer}> | ||
| {/* TODO: I think the warning in the console about unique IDs is the variable.id below*/} |
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.
This comment should be removed. The added "key" below fixes this warning.
Deploying pxweb2 with
|
| Latest commit: |
c79bd4b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://547d1e02.pxweb2.pages.dev |
| Branch Preview URL: | https://feature-pxweb2-286-footer-li-qond.pxweb2.pages.dev |
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.
LGTM
Updated link in footer to documentation. Merged new code from main.