-
Notifications
You must be signed in to change notification settings - Fork 152
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(Popover): migrate to Tailwind #4152
Conversation
Deploying with Cloudflare Pages
|
Size Change: -173 B (0%) Total Size: 460 kB
ℹ️ View Unchanged
|
863109e
to
f59ea07
Compare
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.
While reviewing this, I noticed that the div
fka StyledPopoverChild
actually has a width of 100%. So if you click outside of the children it might still trigger the popover.
This can be fixed by adding the max-w-max
class to the said div.
packages/orbit-components/src/Popover/components/ContentWrapper.tsx
Outdated
Show resolved
Hide resolved
packages/orbit-components/src/Popover/components/ContentWrapper.tsx
Outdated
Show resolved
Hide resolved
onClick={onClose} | ||
/> | ||
<div | ||
role="tooltip" |
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 definition of this role is
A tooltip is a contextual text bubble that displays a description for an element that appears on pointer hover or keyboard focus.
And this is not true for a Popover, which does not open on pointer hover nor keyboard focus.
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 did not add this, it was like that 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.
I found this info useful, maybe will apply something different then
packages/orbit-components/src/Popover/components/ContentWrapper.tsx
Outdated
Show resolved
Hide resolved
packages/orbit-components/src/Popover/components/ContentWrapper.tsx
Outdated
Show resolved
Hide resolved
packages/orbit-components/src/Popover/components/ContentWrapper.tsx
Outdated
Show resolved
Hide resolved
f59ea07
to
3a34785
Compare
b837bb4
to
8c4105e
Compare
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.
Overall LGTM, just one fix needed
style={ | ||
{ | ||
"--actions-height": actionsHeight != null && `${actionsHeight}px`, | ||
"--windowHeight": windowHeight != null && `${windowHeight}px`, |
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.
"--windowHeight": windowHeight != null && `${windowHeight}px`, | |
"--window-height": windowHeight != null && `${windowHeight}px`, |
I just noticed that the problem reported on the first review is also not fixed, so please address that as well |
8c4105e
to
933ea48
Compare
test(Popover): add linux screenshots
933ea48
to
4dcbbe4
Compare
@@ -39,6 +34,7 @@ const Popover = ({ | |||
dataTest, | |||
}: Props) => { | |||
const ref = React.useRef<HTMLDivElement | null>(null); | |||
const popoverId = React.useId(); |
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.
We should be careful with these in code reviews as we still need to use useId from our provider, not from React directly as some folks haven't migrated to React 18 yet.
This Pull Request meets the following criteria:
Giving solution to FEPLT-1768
For tailwind migrations:
tailwind-migration-status.yaml
file has been updated with the migrated component(s).Storybook: https://orbit-mainframev-tw-popover.surge.sh