-
Notifications
You must be signed in to change notification settings - Fork 41
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
fix: camera state when hidden page is rendered #1819
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...
This is just refactoring and creating an example to demonstrate the bug? |
Nope, it fixes also the bug (ie. the example was showing the bug before I fixed it in the same PR) |
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 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.
Warning message fixed. |
🎉 This issue has been resolved in version subsurface-viewer@0.9.2 🎉 The release is available on GitHub release |
## [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)
## [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)
## [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)
## [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)
## [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)
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