-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor Hoverable component v2 #33257
Refactor Hoverable component v2 #33257
Conversation
Yup, there was some issues with TS while I was fixing other stuff. Thanks for pointing that out, it's been fixed already 👍 |
Continuing the discussion held here, here is a brief explanation of what was improved:
Having that said, I would highly appreciate to review the PR carefully with given QA steps. @mountiny initial discussion and review of PR was done by @cubuspl42 and I think it might be valuable if we could assign the same reviewer for consistency. Thanks 👍 |
@cubuspl42 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Would you start PR threads on the places crucial for fixing the previously identified regressions? Unless the commit structure separates bugfixes from the organisational changes, but I'm not sure if it does. |
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.
Would you start PR threads on the places crucial for fixing the previously identified regressions?
Sure thing @cubuspl42! Here are the crucial places 👍
@kacper-mikolajczak Seems like some unverified commits creeped in |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
@cubuspl42 Could you test on the build please? |
I'm on it |
@kacper-mikolajczak Please update the PR Author Checklist |
@mountiny Fixed 👍 |
Generating dynamic checks...
/home/runner/work/App/App/.github/actions/javascript/authorChecklist/index.js:21[5](https://github.com/Expensify/App/actions/runs/7338235732/job/19980449424?pr=33257#step:3:6)[6](https://github.com/Expensify/App/actions/runs/7338235732/job/19980449424?pr=33257#step:3:7)8
const [checklistContent, contentAfterChecklist] = contentAfterStartOfChecklist.split(checklistEndsWith);
^
TypeError: Cannot read properties of undefined (reading 'split')
at partitionWithChecklist (/home/runner/work/App/App/.github/actions/javascript/authorChecklist/index.js:21568:84)
at generateDynamicChecksAndCheckForCompletion (/home/runner/work/App/App/.github/actions/javascript/authorChecklist/index.js:21598:[7](https://github.com/Expensify/App/actions/runs/7338235732/job/19980449424?pr=33257#step:3:8)0) @cubuspl42 Are you familiar with this pipeline error? |
This reverts commit 7b22bd9.
Great progress on this, with discussion like this one it might be better to bring them to Slack though for faster resolution. Dont hesitate to do that. Would be nice to wrap this one up sooner than later, great job done so far 🚀 |
Yeah, you're right. I have a habit of emptying my queue in iterations, but this one deserves a little more urgency. I'll give it a final round of testing and we should be good. |
@kacper-mikolajczak Uhm, we've got some conflicts... |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safarihoverable-component-web.movMacOS: Desktophoverable-component-desktop.mov |
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.
Please resolve the conflicts. I'll then do a final check to ensure the conflict resolution broke nothing, both otherwise we're good 👍
@cubuspl42 conflicts resolved 👍 |
Could you take a look at the TypeScript Checks? |
On it! 🔧 |
@cubuspl42 In order to fix typings, I needed to:
|
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.
Quite complex changes but did not notice anything weird. Curious for @roryabraham thoughts too
Hey, just want to set expectations here that since this is just a refactor I'm not going to urgently prioritize reviewing this. I have a number of other more important things on my plate atm, so I don't expect to be able to review this until next week. @mountiny if you're comfortable with the changes here, feel free to proceed without me |
Thank you for this message, I think I would go ahead with merging this, as @cubuspl42 and @kacper-mikolajczak spent lots of time on testing all the issues previously identified Thanks everyone! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
function Hoverable({isDisabled, ...props}: HoverableProps, ref: Ref<HTMLElement>) { | ||
// If Hoverable is disabled, just render the child without additional logic or event listeners. | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
if (isDisabled || !hasHoverSupport()) { |
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.
A quick note: You've updated the prop from disabled
to isDisabled
in this component, but it seems that the corresponding changes haven't been made where this component is being used
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.
App/src/pages/home/report/ReportActionItem.js
Line 675 in e8dc643
disabled={!_.isUndefined(props.draftMessage)} |
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.
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.
due to this
children.props.onMouseEnter(e); |
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.
That's right, thanks for your feedback @perunt! ❤️
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 didn't dig deeper into the influence of that bug, but it might have crashed due to the context menu on the draft message. Just bump @mountiny to keep it on the radar
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.
Yeah, it looks like there was a mismatch between typing and actual usage. I've created a quickfix PR and notified @mountiny, thanks once again 👍
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.
Thanks for the quick response ❤️
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.
Merged, thank you ❤️
…component-refactor Quickfix: Hoverable refactor #33257
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.24-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.24-3 🚀
|
Details
PR introduces improved changes to
Hoverable
component.It is a continuation of 32636 issue.
Fixed Issues
$ #32096
PROPOSAL: https://expensify.slack.com/archives/C05LX9D6E07/p1700572497547219
Tests
LHN
avatar elements. Tooltip should be displayedComposer
, openactions
andemoji
boxes. The boxes should open over their parent buttonSettings
, go toWorkspaces
, go back and close sidebar. It should not crashdevtools
, toggle mobile device. It should not crash the appOffline tests
Settings
, go toWorkspaces
, pick existing workspacedelete
workspaceQA Steps
LHN
avatar elements. Tooltip should be displayedComposer
, openactions
andemoji
boxes. The boxes should open over their parent buttonSettings
, go toWorkspaces
, go back and close sidebar. It should not crashdevtools
, toggle mobile device. It should not crash the appPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
mandroid.mp4
Android: mWeb Chrome
mandroid.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
mios.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4