-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Add temporary focus to enabled option in workspace initial page #38546
Conversation
@rushatgabhane 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] |
@allroundexperts nice! any chance it could fade away? cc @Expensify/engineering team for 👁️ maybe we want to update the time |
I believe we want the effect to be more of a "highlight", I will leave that to the design team though |
This is similar to how its being done in #38036. We don't have the fade effect there or do we? |
Just for the reference of the design team, the focus time is 3s right now. |
I think you tagged the wrong team here heh @mountiny |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
@rojiphil This is not how it should work. I'll check and get back! |
@rojiphil Is this running on my branch? I can't seem to reproduce this behaviour. |
Isn't highlight the same as temporary focus? |
Not sure what you're talking about here. |
Oh damn sorry for the wrong tag here team, typo + autosuggestion It was meant to be @Expensify/design |
Hmm... It seemed to me that the expectation was to keep the |
So just to make sure we're all on the same page here:
I think that's all we're trying to accomplish here, right? What I think I would recommend is that we highlight the newly enabled feature by:
I think the highlight should stay for like 1.5-2.5 seconds, and when the highlight is over, we should fade it out with a slight transition instead of instant. Curious if that is what the rest of the @Expensify/design is thinking too. |
@shawnborton yeah that sounds good to me. 👍 I also wonder if we could add a slight delay to the transition from the more features page to the navigation menu? Right now it happens so fast you can't even see the toggle go all the way to the on state. I think a tiny amount of delay there would really help it feel not so jarring. |
Oh yeah, I love that idea! |
Yup, this stood out to me too. |
@allroundexperts Looks like we introduced regression here. Can you also please check on this? 38372-pr-branch.mp4 |
I just checked on all the platforms. To me, the feature works like a charm on all. Just that while testing with a small screen device scenario on MacOS:safari platform, I noticed that the highlight animation is quite quick (as can be seen in the test video). But, maybe we can ignore this as mobile platforms seem to work well. Screenshots/VideosAndroid: Native38372-android-native.mp4Android: mWeb Chrome38372-mweb-chrome.mp4iOS: Native38372-ios-native.mp4iOS: mWeb Safari38372-mweb-safari.mp4MacOS: Safari38372-web-safari.mp4MacOS: Desktop38372-desktop.mp4 |
@dubielzyk-expensify @shawnborton Just to be on the same page, did you mean a similar observation (as mentioned here) as on testing a MacOS:safari platform with small screen device scenario? Or did you mean something else? |
I think it's a similar comment, yes. Basically the highlight animation seems to start slightly before the page transition (goBack) happens. |
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.
Its shaping up well now, no major comments to the code, I think we are at the point we should get this to staging and feel it out
Except this regression obviously |
Regression is fixed. @rojiphil Please verify. |
Also, @mountiny @luacmartins, just to be sure that we're on the same page, with 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.
Looks like we introduced few more issues. But I think we are very close. Please check.
@@ -0,0 +1,36 @@ | |||
import type {ForwardedRef} from 'react'; | |||
import {forwardRef} from 'react'; |
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.
It's weird that there is no lint / type error for this. I've added it anyways.
<MenuItem | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...restOfProps} | ||
wrapperStyle={animatedHighlightStyle} |
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.
Did you mean outerWrapperStyle={animatedHighlightStyle}
?
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.
Yep, my bad. Fixed.
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.
Looking good
Yea. Thanks for bringing this up. I had captured this in my iOS:Native platform testing here. Please use the test video for reference if needed. But, it looked a nice little feature to me. |
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.
Awesome. Tests well on all platforms. LGTM.
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.
LGTM
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.
Thank you!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.61-0 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.61-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|
Details
Adds temporary focus to the workspace feature that was enabled on narrow screens.
Fixed Issues
$ #38372
PROPOSAL: N/A
Tests
For narrow screen layouts only:
Verify that the row of the enabled option is highlighted when we take the user back to the LHN.
Offline tests
N/A
QA Steps
For narrow screen layouts only:
Verify that the row of the enabled option is highlighted when we take the user back to the LHN.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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
Screen.Recording.2024-03-19.at.4.05.23.AM.mov
Android: mWeb Chrome
Screen.Recording.2024-03-19.at.4.04.50.AM.mov
iOS: Native
Screen.Recording.2024-03-19.at.4.03.14.AM.mov
iOS: mWeb Safari
Screen.Recording.2024-03-19.at.4.02.46.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-19.at.3.32.13.AM.mov
MacOS: Desktop
Screen.Recording.2024-03-19.at.3.34.48.AM.mov