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

Pagination out of sync after adding categories or phrases #597

Open
rowildcard opened this issue Apr 22, 2022 · 2 comments
Open

Pagination out of sync after adding categories or phrases #597

rowildcard opened this issue Apr 22, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@rowildcard
Copy link
Contributor

Description

In Settings, if a new category is added while on the Categories screen such that a new page is created in order to display it, the pagination on the Categories screen gets out of sync.

The same issue happens when adding new phrases to a category that causes a new page of phrases to be added.

Video is attached.

Reproduce

Pre-requisites

  • a fresh install of the app with no customization
  • Start on page 1 of the Settings -> Categories screen

Note: There are 9 preset categories. On the iPhone 12 Pro Max 4 categories appear per page which means page 3 shows 1 category. This means adding 3 new categories will fill page 3 or adding 4 new categories will create a page 4 to display one of the new categories.

Steps

  1. Tap the add button ('+').
  2. Type a category name and save by tapping the checkmark.

    The category is saved and the user is returned to page 1 of the Categories screen.
    Pagination shows "Page 1 of 3".
    There are now 10 categories with 2 on the last page.

  3. Repeat steps 1 and 2.

    The category is saved and the user is returned to page 1 of the Categories screen.
    Pagination shows "Page 1 of 3".
    There are now 11 categories with 3 on the last page.

  4. Repeat steps 1 and 2.

    The category is saved and the user is returned to page 1 of the Categories screen.
    Pagination shows "Page 1 of 3".
    There are now 12 categories with 4 (the max possible) on the last page.

  5. Repeat steps 1 and 2.

    There are now 13 categories and 4 pages.
    EXPECTED
    The category is saved and the user is returned to page 1 of the Categories screen.
    Pagination shows "Page 1 of 4".
    ACTUAL
    The category is saved and the categories on page 1 are displayed, but, pagination says, "Page 3 of 4". If you tap to go to the next page, you'll see pagination cycle through "Page 1 of 4" and finally land on "Page 2 of 4".

Test Device

  • Device: iPhone 12 Pro Max
  • OS: 15.0.1
@rowildcard rowildcard added the bug Something isn't working label Apr 22, 2022
@rowildcard
Copy link
Contributor Author

RPReplay_Final1650656483.MP4

@rhsalas3
Copy link
Contributor

rhsalas3 commented May 3, 2022

After disabling animations we found that some tests are failing due to this bug (which seems more exposed now w/ animations off). We opted to just disable the affected tests. Once this bug is fixed we will need to re-enable them.

Test affected:
CategoryPhrasesPaginationTests::testCanNavigatePages()

Related bug:
#594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants