Repository navigation
Demo of migrating annotations to RTK Query, without backwards compatibility - #4621
Draft
marlo-longley wants to merge 1 commit into
Draft
marlo-longley wants to merge 1 commit into
marlo-longley wants to merge 1 commit into
Conversation
marlo-longley
commented
Oct 23, 2026
| * @returns {object} Annotations from the state | ||
| */ | ||
| export const getAnnotations = (state) => miradorSlice(state).annotations; | ||
| export const getAnnotations = (state) => { |
Member
Author
There was a problem hiding this comment.
This is the only part of the migration that seems to add more complexity -- I guess looking at an aggregate is hard in RTKQ? Needs a little more research.
…bility Fixup tests for demo
marlo-longley
force-pushed
the
rtkquery-take2
branch
from
October 23, 2026 19:03
5d0fde6 to
93f17d5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4621 +/- ##
=======================================
- Coverage 94.9% 94.8% -0.0%
=======================================
Files 394 395 +1
Lines 5850 5850
Branches 2002 1997 -5
=======================================
- Hits 5550 5545 -5
- Misses 271 275 +4
- Partials 29 30 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
marlo-longley
commented
Oct 26, 2026
| }, | ||
| }, | ||
| }; | ||
| case ActionTypes.IMPORT_MIRADOR_STATE: |
Member
Author
There was a problem hiding this comment.
Make sure the case is handled where we put annotations directly into state, not via HTTP/RTKQ
This branch has not been deployed
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.
…ibility
Obvservations in this diff:
- const { annotations } = context.miradorInstance.store.getState();+ const annotations = getAnnotations(context.miradorInstance.store.getState());If other people are reading
.annotationsdirectly off state instead of using the selector, RTKQ pattern will totally break that. It now lives in a another part of the state. But the selector continues to work.Annotations apparently continue to work in the deploy preview