- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.4k
 
feat(range): updating the range pin to always be visible when enabled for ionic theme #29988
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
Conversation
# Conflicts: # core/src/components/range/range.ionic.scss
| 
           The latest updates on your projects. Learn more about Vercel for Git ↗︎ 
  | 
    
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.
All of my requested changes are dependent on the --height variable being set to 40px as requested on #29979. This will make the total range height equal to 68px, matching Figma.
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.
Line 66 should be:
@include padding(calc(globals.$ion-space-100 + globals.$ion-scale-600), null, null, null);This will make it so the padding top is the height of the pin text + the space between the knob and pin text
# Conflicts: # core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Chrome-linux.png # core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Firefox-linux.png # core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Safari-linux.png
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.
One suggestion to eliminate changes in the component
        
          
                core/src/components/range/range.tsx
              
                Outdated
          
        
      | {pin && ( | ||
| <div class="range-pin" role="presentation" part="pin"> | ||
| {pinFormatter(value)} | ||
| {pinFormatter(value) + (theme === 'ionic' ? '%' : '')} | 
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.
What do you think about changing the pinFormatter prop to return number | string. That way, we don't have to add this theme specific logic, and the OS widget could provide its own formatter that would append the %
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.
Sounds great! I will do that
# Conflicts: # core/src/components/range/range.ionic.scss # core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Chrome-linux.png # core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Firefox-linux.png # core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Safari-linux.png
| 
           LGTM!  | 
    
Issue number: internal
What is the current behavior?
The ion-range pin is only shown we the range is being dragged for all themes.
What is the new behavior?
Does this introduce a breaking change?
Other information