-
Notifications
You must be signed in to change notification settings - Fork 389
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
CB-5658 CB-5659 fix: pagination resolving #2922
Conversation
const pageListKey = this.aliases.isAlias(originalKey, CachedResourceOffsetPageListKey); | ||
const pageKey = this.aliases.isAlias(originalKey, CachedResourceOffsetPageKey) || pageListKey; |
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.
I can see a copy-paste here and a little bit below for all resources with pagination.
Maybe we should add a helper here so it returns the correct pageKey
and the page
? So we don't miss this bug when we create a new feature with the exact pagination mechanism
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.
now you can use getOffsetPageKeyInfo
helper
for (const page of pageInfo.pages) { | ||
if (page.isHasCommonSegment(from, to)) { | ||
for (const pageKey of page.get(from, to)) { | ||
keys.add(pageKey); | ||
} | ||
} |
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.
Same here. we can define helper like getKeysFromPages(pages)
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.
let's keep it for now
* CB-5658 CB-5659 fix: pagination resolving * CB-5658 fix resources pages * CB-5667 fix: node rename behavior * CB-5658 chore: refactor repeated code --------- Co-authored-by: mr-anton-t <[email protected]> Co-authored-by: Daria Marutkina <[email protected]>
No description provided.