Skip to content
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

Full replacement of VSCodeDropdown & VSCodeOption with custom react elements [Webview-UI-toolkit deprecation] #1276

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tejhan
Copy link
Collaborator

@tejhan tejhan commented Feb 26, 2025

Note : This PR builds on top of PR's #1259 - 1261, so this can be slated for merge/review after the preceding PR's are merged.

This should be the second to last PR, & once approved we can slate the final PR for removal of the entire package & leftover elements

This PR fully removes the VSCodeDropdown & VSCodeOption elements, & replaces them with CustomDropdown & CustomDropdownOption, 2 new elements that can be imported and used as a react component in any of our panels. The elements are styled with respect to vscode's display & coloring settings.

These elements have no external dependencies which will allow us to use fully functional vscode themed dropdowns in any of our commands without needing to import any toolkits. (Also allows further customization of our own in future)

For future reference, < CustomDropdownOption > can be used as a single tag, with the label attribute serving as the label. Other attributes like onchange, disabled, etc are also functional with these new elements. < CustomDropdown > works almost identically to the replaced VSCodeDropdown, where the values & selected elements are controlled with state variables & onchange functions.

Commands affected:

  • TCP Dump
  • Inspektor Gadget
  • Create Cluster
  • Create Fleet
  • Azure Service Operator

Dependent Components altered:

  • NodeSelector.tsx
  • ResourceSelector.tsx

For anyone testing, you can utilize the inputs in each of the effected commands to ensure submission of data is correct & the ability to scroll through options, search in dropdown, etc. are all working as intended.

.vsix for testing: vscode-aks-tools-1.6.0-dep5-2.vsix.zip

Verified

This commit was signed with the committer’s verified signature.
tejhan Tejhan Diallo
@tejhan tejhan added enhancement 🚀 New feature or request or improvements on existing code. Deprecating or retiring ☕️🤹 labels Feb 26, 2025
@tejhan tejhan self-assigned this Feb 26, 2025
@tejhan tejhan changed the title Full replacement of VSCodeDropdown & VSCodeOption with custom react elements Full replacement of VSCodeDropdown & VSCodeOption with custom react elements [Webview-UI-toolkit deprecation] Feb 26, 2025
tejhan and others added 2 commits March 4, 2025 06:15

Verified

This commit was signed with the committer’s verified signature.
tejhan Tejhan Diallo

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
Signed-off-by: Tejhan Diallo <82427254+tejhan@users.noreply.github.com>
@tejhan tejhan requested a review from bosesuneha March 4, 2025 11:47

Verified

This commit was signed with the committer’s verified signature.
tejhan Tejhan Diallo
ReinierCC
ReinierCC previously approved these changes Mar 10, 2025
Copy link
Collaborator

@ReinierCC ReinierCC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks good on Windows!

Might be worth adding a page to our documentation with all the components we should using moving forward.

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
Signed-off-by: Tejhan Diallo <82427254+tejhan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecating or retiring ☕️🤹 enhancement 🚀 New feature or request or improvements on existing code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants