-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
ui: Fix dropdown option duplications #10706
ui: Fix dropdown option duplications #10706
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.
Awesome work! Since you're no longer using a named action here, can you drop the action
helper and use fn
instead?
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.
LGTM! Agree with note about using fn
. Ty!
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.
Sorry just one last point of feedback. SourceNS
and DestinationNS
are ambiguous without a @
or this.
in front of them. Going forward this will be required in Ember. Not sure if you all are worried about this yet. If not, disregard!
Yes, let me update that as well. |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/417284. |
🍒✅ Cherry pick of commit eb5512f onto |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/417943. |
🍒✅ Cherry pick of commit eb5512f onto |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/417971. |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/417972. |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/417988. |
This reverts commit eb5512f.
) This PR supersedes #10706 and fixes #10686 whilst making sure that saving intentions continues to work. The original fix in #10706 ignored the change action configured for the change event on the menus, meaning that the selected source/destination namespace could not be set by the user when editing/creating intentions. This, coupled with the fact that using the later intention exact endpoint for API requests endpoint means that you could not use wildcard namespaces for saving intentions. All in all this meant that intentions could no longer be saved using the UI (whilst using ENT) This PR reverts #10706 to fix the intention saving issue, and adds a fix for the original visual issue of nspaces doubling up in the menu once clicked. This meant repeating the existing functionality for nspaces aswell as services. It did seem strange to me that the original issue was only apparent for the nspace menus and not the service menus which should all function exactly the same way. There is potentially more to come here partly related to what the exact functionality should be, but I'm working with other folks to figure out what the best way forwards is longer term. In the meantime this brings us back to the original functionality with the visual issue fixed. Squashed commits: * Revert "ui: Fix dropdown option duplications (#10706)" This reverts commit eb5512f. * ui: Ensure additional nspaces are added to the unique list of nspaces * Add some acceptance tests
) This PR supersedes #10706 and fixes #10686 whilst making sure that saving intentions continues to work. The original fix in #10706 ignored the change action configured for the change event on the menus, meaning that the selected source/destination namespace could not be set by the user when editing/creating intentions. This, coupled with the fact that using the later intention exact endpoint for API requests endpoint means that you could not use wildcard namespaces for saving intentions. All in all this meant that intentions could no longer be saved using the UI (whilst using ENT) This PR reverts #10706 to fix the intention saving issue, and adds a fix for the original visual issue of nspaces doubling up in the menu once clicked. This meant repeating the existing functionality for nspaces aswell as services. It did seem strange to me that the original issue was only apparent for the nspace menus and not the service menus which should all function exactly the same way. There is potentially more to come here partly related to what the exact functionality should be, but I'm working with other folks to figure out what the best way forwards is longer term. In the meantime this brings us back to the original functionality with the visual issue fixed. Squashed commits: * Revert "ui: Fix dropdown option duplications (#10706)" This reverts commit eb5512f. * ui: Ensure additional nspaces are added to the unique list of nspaces * Add some acceptance tests
) This PR supersedes #10706 and fixes #10686 whilst making sure that saving intentions continues to work. The original fix in #10706 ignored the change action configured for the change event on the menus, meaning that the selected source/destination namespace could not be set by the user when editing/creating intentions. This, coupled with the fact that using the later intention exact endpoint for API requests endpoint means that you could not use wildcard namespaces for saving intentions. All in all this meant that intentions could no longer be saved using the UI (whilst using ENT) This PR reverts #10706 to fix the intention saving issue, and adds a fix for the original visual issue of nspaces doubling up in the menu once clicked. This meant repeating the existing functionality for nspaces aswell as services. It did seem strange to me that the original issue was only apparent for the nspace menus and not the service menus which should all function exactly the same way. There is potentially more to come here partly related to what the exact functionality should be, but I'm working with other folks to figure out what the best way forwards is longer term. In the meantime this brings us back to the original functionality with the visual issue fixed. Squashed commits: * Revert "ui: Fix dropdown option duplications (#10706)" This reverts commit eb5512f. * ui: Ensure additional nspaces are added to the unique list of nspaces * Add some acceptance tests
) This PR supersedes #10706 and fixes #10686 whilst making sure that saving intentions continues to work. The original fix in #10706 ignored the change action configured for the change event on the menus, meaning that the selected source/destination namespace could not be set by the user when editing/creating intentions. This, coupled with the fact that using the later intention exact endpoint for API requests endpoint means that you could not use wildcard namespaces for saving intentions. All in all this meant that intentions could no longer be saved using the UI (whilst using ENT) This PR reverts #10706 to fix the intention saving issue, and adds a fix for the original visual issue of nspaces doubling up in the menu once clicked. This meant repeating the existing functionality for nspaces aswell as services. It did seem strange to me that the original issue was only apparent for the nspace menus and not the service menus which should all function exactly the same way. There is potentially more to come here partly related to what the exact functionality should be, but I'm working with other folks to figure out what the best way forwards is longer term. In the meantime this brings us back to the original functionality with the visual issue fixed. Squashed commits: * Revert "ui: Fix dropdown option duplications (#10706)" This reverts commit eb5512f. * ui: Ensure additional nspaces are added to the unique list of nspaces * Add some acceptance tests
🐛 Issue: New intentions form -
Source Namespace
andDestination Namespace
drop-downs have options duplicated with onChange action. Issue reported in #10686.🩹 Solution: Update
onChange
action to mutate to the selected option. This is following the usage documentation forember-power-select-with-create
package.Screenshots:
Before
![intention_dropdown_before](https://user-images.githubusercontent.com/19161242/127223497-f222ae08-ba67-4ffe-be3d-e3190d76020f.gif)
After
![intention_dropdown_after](https://user-images.githubusercontent.com/19161242/127222997-535c9b88-0a5a-4e58-8fdf-e2fff703cfec.gif)
Tests: ❌
Backlog
Changelog