-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Site Domains: Modernize UI 2/2 - Integrate status and navigation to domain details #22311
Site Domains: Modernize UI 2/2 - Integrate status and navigation to domain details #22311
Conversation
Combine domainsList and all-domains to show a more comprehensive site domains list that is equivalent to All Domains view
Avoid additional loading of domains when navigating from SiteDomains to AllDomains
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
The status label and navigating to domain detail worked as expected. 🟢 A minor issueThe domain detail screen should have a title when navigating from Site Domains.
Touch area for the "Add a domain" buttonThis looks like unrelated to this PR. If so, I can open an issue for it. Screen.Recording.2024-01-03.at.14.45.46.movPlatform differenceWhen there is both a custom domain and credits, iOS shows a "Claim your free domain" button, while Android shows a card. I think Android's way is better. We can open an issue to match platforms later.
Other domains titleThe title is changed on the design to "OTHER DOMAINS FOR STOP MAKING SENSE". Color issue on Webview in dark modeThis is already existed on trunk, opened issue: #22324 |
@irfano, thanks for testing it!
I'll fix it.
Good catch. I will see what can be done with it. I would also expect the touch area to take the area of the whole row.
I'll fix it.
Good catch 👍 . It should be an easy fix. |
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The domain status label sometimes shows Activating when WP.com shows Active. /all-domains?resolve_status=true&no_wpcom=true
returns "Activating" for that domain, which is unexpected since the domain wasn't registered recently. My best guess is that "Active" is the right status. I don't see this mismatch on all my domains, do you see it on any of yours?
Calypso has frontend logic for displaying the status here: https://github.com/Automattic/wp-calypso/blob/7b4243596a876949629fc5bfa2c7a7e8566478b8/client/lib/domains/resolve-domain-status.tsx#L56C17-L56C36
I'd need to spend more time on this to figure out how to handle this. We could address this issue separately to this PR since I see the same mismatch on the All Domains screen.
In the video attached to the PR, the domain changes from povilasstaskus.wordpress.com to povilasstaskus.wpcomstaging.com when you view the domain details web view (it then changes back after you buy the new domain). I didn't see this on my domains. Can you reproduce or could this be an issue that was resolved in a later commit?
If you want to address this separately, I can continue reviewing this PR tomorrow as I don't have time to finish it today.
Thanks for the review, @guarani !
Yes, Calypso looks to have domain status-resolving logic within a client, which is strange to me. The backend through this endpoint resolves domain status as well fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Syvo%2Sqbznvaf%2Sqbznva%2Qfgnghf%2Qerfbyire%2Sqbznva%2Qfgnghf%2Qerfbyire.cuc%3Se%3Qsn1n97n3%23341-og . It could be activating if "pending_registration" flag exists. fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Syvo%2Sqbznvaf%2Sjcpbz%2Qqbznva.cuc%3Se%3Q59p4n8r9%231793-og. I don't know why this mismatch happens as well, I didn't dig deep into domain management logic itself, it's complicated.
Yes, I think it would be best to address it separately. It may not be addressable from the app. Maybe there're some differences between Calypso frontend and backend and how the status is resolved.
Oh yes, I see it now. I can reproduce it 🤔 It happens because This issue happens on a previous Site Domains view as well: Switching.betwee.wpcomstagging.and.wordpress.MP4
I think domain statuses should be investigated separately, I'm not sure anything could be done in the scope of this PR. |
AllDomains endpoint result allows to distinguish between a simple and staging free domain
Made fixes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-tested and didn't find any issues and the code comments aren't blockers. Thanks for the patience on this one, @staskus 🙇
WordPress/Classes/ViewRelated/Domains/View Models/SiteDomainsViewModel.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, good point. When I developed it, I admit I tried to reuse the on from All Domains view and it appeared with broken spacing within the Swift UI layout, no matter how much I tried to constrain it within HStacks and VStacks. I got frustrated and created a new SwiftUI view. But I can try the opposite way, reuse SwiftUI view within UIKit. Maybe it will appear correctly 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Simulator.Screen.Recording.-.iPhone.15.-.2024-01-05.at.08.15.36.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 It's great this level of test coverage!
WordPress/Classes/ViewRelated/Domains/View Models/SiteDomainsViewModel.swift
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Domains/View Models/SiteDomainsViewModel.swift
Outdated
Show resolved
Hide resolved
d5b97ca
into
task/22262-site-domains-modernize-ui
Generated by 🚫 Danger |
Fixes ##22262
Continuation of #22294
Description
Use
all-domains
endpoint instead ofsites/%d/domains
to load information needed to display status and open domain details.Solution
DomainsService
to fetch domains and filter to show domains for a specific siteSimulator.Screen.Recording.-.iPhone.15.-.2023-12-29.at.12.50.56.mp4
To test:
Menu -> Domains
UI:Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist: