-
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
Feature: Empty state UI for LHN #37361
Feature: Empty state UI for LHN #37361
Conversation
…pty-state-ui-lhn
…pty-state-ui-lhn
@DylanDylann 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] |
@DylanDylann The logic of adding Concierge chat here is supposed to remove but I need testing it carefully. For now, please hard code that. |
@tienifr Yeah, ping me again when all logic is ready |
@@ -302,6 +302,12 @@ export default { | |||
update: 'Actualizar', | |||
member: 'Miembro', | |||
role: 'Role', | |||
emptyLHN: { |
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.
Copy was verified here.
@DylanDylann The changes are ready for review. I tested removing the logic to add Concierge chat when report list is empty and verified it did not cause any trouble. @roryabraham Also please add |
design label didn't work so I'm manually requesting review from @dannymcclain, who created the mockups |
This comment has been minimized.
This comment has been minimized.
@tienifr Jest Unit Tests / Storybook tests (pull_request) is failed |
…pty-state-ui-lhn
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.
From a design perspective I think this is looking and feeling good. Obviously make sure to still get a proper technical review from an engineer.
cc @Expensify/design in case y'all have any other feedback.
I'm working on the storybook test failure. Will post update tomorrow. |
I've resolved all @roryabraham feedback above and fixed Storybook test failure. @DylanDylann This is ready for your review & retest again. |
.storybook/webpack.config.ts
Outdated
@@ -45,6 +45,10 @@ const webpackConfig = ({config}: {config: Configuration}) => { | |||
...custom.resolve.alias, | |||
}; | |||
|
|||
// We can ignore the "module not installed" warning from lottie-react-native | |||
// because we are not using the library for JSON format of Lottie animations. | |||
config.ignoreWarnings = [{module: new RegExp('node_modules/lottie-react-native/lib/module/LottieView/index.web.js')}]; |
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.
This was referenced from:
App/config/webpack/webpack.common.js
Lines 61 to 65 in 59a71f3
stats: { | |
// We can ignore the "module not installed" warning from lottie-react-native | |
// because we are not using the library for JSON format of Lottie animations. | |
warningsFilter: ['./node_modules/lottie-react-native/lib/module/LottieView/index.web.js'], | |
}, |
I already tried that stats.warningsFilter
config and used the correct module path but it didn't work. I'm not sure about that. However, based on the recommendation here, ignoreWarnings
seems a better alternative.
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.
@tienifr If we don't add this change, which story test will be failed
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're no specific test fail, it just threw an error/warning when we built the story page. More info here (Please expand the Storybook run section and scroll to bottom).
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.
shouldEmbedLinkWithSubtitle?: boolean; | ||
|
||
/** Render custom subtitle */ | ||
CustomSubtitle?: React.ReactElement; |
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.
@tienifr Using camelCase convention
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.
PascalCase
is correct for component props
App/src/components/LHNOptionsList/OptionRowLHN.tsx Lines 50 to 52 in b282693
Should we remove this code or move it out of |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-01.at.11.43.17.movAndroid: mWeb ChromeScreen.Recording.2024-04-01.at.11.40.23.moviOS: NativeScreen.Recording.2024-04-01.at.11.46.35.moviOS: mWeb SafariScreen.Recording.2024-04-01.at.11.43.57.movMacOS: Chrome / SafariMacOS: Desktop |
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.
@roryabraham Could you help to re-run all tests?
…pty-state-ui-lhn
@roryabraham I approved this PR to re-run all tests. A minor comment. Everything else looks good |
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
not an emergency, we're working on fixing this: https://expensify.slack.com/archives/C07J32337/p1711999860875239?thread_ts=1711998323.452789&cid=C07J32337 |
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.4.59-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|
@@ -54,6 +66,40 @@ function LHNOptionsList({ | |||
onFirstItemRendered(); | |||
}, [onFirstItemRendered]); | |||
|
|||
const emptyLHNSubtitle = useMemo( |
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.
UI was broken on Android devices. Let's make sure we test this so that the UI looks good on each platform. #41349
Details
This PR implements an "empty state" UI when users have cleared out the LHN in #focus mode on small screen devices.
Fixed Issues
$ #34926
PROPOSAL: #34926 (comment)
Tests
Small screen devices only
#focus
modeOffline tests
NA
QA Steps
Small screen devices only
#focus
modePR 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
Native
Screen.Recording.2024-03-04.at.22.06.56-compressed.mov
Screen.Recording.2024-03-04.at.22.06.28-compressed.mov
mWeb
Screen.Recording.2024-03-04.at.22.07.43-compressed.mov
Screen.Recording.2024-03-04.at.22.07.22-compressed.mov
Screen.Recording.2024-03-04.at.22.05.59-compressed.mov