-
Notifications
You must be signed in to change notification settings - Fork 332
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
upcoming: [M3-7691] - Create PG in Linode Create Flow #10273
Conversation
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.
massaging our mock data sets so we get a diverse pool of regions
placementGroupsSelectProps={{ | ||
...placementGroupsSelectProps, | ||
}} | ||
/> |
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.
moved to a dedicated component
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.
Thank you! π
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.
moved as much logic as possible away from LinodeCreate and moved it to the PlacementGroupDetailPanel
@@ -615,6 +615,7 @@ class LinodeCreateContainer extends React.PureComponent<CombinedProps, State> { | |||
); | |||
this.setState({ | |||
disabledClasses, | |||
placementGroupSelection: undefined, |
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 need to reset the placementGroup selection when the region changes. This is an omission from the previous implementation
region: 'us-west', | ||
}, | ||
]} | ||
/> |
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.
due to factory data changes
fontSize: '0.875rem', | ||
mt: -0.75, | ||
p: 0, | ||
})} |
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 to use a regular button and style it cause i wanted to use the built in tooltip
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.
That's fair, but now it feels different than the Create VPC
and Create Firewall
. Could we use a LinkButton
and just wrap it a <Tooltip />
or change the others to be consistent?
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.
What do you mean by "it feels different"?
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 looking the same, the problem is a bit more complex, so I created a ticket to handle LinkButton
to be based on our Button
rather than a native button that won't take custom props (LinkButton
is based on StyledLinkButton
which renders a native button)... we'll clean that up
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 feels different" as in there is a ripple effect when you press the button and there is no underline when you hover over the text
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.
gotcha - that's fair: M3-7892
arguably, we'll want the actual Button
styles, since underlines are usually reserved for links
I'll try to prioritize this for before Placement Groups go out
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'll want the actual Button styles, since underlines are usually reserved for links
I think I agree! Thanks for ticketing it!
Coverage Report: β
|
b68a5c2
to
1c916f1
Compare
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.
- Atlanta: (no existing PG) - can create new PG, can add linode to PG once created (with real API)
- can't really test payload till real API is wired
- confirmed success toast appears when the PG creation form is submitted β
- Chicago: (no capability) can't create new PG, can't add linode to PG β
- Newark: can create new PG, can add linode to PG
- (confirm
placement_group: { id: 1 }
in the POSTlinode/instances payload
) β
- (confirm
- Toronto: (no room left on PG) - can create new PG, can't add linode to PG, inline error when selecting PG, error when submitting the Linode create form β
- Fremont: (reach PG capacity for region) - create button disabled, can select PG and add linode to PG β
- (confirm
placement_group: { id: 2 }
in the POSTlinode/instances payload
) β
- (confirm
packages/manager/.changeset/pr-10273-upcoming-features-1710350268383.md
Outdated
Show resolved
Hide resolved
packages/manager/src/features/PlacementGroups/PlacementGroupsDetailPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/PlacementGroups/PlacementGroupsDetailPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/PlacementGroups/PlacementGroupsDetailPanel.tsx
Outdated
Show resolved
Hide resolved
placementGroupsSelectProps={{ | ||
...placementGroupsSelectProps, | ||
}} | ||
/> |
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.
Thank you! π
packages/manager/src/features/PlacementGroups/PlacementGroupsDetailPanel.tsx
Show resolved
Hide resolved
fontSize: '0.875rem', | ||
mt: -0.75, | ||
p: 0, | ||
})} |
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.
That's fair, but now it feels different than the Create VPC
and Create Firewall
. Could we use a LinkButton
and just wrap it a <Tooltip />
or change the others to be consistent?
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.
Cancelling the drawer does not reset the state
Screen.Recording.2024-03-19.at.11.15.35.AM.mov
packages/manager/src/features/PlacementGroups/PlacementGroupsDetailPanel.tsx
Outdated
Show resolved
Hide resolved
fontSize: '0.875rem', | ||
mt: -0.75, | ||
p: 0, | ||
})} |
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 feels different" as in there is a ripple effect when you press the button and there is no underline when you hover over the text
packages/manager/src/components/PlacementGroupsSelect/PlacementGroupSelectOption.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/components/PlacementGroupsSelect/PlacementGroupSelectOption.tsx
Show resolved
Hide resolved
packages/manager/src/components/PlacementGroupsSelect/PlacementGroupSelectOption.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/PlacementGroups/PlacementGroupsDetailPanel.tsx
Outdated
Show resolved
Hide resolved
thanks @hana-linode - all addressed |
Very nice work. Solid refactors and I'm in agreement with the updated naming conventions you made. Looks like there's some failures with |
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.
Great work!
Description π
This PR bring the PG create drawer to the Linode creation flows, within the DetailsPanel
Changes π
LinodeCreate
and keep it contained (CC create refactor - @bnussman-akamai)Preview π·
How to test π§ͺ
NOTE: due to MSW limitations, creating a new PG won't place it in the Detail PG select
Prerequisites
Verification steps
placement_group: { id: 1 }
in the POSTlinode/instances payload
)placement_group: { id: 2 }
in the POSTlinode/instances payload
)These are the scenarios I have added coverage in the unit as well
As an Author I have considered π€
Check all that apply