AnimationConfig does not load if old state does not contain filter [Bug]
- Dominant language
- TypeScript
- Stars
- 12k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 66
Description
**Describe the bug**
Loading a Kepler config with a filter and custom animationConfig disregards the animation config completely.
This is because https://github.com/keplergl/kepler.gl/blob/master/src/reducers/vis-state-updaters.js#L2124 looks at the old map state when updating the visState. If the *old* state does not contain a filter, the *new* state will not have animationConfig even if it contains a filter.
**To Reproduce**
Steps to reproduce the behavior:
1. Into an empty Kepler app, load a json that contains *both* `config.visState.filters` *and* `config.visState.animationConfig`.
2. The filters appear in the state, but the animationConfig does not.
**Expected behavior**
I expect the animationConfig to be loaded in Kepler, because it is relevant for the added filter.
**Additional context**
Don't know if there are other updaters out there that make decisions on the new state based on the *old* state, instead of looking at the new state as a whole.
Would like to make a PR to fix this particular issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at src/reducers/vis-state-updaters.js#L2124 and reproduce the issue by loading a JSON config containing both visState.filters and visState.animationConfig into an empty Kepler app. Confirm that the filters load and that animationConfig is retained when the old state has no filter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100