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

fix(refresher): show when content is fullscreen #29608

Merged
merged 4 commits into from
Jun 12, 2024
Merged

fix(refresher): show when content is fullscreen #29608

merged 4 commits into from
Jun 12, 2024

Conversation

thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Jun 11, 2024

Issue number: resolves #18714


What is the current behavior?

When the ion-content has the fullscreen attribute, the ion-refresher will be hidden while refreshing. This can be seen by dragging far enough to trigger it to snap back and refresh.

The refresher ends up being hidden behind the background content element.

Screen.Recording.2024-06-10.at.1.36.24.PM.mov

What is the new behavior?

  • Set the --offset-top to 0px for the background content element. This reflects the same behavior of when the content is not fullscreen. By setting this to 0px, the refresher is visible while refreshing.
  • Added a private prop within refresher to keep track of whether ion-content is fullscreen or not.
  • Added test.

Originally, I was going to update the pullMin and pullMax as agreed on from the investigation ticket. However, it ended up adding too much space between the refresher and the content. This is the reason why I decided to modify the background background instead. Otherwise, it wouldn't mimic the behavior when content doesn't have the fullscreen attribute.

Example of what the spacing looked like:

Screen.Recording.2024-06-10.at.1.36.55.PM.mov

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview

How to test:

  1. Navigate to the preview page
  2. Use the browser's simulator to chose an iOS device (might need to refresh the page)
  3. Drag the screen down
  4. Verify that the refreshing text is shown
  5. Use the browser's simulator to chose an Android device (might need to refresh the page)
  6. Drag the screen down
  7. Verify that the refreshing text is shown

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 6:50pm

@github-actions github-actions bot added the package: core @ionic/core package label Jun 11, 2024
@thetaPC thetaPC marked this pull request as ready for review June 11, 2024 19:24
@thetaPC thetaPC requested a review from a team as a code owner June 11, 2024 19:24
Copy link
Member

@brandyscarney brandyscarney 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 an excellent, clean solution. I tested both the native and legacy refreshers in ios and md on Chrome, Firefox, Safari, and on a physical iPhone. Everything is working great after this fix. Great work! 👍

@thetaPC thetaPC added this pull request to the merge queue Jun 12, 2024
Merged via the queue into main with commit 5cdfac8 Jun 12, 2024
50 checks passed
@thetaPC thetaPC deleted the ROU-4950 branch June 12, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: refresher not visible when content has fullscreen attribute
2 participants