feat(ui): add "Add Private Key" button to TerminalLoginForm's select
#5622
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new reusable component,
PrivateKeySelectWithAdd, which streamlines the process of selecting and adding private keys in the UI. TheTerminalLoginFormis refactored to use this new component, simplifying its logic and improving maintainability. Comprehensive tests for the new component are also added, and relevant test files are updated to support these changes.Component Refactoring and Feature Addition:
PrivateKeySelectWithAddcomponent that provides a dropdown for selecting private keys and an integrated option to add a new key, automatically selecting it upon creation.TerminalLoginFormto use the newPrivateKeySelectWithAddcomponent, removing the previous manual select logic and integrating the new event-driven approach for key selection and addition.PrivateKeySelectWithAddcomponent, covering rendering, selection, addition, and edge cases such as an empty key list. (ui/tests/components/PrivateKeys/PrivateKeySelectWithAdd.spec.ts)