fix: camera state when hidden page is rendered#1819
Merged
w1nklr merged 13 commits intoequinor:masterfrom Dec 8, 2023
Merged
Conversation
The story has a flag controlling the rendering of hidden tabs. Add triggerHome control to mapLayer and SubsurfaceViewer stories. Minor props re-ordering to group camera controls
React rule is not to read/modify ref during rendering. It proved true: computations where randomly wrong until the size of the deck was extracted in the effect.
This avoids sequences of useEffect calling setState...
Collaborator
This is just refactoring and creating an example to demonstrate the bug? |
nilscb
approved these changes
Dec 7, 2023
Collaborator
Author
Nope, it fixes also the bug (ie. the example was showing the bug before I fixed it in the same PR) |
Collaborator
Author
|
Warning message fixed. |
Collaborator
Author
Collaborator
|
🎉 This issue has been resolved in version subsurface-viewer@0.9.2 🎉 The release is available on GitHub release |
hkfb
approved these changes
Dec 8, 2023
hkfb
pushed a commit
that referenced
this pull request
Mar 12, 2024
## [0.5.8](https://github.com/equinor/webviz-subsurface-components/compare/wsc-common@0.5.7...wsc-common@0.5.8) (2024-03-12) ### Bug Fixes * bump ajv from 7.2.1 to 8.12.0 in /typescript ([#1947](#1947)) ([af95651](af95651)), closes [#2190](#2190) [#2191](#2191) [#2158](#2158) [#2194](#2194) [#2192](#2192) [ajv-validator/ajv#1840](ajv-validator/ajv#1840) [#1840](#1840) [#1901](#1901) [#1922](#1922) [#1862](#1862) [#1861](#1861) [#1815](#1815) [ajv-validator/ajv-keywords#220](ajv-validator/ajv-keywords#220) [#1819](#1819) [#1725](#1725) [#1757](#1757) [#2195](#2195) [#1971](#1971) [#2194](#2194) [#2184](#2184) [#2193](#2193) [#2183](#2183) [#2158](#2158) [#2160](#2160) [#1935](#1935) [#2192](#2192) [#1949](#1949) [#2191](#2191)
hkfb
pushed a commit
that referenced
this pull request
Mar 12, 2024
## [1.2.8](https://github.com/equinor/webviz-subsurface-components/compare/well-completions-plot@1.2.7...well-completions-plot@1.2.8) (2024-03-12) ### Bug Fixes * bump ajv from 7.2.1 to 8.12.0 in /typescript ([#1947](#1947)) ([af95651](af95651)), closes [#2190](#2190) [#2191](#2191) [#2158](#2158) [#2194](#2194) [#2192](#2192) [ajv-validator/ajv#1840](ajv-validator/ajv#1840) [#1840](#1840) [#1901](#1901) [#1922](#1922) [#1862](#1862) [#1861](#1861) [#1815](#1815) [ajv-validator/ajv-keywords#220](ajv-validator/ajv-keywords#220) [#1819](#1819) [#1725](#1725) [#1757](#1757) [#2195](#2195) [#1971](#1971) [#2194](#2194) [#2184](#2184) [#2193](#2193) [#2183](#2183) [#2158](#2158) [#2160](#2160) [#1935](#1935) [#2192](#2192) [#1949](#1949) [#2191](#2191)
hkfb
pushed a commit
that referenced
this pull request
Mar 12, 2024
## [0.20.1](https://github.com/equinor/webviz-subsurface-components/compare/subsurface-viewer@0.20.0...subsurface-viewer@0.20.1) (2024-03-12) ### Bug Fixes * bump ajv from 7.2.1 to 8.12.0 in /typescript ([#1947](#1947)) ([af95651](af95651)), closes [#2190](#2190) [#2191](#2191) [#2158](#2158) [#2194](#2194) [#2192](#2192) [ajv-validator/ajv#1840](ajv-validator/ajv#1840) [#1840](#1840) [#1901](#1901) [#1922](#1922) [#1862](#1862) [#1861](#1861) [#1815](#1815) [ajv-validator/ajv-keywords#220](ajv-validator/ajv-keywords#220) [#1819](#1819) [#1725](#1725) [#1757](#1757) [#2195](#2195) [#1971](#1971) [#2194](#2194) [#2184](#2184) [#2193](#2193) [#2183](#2183) [#2158](#2158) [#2160](#2160) [#1935](#1935) [#2192](#2192) [#1949](#1949) [#2191](#2191)
hkfb
pushed a commit
that referenced
this pull request
Mar 12, 2024
## [1.1.8](https://github.com/equinor/webviz-subsurface-components/compare/group-tree-plot@1.1.7...group-tree-plot@1.1.8) (2024-03-12) ### Bug Fixes * bump ajv from 7.2.1 to 8.12.0 in /typescript ([#1947](#1947)) ([af95651](af95651)), closes [#2190](#2190) [#2191](#2191) [#2158](#2158) [#2194](#2194) [#2192](#2192) [ajv-validator/ajv#1840](ajv-validator/ajv#1840) [#1840](#1840) [#1901](#1901) [#1922](#1922) [#1862](#1862) [#1861](#1861) [#1815](#1815) [ajv-validator/ajv-keywords#220](ajv-validator/ajv-keywords#220) [#1819](#1819) [#1725](#1725) [#1757](#1757) [#2195](#2195) [#1971](#1971) [#2194](#2194) [#2184](#2184) [#2193](#2193) [#2183](#2183) [#2158](#2158) [#2160](#2160) [#1935](#1935) [#2192](#2192) [#1949](#1949) [#2191](#2191)
hkfb
pushed a commit
that referenced
this pull request
Mar 12, 2024
## [1.5.1](https://github.com/equinor/webviz-subsurface-components/compare/well-log-viewer@1.5.0...well-log-viewer@1.5.1) (2024-03-12) ### Bug Fixes * bump ajv from 7.2.1 to 8.12.0 in /typescript ([#1947](#1947)) ([af95651](af95651)), closes [#2190](#2190) [#2191](#2191) [#2158](#2158) [#2194](#2194) [#2192](#2192) [ajv-validator/ajv#1840](ajv-validator/ajv#1840) [#1840](#1840) [#1901](#1901) [#1922](#1922) [#1862](#1862) [#1861](#1861) [#1815](#1815) [ajv-validator/ajv-keywords#220](ajv-validator/ajv-keywords#220) [#1819](#1819) [#1725](#1725) [#1757](#1757) [#2195](#2195) [#1971](#1971) [#2194](#2194) [#2184](#2184) [#2193](#2193) [#2183](#2183) [#2158](#2158) [#2160](#2160) [#1935](#1935) [#2192](#2192) [#1949](#1949) [#2191](#2191)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fix for #1820
Add formal size state and effect to retrieve size from deck ref for code clarity
Move global bounding box handling to React reducer instead of useEffect.
Move camera computation to useMemo instead of useEffect.
Memoize viewPortMargins and deckGLLayers
Add a new story displaying the subsurface viewer in tabs to reproduce the issue
Note that this is a first step to reduce the number of useEffect in the Map component