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

Dynamic Dashboard Card Image UI Fix #22516

Merged
merged 9 commits into from
Feb 6, 2024

Conversation

alpavanoglu
Copy link
Contributor

Fixes #22501

Testing Steps

  1. Install & launch Jetpack App.
  2. ✅ Verify that the "New: Domains Management" card UI does not jump around.
  3. Switch to another tab, and open My Site again.
  4. ✅ Verify that the "New: Domains Management" card UI looks correct.

Screen Recordings

Before

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-01.at.13.12.18.mp4

After

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-01.at.13.11.12.mp4

Regression Notes

  1. Potential unintended areas of impact
    N/A

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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.

UI Changes testing checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 1, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr22516-cad7afd
Version24.1
Bundle IDorg.wordpress.alpha
Commitcad7afd
App Center BuildWPiOS - One-Offs #8677
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 1, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr22516-cad7afd
Version24.1
Bundle IDcom.jetpack.alpha
Commitcad7afd
App Center Buildjetpack-installable-builds #7705
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@salimbraksa salimbraksa self-requested a review February 3, 2024 20:21
@mokagio
Copy link
Contributor

mokagio commented Feb 4, 2024

I'm going to bump this to the next release because we'll be code freezing 24.2 today and this hasn't been approved yet.

If these changes cannot wait two weeks and it's important that it makes it into this release, let me know and we'll organize a new beta once ready.

@mokagio mokagio modified the milestones: 24.2, 24.3 Feb 4, 2024
@alpavanoglu
Copy link
Contributor Author

Hey @mokagio
It would be great if we can target this release. I updated the PR and pinged the reviewers. Once it is ready, I'll rebase it to the release branch and leave the merging/not merging to you. If it is too late or anything, we can of course ship it with the next release.

) / CGFloat(
height ?? 1
)
}
Copy link
Contributor

@salimbraksa salimbraksa Feb 5, 2024

Choose a reason for hiding this comment

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

[Suggestion] I think if either width or height, is nil. I would expect the aspect ratio to be nil as well. Because it doesn't make sense to calculate the aspect ratio out of nil dimensions!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense!

@@ -75,10 +76,24 @@ extension BlogDashboardRemoteEntity {
let icon: String?
}

struct ImageSize: Decodable, Hashable {
let width: Int?
let height: Int?
Copy link
Contributor

Choose a reason for hiding this comment

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

[Suggestion] I believe the type of these properties can be CGFloat even if the Backend returns them as Int.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point, however I would rather match the backend type unless it is an enum if that's okay with you.

@salimbraksa
Copy link
Contributor

@alpavanoglu I've dropped a few code suggestions but I confirm the UI glitch is resolved. Also, the unit tests are failing.

CleanShot 2024-02-05 at 12 59 51

@salimbraksa salimbraksa self-requested a review February 5, 2024 12:01
@salimbraksa salimbraksa modified the milestones: 24.3, 24.2 ❄️ Feb 5, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Feb 5, 2024

1 Warning
⚠️ This PR is assigned to the milestone 24.2 ❄️. The due date for this milestone has already passed.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

Copy link
Contributor

@salimbraksa salimbraksa left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@alpavanoglu alpavanoglu changed the base branch from trunk to release/24.2 February 5, 2024 14:12
@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

Copy link
Contributor

@hassaanelgarem hassaanelgarem left a comment

Choose a reason for hiding this comment

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

🚀

@mokagio
Copy link
Contributor

mokagio commented Feb 6, 2024

@alpavanoglu all good. Merging now.

@mokagio mokagio merged commit e149425 into release/24.2 Feb 6, 2024
23 checks passed
@mokagio mokagio deleted the task/dynamic-dashboard-card-image-ui-fix branch February 6, 2024 05:15
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.

Dynamic Dashboard Card layout glitch
6 participants