-
Notifications
You must be signed in to change notification settings - Fork 361
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-7288] - AGLB create page with Actions buttons. #9825
Conversation
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.tsx
Outdated
Show resolved
Hide resolved
{/* TODO: | ||
* Implement Review Load Balancer Action Behavior | ||
* Implement Cancel Behavior | ||
* Implement Add Another Configuration Behavior | ||
*/} | ||
<div | ||
style={{ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
marginTop: '16px', | ||
width: '100%', | ||
}} | ||
> | ||
<div> | ||
<StyledAddConfigurationButton | ||
buttonType="outlined" | ||
data-qa-api-cli-linode | ||
onClick={() => null} | ||
> | ||
Add Another Configuration | ||
</StyledAddConfigurationButton> | ||
</div> | ||
|
||
<ActionsPanel | ||
primaryButtonProps={{ | ||
label: 'Review Load Balancer', | ||
onClick: () => null, | ||
}} | ||
secondaryButtonProps={{ label: 'Cancel', onClick: () => null }} | ||
sx={{ margin: 0, padding: 0 }} | ||
/> | ||
</div> | ||
</Grid> |
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.
Action button behaviors will be implement in followup tickets.
// TODO: Regious should be updated with the real values | ||
const regions = [ | ||
{ country: 'ga', id: 'us-southeast', label: 'Atlanta, GA' }, | ||
{ country: 'ca', id: 'ca-central', label: 'Toronto, CA' }, | ||
{ country: 'au', id: 'ap-southeast', label: 'Sydney, AU' }, | ||
{ country: 'gb', id: 'eu-west', label: 'London, UK' }, | ||
{ country: 'fr', id: 'fr-par', label: 'Paris, FR' }, | ||
]; |
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.
These are the hardcoded dummy regions used for the dev purpose. These are replace with correct regions once we get them.
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.
packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx
Outdated
Show resolved
Hide resolved
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
Outdated
Show resolved
Hide resolved
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
Outdated
Show resolved
Hide resolved
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerRegions.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerCreate.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerRegions.tsx
Outdated
Show resolved
Hide resolved
<Grid | ||
alignItems={'center'} | ||
container | ||
direction="row" | ||
justifyContent="flex-start" | ||
key={region.id} | ||
marginBottom={theme.spacing(1)} | ||
spacing={2} | ||
> |
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.
Would a Stack
make more sense 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.
packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx
Outdated
Show resolved
Hide resolved
|
||
describe('LoadBalancerConfiguration', () => { | ||
test('Should render Details content', () => { | ||
renderWithTheme(<LoadBalancerConfiguration />); |
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.
We can clean this up a little by doing this instead and with the other tests
const { getByText, queryByText } = renderWithTheme(
<LoadBalancerConfiguration />
);
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.
IMO, I don't see any significant benefits in choosing between using 'screen' methods
and destructuring the 'render' result. Both approaches are concise and easy to read, and I have
no strong opinions on which one to use. It largely depends on personal preference.
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.
While screen works great, I also have a deep fear that it one day will cause issues. It scares me that it's just some magic global that happens to have the correct scope when used in a test. I have no idea how it is implemented but I generally prefer destructuring the 'render' result because it seems more direct and less "magic" to me. I'm sure either method is fine but just wanted to provide another perspective.
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.
Had a quick look in into testing-library documentation, looks like they are recommending screen
methods to find DOM elements (Didn't do in-depth research) and it also supports multiple frameworks.
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.
Very interesting, good find. 🔎
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
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.
I think the breadcrumb should be Global Load Balancers / Create instead of Loadbalancers / Create according to the mocks
Agreed. Unless: are we keeping "Global" in the terminology, @bnussman-akamai? I don't fully remember what UX showed in the last cafe in regard to the AGLB menu options -- was "Global" still in there? Was wondering if this should be Load Balancers / Create
.
packages/manager/.changeset/pr-9825-upcoming-features-1698093221284.md
Outdated
Show resolved
Hide resolved
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerRegions.tsx
Outdated
Show resolved
Hide resolved
…/LoadBalancerRegions.tsx Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
…21284.md Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
…/LoadBalancerConfiguration.tsx Co-authored-by: Connie Liu <139280159+coliu-akamai@users.noreply.github.com>
…/LoadBalancerRegions.tsx Co-authored-by: Connie Liu <139280159+coliu-akamai@users.noreply.github.com>
@cpathipa can we swap the order of the cancel and action buttons for the mobile view to match the desktop version more? It also feels weird to have the cancel to the right side
|
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerLable.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.tsx
Outdated
Show resolved
Hide resolved
...ges/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerConfiguration.test.tsx
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.
Nice work, looking good and matches the mocks! 🚢
I did notice one file name typo.
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerLable.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/LoadBalancers/LoadBalancerCreate/LoadBalancerLabel.test.tsx
Outdated
Show resolved
Hide resolved
…/LoadBalancerConfiguration.test.tsx Co-authored-by: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com>
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 Job!
Ui looks good ✅
Test coverage added 👍
left a small comment for using a util instead of duplicating logic
packages/manager/src/components/VerticalLinearStepper/VerticalLinearStepper.tsx
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.
Awesome job! Looks great!
{ country: 'us', id: 'us-iad', label: 'Washington, DC' }, | ||
{ country: 'us', id: 'us-lax', label: 'Los Angeles, CA' }, | ||
{ country: 'fr', id: 'fr-par', label: 'Paris, FR' }, | ||
{ country: 'jp', id: 'jp-osa', label: 'Osaka, JP' }, | ||
{ country: 'au', id: 'ap-southeast', label: 'Sydney, AU' }, |
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.
TY @bnussman for updating with approved regions. Was about to push this change then realized your commit.
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.
UI looks good + looks good on smaller screens! 🎉
Description 📝
AGLB create page with Actions buttons.
Note: Action buttons behavior, Stepper component contents are not part of this PR scope will be implemented in the followup subtasks.
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
Verification steps
(How to verify changes)
As an Author I have considered 🤔
Check all that apply