feat: [M3-7144] - MNTP Dialog Updates for DC-specific pricing#9692
feat: [M3-7144] - MNTP Dialog Updates for DC-specific pricing#9692abailly-akamai merged 8 commits intolinode:developfrom
Conversation
| * @default false | ||
| */ | ||
| leaveDelay?: boolean; | ||
| leaveDelay?: number; |
There was a problem hiding this comment.
This fixes an existing type issue on the component (unrelated to main PR purpose)
| return ( | ||
| <Tooltip | ||
| classes={classes} | ||
| componentsProps={props.componentsProps} |
There was a problem hiding this comment.
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.
There's enough coverage of the feature to leave this new micro component without a unit test
There was a problem hiding this comment.
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_transfersis 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.
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
| maxWidth="sm" | ||
| onClose={onClose} | ||
| open={isOpen} | ||
| sx={{}} |
There was a problem hiding this comment.
do we still need the sx here?
There was a problem hiding this comment.
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.
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.
sure thing, done
mjac0bs
left a comment
There was a problem hiding this comment.
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. 🚢 )
| maxWidth="sm" | ||
| onClose={onClose} | ||
| open={isOpen} | ||
| sx={{}} |
There was a problem hiding this comment.
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([]) // '' |
|
@coliu-akamai yeah have not been able to repro this either. Other fixes addressed! |
coliu-akamai
left a comment
There was a problem hiding this comment.
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