Skip to content
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

Merged
merged 7 commits into from
Sep 18, 2024

Conversation

Wroud
Copy link
Member

@Wroud Wroud commented Sep 17, 2024

No description provided.

@Wroud Wroud self-assigned this Sep 17, 2024
@Wroud Wroud requested a review from devnaumov September 17, 2024 17:16
Comment on lines 464 to 465
const pageListKey = this.aliases.isAlias(originalKey, CachedResourceOffsetPageListKey);
const pageKey = this.aliases.isAlias(originalKey, CachedResourceOffsetPageKey) || pageListKey;
Copy link
Contributor

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

Copy link
Member Author

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

Comment on lines +135 to +140
for (const page of pageInfo.pages) {
if (page.isHasCommonSegment(from, to)) {
for (const pageKey of page.get(from, to)) {
keys.add(pageKey);
}
}
Copy link
Contributor

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)

Copy link
Member Author

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

@Wroud Wroud merged commit 3c5aa6b into devel Sep 18, 2024
7 checks passed
@Wroud Wroud deleted the fix/cb-5658/pagination-resolving branch September 18, 2024 13:18
Wroud added a commit that referenced this pull request Sep 18, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants