-
Notifications
You must be signed in to change notification settings - Fork 14
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(PPDSE-2360): feat-2360-vertical-volume-control-gap #371
Conversation
You can preview these changes on: |
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.
2678401
to
bb93c16
Compare
src/audio-player-composable/__tests__/audio-player-composable.stories.tsx
Outdated
Show resolved
Hide resolved
const popoverOverrides = getPopoverOverrides(theme, overrides); | ||
|
||
const TheContent = ( |
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.
Might this be renamed to popoverContent
or verticalVolumeSlider
? to be more descriptive
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.
only react component should start with the upper latter
@@ -23,6 +23,7 @@ export default { | |||
stylePreset: 'iconButtonMinimalPrimary', | |||
}, | |||
popover: { | |||
distance: 'space030', |
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.
Just curious, should not be using padding or margin key words here? distance I think we have never used it? is that ok 🤔 ?
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.
I remember speaking with Mike F about that, its not margin or padding. that's distance
between the popover and the button, you still can add padding and margin to the popover/tooltip.
Now I am seeing that probably the right name was "offset" ( that's the name in floating-ui library ) but it's too late since is gonna be a breaking change.
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.
I see! something maybe to consider for a major? for keeping our props consistent 🤔
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.
@Vanals will create a ticket for this so that next time we work on major tickets we can fix this!
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.
</StyledVolumeSliderPopupContainer> | ||
); | ||
const DefaultPopover = Popover; | ||
const [PopoverComponent, popoverProps] = getComponentOverrides( |
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's the difference between this and just having the Popover component in the return statement as before?
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.
the idea is to be able to override Popover props ( not only styling ) for example to set hidePointer=false
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.
ok, thanks
* feat(PPDSE-2360): feat-2360-added-space * feat(PPDSE-2360): feat-2360-added-open prop * feat(PPDSE-2360): feat-2360-removed open prop * feat(PPDSE-2360): feat-2360-tidied up * feat(PPDSE-2360): feat-2360-spaceBetween prop bacl * feat(PPDSE-2360): feat-2360-removed padding from button * feat(PPDSE-2360): feat-2360-added mouseleave on slider * feat(PPDSE-2360): feat-2360-added mouseonleave bk * feat(PPDSE-2360): feat-2360-getcomponentoverrides added * feat(PPDSE-2360): feat-2360-updated other story * feat(PPDSE-2360): feat-2360-updated vertical stories * feat(PPDSE-2360): feat-2360-added extra story * feat(PPDSE-2360): feat-2360-changed types * feat(PPDSE-2360): feat-2360-updated stories
PPDSC-2360
What
Please note that this was originally a spike but no investigation was needed in the end, design were happy with the change so i implemented everything here in the ticket
After some attempts we decided to extend the props of the Popover and allow the user to set
hidePointer=false
on the AudioPlayerVolumeControl.By bringing in the Popover Props and Overrides into the
AudioPlayerVolumeControl
in audioPlayerVolumeControl the user can override the Pointer size and stylepreset, when the pointer is shown the user can hover between the mute button and popover, this is the only way to have the desired behaviour. We decided to give the option to the user to make the pointer transparent that way they can hover inbetween the gap.If they create a style preset
and then add it to the pointer stylePreset override
the pointer will now be transparent and the user can hoover
![Screenshot 2022-09-16 at 12 52 32](https://user-images.githubusercontent.com/54642337/190632973-70b6debb-ce58-4af0-8f7e-f7e89f120dc9.png)
If they only passed
layout=vertical
it would look like thisOriginally i thought it was a good idea to add the stylePreset for the pointer on our volumeControl defaults but after speaking to other engineers it seems quite hacky and this situation is an edge case. So we thought it might be better to add a storybook scenario instead and the user can set the transparency on the stylePreset themselves
I hope this is ok..if anyone has any opinions otherwise please do let me know.
I have done:
I have tested manually:
Before:
After:
Who should review this PR:
How to test: