fix: [M3-7262] - Create Firewall Drawer opens in the same tab in the Linode Create Flow#9785
fix: [M3-7262] - Create Firewall Drawer opens in the same tab in the Linode Create Flow#9785tyler-akamai merged 13 commits intolinode:developfrom tyler-akamai:M3-7262-firewall-create-drawer-opens-in-same-tab
Conversation
| }; | ||
|
|
||
| const handleFirewallCreated = (id: number, label: string) => { | ||
| setDropdownValue({ label, value: id }); |
There was a problem hiding this comment.
When the user creates a new Firewall, this code is responsible for setting the value of the dropdown in the Firewall Panel to the recently created Firewall.
packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
Outdated
Show resolved
Hide resolved
| helperText: JSX.Element; | ||
| } | ||
|
|
||
| export const createFirewallLabel = 'Additional Linodes (Optional)'; |
There was a problem hiding this comment.
UX wanted to ensure the user:
- Wasnt looking for current Linode in the dropdown --> 'Additional'
- Knew that the input was optional --> '(Optional)'
mjac0bs
left a comment
There was a problem hiding this comment.
Thank you for this awesome testing checklist!
I verified:
- The default Firewall is still 'None'
- When you choose a Firewall, the summary section at the bottom gets updated ('Firewall Assigned' gets added)
- When clicking on 'None', the 'Firewall Assigned' gets removed from the summary section
- When clicking on the 'Create Firewall' link, the Create Firewall Drawer appears in the same tab
- The Create Firewall Drawer has the text 'Additional Linodes (Optional)', while the Create Firewall Drawer from the Firewall Landing page has the text 'Linodes'
- Add an additional Linode and ensure it is added when the Firewall is created
- After creating a new Firewall, that Firewall is selected in the dropdown (in the firewall panel) and the summary section got updated
- After creating the Linode, the Linode is properly assigned to the Firewall in the Firewall Landing page.
For the last item, I'm not seeing the linode in the create flow be assigned to the firewall -- just the "additional linode" is assigned. Based on your screencap of this branch and my understanding of the acceptance criteria, I would have expected to see both longview-linode-do-not-delete and debian-us-sea listed as assigned to firewall testing123, but debian-us-sea was not. Have you observed any issues with handleFirewallChange?
Screen.Recording.2023-10-18.at.10.07.57.AM.mov
| "@linode/manager": Fixed | ||
| --- | ||
|
|
||
| Firewall Create Drawer opens in the same tab in the Linode Create Flow ([#9785](https://github.com/linode/manager/pull/9785)) |
There was a problem hiding this comment.
| Firewall Create Drawer opens in the same tab in the Linode Create Flow ([#9785](https://github.com/linode/manager/pull/9785)) | |
| Firewall Create Drawer opening in a new tab in the Linode Create Flow ([#9785](https://github.com/linode/manager/pull/9785)) |
Similar suggestion here with describing the thing that was fixed.
@mjac0bs Good catch! I had to ask @dwiley-akamai on this one. From my understanding this functionality is blocked by an API feature flag. You can test this on your |
packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Firewalls/FirewallLanding/CreateFirewallDrawer.tsx
Outdated
Show resolved
Hide resolved
jaalah-akamai
left a comment
There was a problem hiding this comment.
Looks good pending changes requested from @bnussman-akamai
…-create-drawer-opens-in-same-tab
| const [dropdownValue, setDropdownValue] = React.useState<{ | ||
| label: string; | ||
| value: number; | ||
| } | null>(null); |
There was a problem hiding this comment.
I just realized, we shouldn't need state here. We should have a prop on this component called selectedFirewallId: number which we should be using in place of the state
| const [dropdownValue, setDropdownValue] = React.useState<{ | |
| label: string; | |
| value: number; | |
| } | null>(null); |
mjac0bs
left a comment
There was a problem hiding this comment.
- After creating the Linode, the Linode is properly assigned to the Firewall in the Firewall Landing page.
Verified in dev environment, thanks for the clarification!
Functionality looks good. You caught the commented code I was about to note. Other than Banks' feedback and my earlier changelog suggestion, this LGTM.
bnussman-akamai
left a comment
There was a problem hiding this comment.
Thanks for addressing the feedback! Great change!
packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesCreate/LinodeCreate.tsx
Outdated
Show resolved
Hide resolved
…-create-drawer-opens-in-same-tab

Description 📝
Currently there is a 'Create Firewall' button in the Firewall Panel that when clicked, opens the Create Firewall Drawer in another tab. This should open the Create Firewall drawer in the same tab, in the same page.
Changes 🔄
List any change relevant to the reviewer.
Screen.Recording.2023-10-12.at.10.02.53.AM.mov
Screen.Recording.2023-10-12.at.9.56.37.AM.mov
How to test 🧪
Prerequisites
Reproduction steps
Verification steps
Navigate to http://localhost:3000/linodes/create
Ensure that:
development, it is blocked inprodby an api feature flagAs an Author I have considered 🤔
Check all that apply