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

Feature #741: Use opaque cursor on submission list and entity list #851

Merged

Conversation

sadiqkhoja
Copy link
Contributor

@sadiqkhoja sadiqkhoja commented Sep 1, 2023

Closes #741

What has been done to verify that this works as intended?

Integration tests and manual verification

Why is this the best possible solution? Were any other approaches considered?

Used the same approach as Submissions List

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

NA

Does this change require updates to user documentation? If so, please file an issue here and include the link below.

No

Before submitting this PR, please make sure you have:

  • run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

@sadiqkhoja sadiqkhoja marked this pull request as draft September 1, 2023 21:14
Copy link
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great simplification! I love that we no longer need to track instance IDs or have challenges related to scrolling in chunks while there's concurrent creation or deletion. The code here definitely looks like it's on the right track. I've left some suggestions, but I think @ktuite could do the final review without me if that ends up working best. Excited for $skiptoken and the changes here!

src/components/entity/list.vue Outdated Show resolved Hide resolved
src/components/entity/list.vue Outdated Show resolved Hide resolved
src/components/entity/list.vue Outdated Show resolved Hide resolved
src/components/entity/list.vue Outdated Show resolved Hide resolved
src/components/entity/table.vue Outdated Show resolved Hide resolved
src/components/entity/list.vue Outdated Show resolved Hide resolved
src/components/entity/list.vue Show resolved Hide resolved
src/request-data/entities.js Outdated Show resolved Hide resolved
@sadiqkhoja sadiqkhoja requested a review from ktuite September 6, 2023 17:00
@sadiqkhoja sadiqkhoja marked this pull request as ready for review September 6, 2023 17:00
if (props.totalCount <= props.top)
return tcn(`${props.type}.all`, props.totalCount);

// console.log( t('submission.first', { count: 'asdf', top: 10 }, 11 ) );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this

src/util/i18n.js Outdated
@@ -43,3 +43,8 @@ export const loadLocale = ({ i18n, logger }, locale) => {
export function $tcn(path, count, values = undefined) {
return this.$tc(path, count, { count: this.$n(count, 'default'), ...values });
}

// same as above but for composition API
export function tcn(path, count, values) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check if I really need this function

Copy link
Member

@ktuite ktuite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at this after a synchronous review with Sadiq earlier and I think it's good!

@sadiqkhoja sadiqkhoja merged commit 33929f8 into getodk:master Sep 12, 2023
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.

Add infinite scroll to Entities table
3 participants