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

Removed the shimmering modifier from OwnerUpgradesView #11683

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

bozidarsevo
Copy link
Contributor

@bozidarsevo bozidarsevo commented Jan 12, 2024

Closes: #11611

Description

  • There was a problem with SwiftUI Shimmer package so to fix the issue we had to use exact commit reference until they merge and tag the proper fix removed the shimmering modifier from OwnerUpgradesView
  • The shimmer modifier was producing bug in a way that views were being animated in a loop by moving from bottom to top and messing up the entire view layout
  • We will keep an eye on the SwiftUI-Shimmer repo and when the correct commit is merged we will update the package management
  • The last commit on SwiftUI-Shimmer main branch still has a bug so I used the commit from unmerged PR

Testing instructions

  • Open IAP upgrade screen
  • If the content is loaded fast and you do not see any redacted and shimmering content you should check that the close button (X) and navigation title are positioned correctly and fixed on the top.
  • Check gifs below and compare how it was before and how it is now

Screenshots

Before After
Simulator Screen Recording - iPhone 15 Pro - 2024-01-12 at 10 11 39 Simulator Screen Recording - iPhone 15 Pro - 2024-01-16 at 10 40 42

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@bozidarsevo bozidarsevo added this to the 16.9 milestone Jan 12, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 12, 2024

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr11683-e1c1d81
Version16.8
Bundle IDcom.automattic.alpha.woocommerce
Commite1c1d81
App Center BuildWooCommerce - Prototype Builds #7637
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@bozidarsevo bozidarsevo marked this pull request as ready for review January 12, 2024 09:22
@bozidarsevo bozidarsevo modified the milestones: 16.9, 17.0 Jan 12, 2024
@bozidarsevo bozidarsevo added the type: bug A confirmed bug. label Jan 12, 2024
@iamgabrielma
Copy link
Contributor

Thanks for taking care of this!

I have two questions/notes:

  • I believe we're aiming to disallow referencing dependencies by commit, and that CI checks will start to fail if we do so (at least for pods, I'm not sure if SPM is also included in this, but might be something to check with infra before moving forward, here's the context: p1704255760658109-slack-CC7L49W13
  • Is there any concern regarding referencing a un-merged PR from their library?

@jaclync
Copy link
Contributor

jaclync commented Jan 15, 2024

  • I believe we're aiming to disallow referencing dependencies by commit, and that CI checks will start to fail if we do so (at least for pods, I'm not sure if SPM is also included in this, but might be something to check with infra before moving forward, here's the context: p1704255760658109-slack-CC7L49W13

If I understand the expected behavior that will be enforced in the future correctly p1704280854743209/1704255760.658109-slack-CC7L49W13, we only want to point libraries to a commit and non-commit references won't be allowed after Gio's PR Automattic/dangermattic#30 🤔 I'd think the same principle applies to SPM, but it might be worth double-checking with apps-infra.

  • Is there any concern regarding referencing a un-merged PR from their library?

Good question, referencing a commit in an un-merged PR might be problematic if they do squash merge or if the author does a force push. It's tricky that we can't use the main branch because of the outstanding issue, maybe we can fork the library (we probably want to check with apps-infra about how to do this so that the forked repo is an A8C repo) and also ping the PR author / library owner about merging this fix and tagging for release.

@bozidarsevo
Copy link
Contributor Author

Authors PR that is merged is not fully fixing the issue and it looks like the author is not really checking other PRs and issues :/ And he did not even tag that fix with a new version number.

Maybe a fork would be the best way of making sure simple packages like this work properly for us.

What would be the best solution for us?

Maybe we can even write our own shimmer version?

@iamgabrielma
Copy link
Contributor

Thanks for the clarifications @jaclync !

What would be the best solution for us?
Maybe we can even write our own shimmer version?

Good question, I don't really have an answer 😅 Since the shimmer is used across multiple views/features let's move the discussion to P2 for a decision. Right now only seems to affect this view, but if the library is sort of abandoned then is certain we'll keep encountering issues as we add more instances of it in the future.

For the specific animation oddness that we were trying to fix initially, I'd say that for the time being we can just remove the .shimmering modifier from OwnerUpgradesView, which seems to fix the issue from a quick testing.

@jaclync
Copy link
Contributor

jaclync commented Jan 16, 2024

+1 to Gabriel's comment above to p2 the plan to fork the repo / write our own version, and then remove the shimmering modifier for this particular view to fix the issue for now. When we create an issue for the shimmering library change after the plan is finalized, we can add a note about adding the shimmering effect back to this view.

@bozidarsevo
Copy link
Contributor Author

Tnx @iamgabrielma @jaclync for feedback! I will update this PR according to our comments and write a P2 for continuing the discussion 👍

@bozidarsevo bozidarsevo changed the title Use exact commit reference for SwiftUI Shimmer package Removed the shimmering modifier from OwnerUpgradesView Jan 16, 2024
@bozidarsevo
Copy link
Contributor Author

bozidarsevo commented Jan 16, 2024

Updated the code and wrote the P2 -> pfoUAQ-7T-p2

Copy link
Contributor

@iamgabrielma iamgabrielma left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this! LGTM 🚢

@bozidarsevo bozidarsevo merged commit 4b3f109 into trunk Jan 17, 2024
22 of 25 checks passed
@bozidarsevo bozidarsevo deleted the feat/11611-UI-animation-oddness branch January 17, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI animation oddness when loading the IAP upgrade screen
4 participants