-
Notifications
You must be signed in to change notification settings - Fork 370
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
feat: [M3-7144] - MNTP Dialog Updates for DC-specific pricing #9692
Conversation
@@ -38,7 +38,7 @@ interface Props | |||
* Enables a leaveDelay of 3000ms | |||
* @default false | |||
*/ | |||
leaveDelay?: boolean; | |||
leaveDelay?: number; |
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.
This fixes an existing type issue on the component (unrelated to main PR purpose)
@@ -142,6 +142,7 @@ export const TooltipIcon = (props: Props) => { | |||
return ( | |||
<Tooltip | |||
classes={classes} | |||
componentsProps={props.componentsProps} |
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.
Those were not picked up otherwise. Decided against passing {...props} to avoid regressions related to spreading everything (unknown HTML props etc)
/> | ||
</Typography> | ||
); | ||
}); |
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's enough coverage of the feature to leave this new micro component without a unit test
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.
Copy and styling changes are mostly looking good. Tested different screen sizes (all looked good) and different combinations of pools (found a tooltip bug).
The couple things we'll want to fix
- Did extending the divider to the edge of the dialog result in the horizontal scroll bar that is now appearing at the bottom of the dialog?
Screen.Recording.2023-09-18.at.9.45.33.AM.mov
- When
region_transfers
is an empty array, the tooltip copy is incomplete. We'll need some logic there to end that sentence coherently. "except for those with data-center specific transfer", maybe?
packages/manager/.changeset/pr-9692-upcoming-features-1695054097678.md
Outdated
Show resolved
Hide resolved
@mjac0bs feedback addressed! updated empty region_transfers tooltip to read: "The Global Pool includes transfer associated with active services in all regions." which to me is more relevant than adding copy that does not apply to the user. All in all I am not liking this. I don't think Helper text should have conditional copy since it is an interactive element hidden by default. Perhaps this is something we can revisit at some point. |
I think this is worth another opinion on too, probably Matthew's, because I worry we're contradicting ourselves here. The dialog already mentions the existence of regions calculating transfer differently, hinting at dc-specific pools.
Generally, I agree with this, but in this case, I think that the user is looking for content that is most relevant to them, so I don't have an issue with the conditional cases here. But we can revisit with UX, of course. |
@mjac0bs how about replacing "in all regions" with "in your devices regions" - would work for both cases |
This sounds good to me. 👍🏼 With the caveat that it would need to be "in your devices' regions", possessive, since regions belong to the devices. |
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.
So I think this is just the MSW being strange (the logic looks good to me and all the cases I've mentioned below have worked as expected at least once, so I'm unsure what's going on), but sometimes I get the following, and it's not really consistent when I get it:
Other than that, tested the following:
- 0 regions
- 1 region
- 2 regions
- 3 regions
and different widths + dark-mode and things looked good (except for the occasional flakiness like in the above screenshot but that's probably just the MSW?) 🎉 + left some very small comments
|
||
return ( | ||
<Dialog | ||
fullWidth | ||
maxWidth="sm" | ||
onClose={onClose} | ||
open={isOpen} | ||
sx={{}} |
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.
do we still need the sx here?
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 also think we can remove it.
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.
removed!
* @example formatRegionList(['Region 1', 'Region 2', 'Region 3']) // 'Region 1, Region 2 and Region 3' | ||
* @example formatRegionList(['Region 1, Region 2']) // 'Region 1 and Region 2' | ||
* @example formatRegionList(['Region 1']) // 'Region 1' | ||
* @example formatRegionList([]) // '' |
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.
super small, but worth writing a test case for this as well (the empty [] case) just to hit all the cases 😆
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.
Seconding this. 👍🏼
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.
sure thing, done
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.
This looks good. The horizontal scroll is gone and the tooltip copy updates dynamically with different regions (0, 1, 2, 3, 4). Also confirmed that regions will display as long as they're in region_transfers
, even if the quota is 0
, as we'd expect.
I can't replicate the issue that @coliu-akamai was seeing, but with a test case for that util's empty case, this should be good to go. (Ha, this was done as I was writing this. 🚢 )
|
||
return ( | ||
<Dialog | ||
fullWidth | ||
maxWidth="sm" | ||
onClose={onClose} | ||
open={isOpen} | ||
sx={{}} |
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 also think we can remove it.
* @example formatRegionList(['Region 1', 'Region 2', 'Region 3']) // 'Region 1, Region 2 and Region 3' | ||
* @example formatRegionList(['Region 1, Region 2']) // 'Region 1 and Region 2' | ||
* @example formatRegionList(['Region 1']) // 'Region 1' | ||
* @example formatRegionList([]) // '' |
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.
Seconding this. 👍🏼
@coliu-akamai yeah have not been able to repro this either. Other fixes addressed! |
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.
Yeah not too sure what was causing that issue, but since all the tests are working as expected, I don't think it should be a problem! approving 🎉
Description 📝
This PR improves the copy and typography in the Network Transfer Display Dialog.
Major Changes 🔄
Preview 📷
How to test 🧪
Setup
Testing Steps