Skip to content

Conversation

javiauso
Copy link

Atom/Slider

πŸ” Show

TASK:

Types of changes

  • πŸͺ² Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧾 Documentation
  • πŸ“· Demo
  • πŸ§ͺ Test
  • 🧠 Refactor
  • πŸ’„ Styles

Description, Motivation and Context

In MA we need a full width design of AtomSlider, to show custom marks inside a modal.

Screenshots - Animations

image

@github-actions
Copy link

STATEMENTS BRANCHES FUNCTIONS LINES
≍ ≍ 0.07↓ ≍ 0.01↓ ≍ 0.07↓ ≍ 0.07↓
% 71.79 57.98 58.94 73.61
ABS 2658 / 3702 1514 / 2611 481 / 816 2564 / 3483

Comment on lines +32 to +36
[firstMarkKey]: {label: marks[firstMarkKey], style: {transform: 'inherit'}},
[lastMarkKey]: {
label: marks[lastMarkKey],
style: {transform: 'inherit', left: 'auto', right: '0'}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think we could achieve implement this in a pure CSS way?

just as an idea, could we style first-child and last-child markers accordingly if the component has the fullWidth prop set to true?

IMHO it'd be cleaner... what do you think?

Copy link
Author

Choose a reason for hiding this comment

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

Yes! I'm with you with the approach, but here we're using rc-slider and is managing this styles with inline mode, so we only do that in CSS using !important declaration, instead them provide this style prop for each markers. For me, we could do an exception using !important, but It looks a bit tricky.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh... if the only alternative we have here is using !important, I think your original implementation is cleaner then

defaultValue,
invertColors
invertColors,
fullWidth
Copy link
Member

Choose a reason for hiding this comment

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

Boolean prop... isWhatever or hasWhatever

@github-actions
Copy link

STATEMENTS BRANCHES FUNCTIONS LINES
≍ ≍ 0.07↓ ≍ 0.01↓ ≍ 0.07↓ ≍ 0.07↓
% 71.79 57.98 58.94 73.61
ABS 2658 / 3702 1514 / 2611 481 / 816 2564 / 3483

@andresin87 andresin87 added hacktoberfest-accepted Accepted for hacktoberfest, merged or we will merge later hacktoberfest and removed not ready to merge labels Oct 26, 2022
@javiauso javiauso merged commit dee45d9 into master Oct 26, 2022
@javiauso javiauso deleted the feat/atom-slider-fullwidth branch October 26, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest hacktoberfest-accepted Accepted for hacktoberfest, merged or we will merge later

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants