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/192 popover #212

Merged
merged 10 commits into from
Dec 8, 2023
Merged

Feat/192 popover #212

merged 10 commits into from
Dec 8, 2023

Conversation

williamlines
Copy link
Contributor

@williamlines williamlines commented Dec 6, 2023

Adds a popover component

Screen.Recording.2023-12-06.at.15.57.02.mov

closes: #192

Copy link

@review-bot-for-github review-bot-for-github bot left a comment

Choose a reason for hiding this comment

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

Looks good! No comments.

Copy link
Contributor

@Ademsk1 Ademsk1 left a comment

Choose a reason for hiding this comment

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

For the radio group the padding doesn't quite look right in the video compared to the figma. wdyt?

@williamlines
Copy link
Contributor Author

For the radio group the padding doesn't quite look right in the video compared to the figma. wdyt?

Updated the example 👍

@williamlines williamlines requested a review from Ademsk1 December 6, 2023 15:58
@williamlines williamlines requested a review from Ademsk1 December 7, 2023 10:36
Copy link
Contributor

@Ademsk1 Ademsk1 left a comment

Choose a reason for hiding this comment

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

I think it's not good practice to have those high level selectors. I removed them alongside the negative margin and it looks fine to me. If you could center the separator as well rather than it being at the start that would be good.

Screenshot 2023-12-07 at 13 13 00

Above is an image of the popover when I remove those selectors and margin.


const popoverVariants = cva([
'z-50',
'border border-[2px] border-border-subtle dark:border-border-dark',
Copy link
Contributor

Choose a reason for hiding this comment

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

You can change this to border-2

className={cn(
'shrink-0 bg-border-subtle dark:bg-border-dark',
orientation === 'horizontal'
? 'h-[1px] w-fill -mx-4'
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this margin I think. We should find a better way of overflowing.

{...props}
>
<ScrollArea.Root className="w-full h-full" type="auto">
<ScrollArea.Viewport className="w-full h-full gap-3 [&>*>*]:py-2 [&>*>*]:px-4">
Copy link
Contributor

Choose a reason for hiding this comment

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

After some thought, let's not use these selectors for the padding. Let's let the user do it. This has quite a high specificity, and so will be hard for them to overwrite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes when you put it like this I think flexibility is more important than how it looks out of the box, plus it keeps the component simpler

'shrink-0 bg-border-subtle dark:bg-border-dark',
orientation === 'horizontal'
? 'h-[1px] w-fill -mx-4'
: 'h-fill w-[1px]',
Copy link
Contributor

Choose a reason for hiding this comment

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

This separator is also inline filled. We should have it centered.

@williamlines williamlines requested a review from Ademsk1 December 8, 2023 10:56
Copy link
Contributor

@Ademsk1 Ademsk1 left a comment

Choose a reason for hiding this comment

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

LGTM thanks for your hard work on this one.

@williamlines williamlines merged commit 16d63ce into main Dec 8, 2023
3 checks passed
@williamlines williamlines deleted the feat/192-popover branch December 8, 2023 11:24
@github-actions github-actions bot mentioned this pull request Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component] Popover Overlay
2 participants