feat: update orbitalSim and provider to receive the defaultZoom value as a prop - #457
Merged
jeffinnes merged 1 commit intoJun 2, 2026
Conversation
… as a prop Instead of getting the defaultZoom value from the orbitData object
soshwosh
approved these changes
Jun 2, 2026
Contributor
|
Neither refreshing the page nor emptying the cache and doing a hard reload would get the change to apply in the client once |
Contributor
Author
|
I discovered after merging this PR that apparently I had not actually pushed up my changes to fix the OrbitalSimContext's prop types as described in issue #445 |
4 tasks
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.
What this change does
Resolves #456
This PR updates the
OrbitalSimProviderandOrbitalSimcomponent to handle receiving thedefaultZoomas a prop. It also corrects a hardcoded default zoom value that has been overriding what was set in the datasets.Additionally it updates the Storybook configuration for this widget to allow setting a default zoom value.
I also snuck in the prop Type fix from issue #445.
Notes
Regarding where the
defaultZoomfallback value is setI decided to make the
defaultZooma required prop that only accepts anumberin the types definition inpackages/epo-widget-lib/src/widgets/OrbitalSim/Context/OrbitalSimContext.types.ts. While allowing the prop to benullorundefinedand setting a fallback value in the context provider is a valid approach that I considered, I ultimately felt that the fallback value should be handled in the client. This keeps the widget itself as agnostic as possible and allows the implementor to determine an use a default value that is appropriate for their use case instead of a value we arbitrarily set right now.Testing
Basic testing can performed in the Storybook but yarn linking this package into the
investigations-clientand testing in the HazAst investigation is best.Confirm the following testing is complete: