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

Refactor Autocomplete component in PlaygroundCodeFieldset #8912

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

Curis-lab
Copy link
Contributor

About the Changes

This pull request enhances the Autocomplete component within the PlaygroundCodeFieldset to improve user interaction and visual clarity.
Key updates include:
. Multiple Selections: Enabled multiple selections to allow users to choose more than one option.
. Tag Limitation: Implemented a tag display limit (limitTags={3}) to maintain a clean interface.
. Checkbox Integration: Added checkboxes to each option for better selection visibility.
These improvements aim to streamline the context selection process, making it more intuitive and user-friendly.

Closes: #8836

Important files

. frontend/src/component/playground/Playground/PlaygroundForm/PlaygroundCodeFieldset/PlaygroundCodeFieldset.tsx: The main file where the Autocomplete component is updated.

Discussion points

. Are there any additional features or improvements that should be considered for the Autocomplete component?

- Updated the Autocomplete component to improve user interaction.
- Ensured multiple selection with checkboxes for legal values.
- Enhanced styling and layout for better user experience.
Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 2:54pm

Copy link

vercel bot commented Dec 4, 2024

@Curis-lab is attempting to deploy a commit to the unleash-team Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@Tymek Tymek left a comment

Choose a reason for hiding this comment

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

Linter complaining, an 1 other nitpick. Other than that, looks great!

<Checkbox
icon={<CheckBoxOutlineBlank fontSize='small' />}
checkedIcon={<CheckBoxIcon fontSize='small' />}
style={{ marginRight: 0.4 }}
Copy link
Member

@Tymek Tymek Dec 4, 2024

Choose a reason for hiding this comment

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

Suggested change
style={{ marginRight: 0.4 }}
sx={theme => ({ marginRight: theme.spacing(0.5) })}

We try to make style relative to theme. This is a bit verbose, but prevents issues with accidentally defining values in pixels.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @Tymek , I have fixed the linter issues and addressed your feedback. Let me know if there's anything else needed!

- Fixed all issues flagged by the linter.
- Applied changes based on review suggestions.
@Tymek Tymek merged commit 50929c5 into Unleash:main Dec 4, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Playground context field with allowed values should be indicated clearly
2 participants