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: enhance slider component with labels and improved input handling #5065

Merged
merged 9 commits into from
Dec 6, 2024

Conversation

Cristhianzl
Copy link
Member

This pull request includes several changes to the frontend and backend components to enhance the functionality and user experience of the slider component.

Frontend Changes:

Backend Changes:

…tep 0.01 for more precise control

📝 (sliderComponent/index.tsx): Update step value for slider component from 0.1 to 0.01 for smoother and more accurate adjustments
📝 (sliderComponent/index.tsx): Update MAX_LABEL from "Wild" to "Creative" for better semantic representation
📝 (sliderComponent/index.tsx): Add cursor-grabbing style when slider thumb is being grabbed to improve user experience
…liderComponent by refactoring the display value element to use a div container with appropriate classes and styles.
…ements for better UX

🔧 (sliderComponent/index.tsx): Add input element to allow users to directly edit the slider value for improved user experience
…max labels with icons in SliderComponent for better user experience

📝 (index.tsx): Remove sliderInput prop and refactor SliderComponent to improve code readability and maintainability
🔧 (applies.css): Add styling for input-slider-text class to improve consistency in SliderComponent styling
@Cristhianzl Cristhianzl self-assigned this Dec 4, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Dec 4, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 4, 2024
@Cristhianzl Cristhianzl requested a review from anovazzi1 December 4, 2024 19:58
…lider-input-border for consistency and maintainability

📝 (index.css): add variable --slider-input-border to define the color value for slider input border
🔧 (tailwind.config.mjs): add slider-input-border custom property to map to the defined color value in the CSS variables
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 Dec 5, 2024
…ased on input values to customize UI

✨ (get-min-max-value.ts): add function to get minimum or maximum value based on input constraints
🔧 (index.tsx): update import path for getMinOrMaxValue function
🔧 (index.tsx): add buildColorByName function to dynamically set thumb color based on percentage
🔧 (index.tsx): add logic to dynamically set background color gradient based on thumb color and percentage
🔧 (index.tsx): add logic to dynamically set thumb background color based on percentage and color calculation
@Cristhianzl Cristhianzl enabled auto-merge (squash) December 6, 2024 12:44
@Cristhianzl Cristhianzl merged commit b2691ee into main Dec 6, 2024
29 checks passed
@Cristhianzl Cristhianzl deleted the cz/slider branch December 6, 2024 13:03
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:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants