Skip to content

Conversation

@yaelirub
Copy link
Contributor

@yaelirub yaelirub commented Dec 16, 2020

Fixing an issue where the following tab is being initially laid out out off to the left of the screen

Gif of the issue:

following_tab

To test:

  1. Launch the app
  2. tap the Reader
  3. see that the "Following" tab is not jumping from the left

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

…Menu

to prevent the issue where  the following tab is being initially laid out out of the screen
@yaelirub yaelirub added this to the 16.4 milestone Dec 16, 2020
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Dec 16, 2020

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Dec 16, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@leandroalonso
Copy link
Contributor

@yaelirub this call was added on purpose.

Mainly, to prevent this issue: #14412

I think that if we remove this call and follow the steps described in the issue (fresh install -> Reader) the issue will happen again — and a small glitch is less problematic than waiting (sometimes seconds) for the screen to appear.

@leandroalonso
Copy link
Contributor

@yaelirub I managed to fix.

We need to change this guard: https://github.com/wordpress-mobile/WordPress-iOS/blob/develop/WordPress/Classes/ViewRelated/System/FilterTabBar.swift#L427

Basically, it should be like this:

guard scrollView.contentSize.width > scrollView.frame.width, bounds.width > 0 else {

The issue is happening because this method is trying to do some calculations while the bounds haven't been calculated yet. This solves the issue. :)

and instead checking the bounds width > 0 before setting the tabs
@yaelirub
Copy link
Contributor Author

Thank you so so much, @leandroalonso ! I updated to your recommended. Ready of another look

@leandroalonso leandroalonso changed the title UI Bug fix - Removing a premature call to fetch tab bar items Reader: fix a glitch in the following tab Dec 17, 2020
@yaelirub
Copy link
Contributor Author

Done in #15536

@yaelirub yaelirub closed this Dec 17, 2020
@jkmassel jkmassel modified the milestones: 16.4, 16.4 ❄️ Jan 8, 2021
@jkmassel jkmassel deleted the fix/reader_tabs branch July 26, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants