-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: vis is rendered with an invalid config (#172)
**Issue** - [ ] All acceptance criteria from the issue are met - [x] Tested in latest Chrome/Firefox **UI/UX/Vis** - [ ] Requires UI/UX/Vis review - [ ] Reviewer(s) are notified (_tag assignees_) - [ ] Review has occurred (_link to notes_) - [ ] Feedback is included in this PR - [ ] Reviewer(s) approve of concept and design **Code** - [x] Branch is up-to-date with the branch to be merged with, i.e., develop - [x] Code is cleaned up and formatted - [ ] Unit tests are written (frontend/backend if applicable) - [ ] Integration tests are written (if applicable) **PR** - [x] Descriptive title for this pull request is provided (will be used for release notes later) - [x] Reviewer and assignees are defined - [x] Add type label (e.g., *bug*, *feature*) to this pull request - [x] Add release label (e.g., `release: minor`) to this PR following [semver](https://semver.org/) - [x] The PR is connected to the corresponding issue (via `Closes #...`) - [x] [Summary of changes](#summary-of-changes) is written We have the issue that we are providing vis an externalConfig that does not include all possible defaults ```typescript const config = { type: 'Heatmap plot', catColumnsSelected: [ { id: 'Column 1', name: 'Column 1' }, { id: 'Column 2', name: 'Column 2' }, ], }; ``` This is the different values the vis was being rendered with (causes errors) when inputing the above config ``` MainApp.tsx: Parent {type: 'Heatmap plot', catColumnsSelected: Array(2)} MainApp.tsx:40 Parent null MainApp.tsx:40 Parent {type: 'Heatmap plot', catColumnsSelected: Array(2), color: {…}} MainApp.tsx:40 Parent {type: 'Heatmap plot', color: {…}, catColumnsSelected: Array(2), numColorScaleType: 'Sequential', xSortedBy: 'CAT_ASC', …} ``` And this with this fix ``` MainApp.tsx: Parent {type: 'Heatmap plot', catColumnsSelected: Array(2)} MainApp.tsx:40 Parent {type: 'Heatmap plot', color: {…}, catColumnsSelected: Array(2), numColorScaleType: 'Sequential', xSortedBy: 'CAT_ASC', …} ``` We could improve the logic and readabilty of this section of code when we switch completely to mantine 7 to use https://mantine.dev/hooks/use-uncontrolled/ before ![gr-original](https://github.com/datavisyn/visyn_core/assets/51322092/ea036357-6411-4592-aaf2-a1b469ce2d3e) after ![gr-new](https://github.com/datavisyn/visyn_core/assets/51322092/a9e2aac0-b55a-4395-a25b-7eb0e908fdd0) - Thanks for creating this pull request 🤗 (cherry picked from commit 30da502)
- Loading branch information
1 parent
0860f3f
commit 2670dbe
Showing
3 changed files
with
76 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters