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

feat: Revamp GlobalVariableModal #5512

Merged
merged 8 commits into from
Jan 7, 2025
Merged

feat: Revamp GlobalVariableModal #5512

merged 8 commits into from
Jan 7, 2025

Conversation

Cristhianzl
Copy link
Member

This pull request includes significant updates to the GlobalVariableModal component, enhancements to the CustomInputPopover component, and the addition of a new Tabs component. The changes aim to improve the user interface and functionality of these components.

Updates to GlobalVariableModal:

  • Replaced the Select component with the new Tabs component for selecting variable types.
  • Simplified the modal header and updated the form fields to use a more consistent layout and styling.

Enhancements to CustomInputPopover:

  • Added a popoverWidth prop to allow customization of the popover width. [1] [2]
  • Updated the styling of selected options and badges for a more cohesive look. [1] [2] [3]

Addition of Tabs component:

  • Introduced a new Tabs component with TabsList, TabsTrigger, and TabsContent subcomponents for better tab navigation.

Other changes:

  • Updated the InputComponent to support the new popoverWidth prop. [1] [2] [3]
  • Removed the extraneous flag from @clack/prompts/node_modules/is-unicode-supported in the package-lock.json file.

image

image

…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
@Cristhianzl Cristhianzl self-assigned this Jan 2, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jan 2, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 2, 2025
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

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

image image this new view on the update variable modal does not properly change the type of the variable, and there is no error alert.

also there is a small delay on the apply to fields options popUp

… components to correctly reflect initialData type

📝 (GlobalVariableModal.tsx): Update label for submit button to dynamically change based on the presence of initialData
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2025
…zed as a Set to prevent unnecessary re-renders. Update memoizedOptions to correctly memoize options as a Set.
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2025
@Cristhianzl
Copy link
Member Author

Cristhianzl commented Jan 3, 2025

image image this new view on the update variable modal does not properly change the type of the variable, and there is no error alert.
also there is a small delay on the apply to fields options popUp

@anovazzi1
thanks for your feedback.
actually we can't change a global variable type for security reasons. so I added a disabled status to the button.

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.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2025
@Cristhianzl Cristhianzl requested a review from anovazzi1 January 3, 2025 19:12
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 6, 2025
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 6, 2025
@Cristhianzl Cristhianzl enabled auto-merge January 6, 2025 16:03
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2025
…nd value fields to improve clarity and user experience.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 7, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 7, 2025
@Cristhianzl Cristhianzl added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit af4fb37 Jan 7, 2025
22 of 30 checks passed
@Cristhianzl Cristhianzl deleted the cz/new-modal-gv branch January 7, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants