-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
feat: Revamp GlobalVariableModal #5512
Conversation
…o use Tabs component instead of Select for type selection and improve layout and styling of input fields and labels 🔧 (index.tsx): Add popoverWidth prop to InputComponent to allow setting the width of the popover in CustomInputPopover component 🔧 (index.tsx): Add popoverWidth prop to InputComponent in InputGlobalComponent to set the width of the popover to 315px ✨ (tabs-button.tsx): introduce new TabsButton component to handle tab functionality in UI components 📝 (tabs-button.tsx): add documentation for Tabs, TabsContent, TabsList, TabsTrigger components 📝 (components/index.ts): add popoverWidth property to InputComponentType to control the width of the popover in UI components
… icon next to the modal header text for better visual representation 📝 (GlobalVariableModal.tsx): Update TabsTrigger components to include data-testid attribute for testing purposes ✨ (index.tsx): Introduce new components OptionBadge, CommandItemContent, and SelectionIndicator to improve code organization and reusability ♻️ (index.tsx): Refactor handleRemoveOption function to have a more descriptive parameter signature and improve readability 📝 (index.tsx): Add comments to clarify the purpose of handleOptionSelect function and improve code documentation 📝 (index.tsx): Add comments to describe the purpose of getInputClassName and getAnchorClassName functions for better code understanding ✨ (globalVariables.spec.ts): improve placeholder text for variable name and value fields for better user understanding and experience
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.
… components to correctly reflect initialData type 📝 (GlobalVariableModal.tsx): Update label for submit button to dynamically change based on the presence of initialData
…zed as a Set to prevent unnecessary re-renders. Update memoizedOptions to correctly memoize options as a Set.
@anovazzi1 regarding the delay to render, It is because of the options array - is too large. we should think about change the component to one that handle more data better. |
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
…nd value fields to improve clarity and user experience.
This pull request includes significant updates to the
GlobalVariableModal
component, enhancements to theCustomInputPopover
component, and the addition of a newTabs
component. The changes aim to improve the user interface and functionality of these components.Updates to
GlobalVariableModal
:Select
component with the newTabs
component for selecting variable types.Enhancements to
CustomInputPopover
:popoverWidth
prop to allow customization of the popover width. [1] [2]Addition of
Tabs
component:Tabs
component withTabsList
,TabsTrigger
, andTabsContent
subcomponents for better tab navigation.Other changes:
InputComponent
to support the newpopoverWidth
prop. [1] [2] [3]extraneous
flag from@clack/prompts/node_modules/is-unicode-supported
in thepackage-lock.json
file.