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: new way to handle insets in the app #53250

Conversation

kirillzyusko
Copy link
Contributor

@kirillzyusko kirillzyusko commented Nov 28, 2024

Explanation of Change

Motivation for changes

We recently enabled edge-to-edge mode on android:

which caused some regressions, mostly related to the bottom navigation bar and the content either having too much or to less spacing. As well as problems where when opening the keyboard the content would be either hidden behind the keyboard or would have too much spacing between the keyboard's edge.

This PR aims to fix all of those UI regressions

Problems with current implementation

The main problem for all of this is that there are different paths to handle safe area insets. As of now there are:

  • useSafeAreaBottomInset()
  • SafeAreaConsumer
  • useSafeAreaInsets()

Every screen and their child components was making their own guessing about how the bottom safe area should be handled, leading to inconsistencies. They have special conditions for different platforms, and combining them creates even more inconsistent results.

The strategy of this PR

Introduce an API that unifies the safe area handling, provides an equal interface for any platform and creates the same visual output across platforms.

Postulates:

  1. The safe area bottom inset handling should be defined by the screen. It's not up to a child component of a screen whether it wants to obey the safe area inset or not, but to the most parent, the screen.
  2. Only one API should be used when you want to handle the content insets
  3. The new API should make sure that a safe area padding can only be applied once per screen
  4. There is a default spacing, of 20px, that should usually be applied between the content and the bottom safe area inset (so that the content doesn't sit too close to the navigation bar). This spacing must explicitly be added by the screen's children, if the screen has to deal with the bottom safe area inset

Changes:

  • The <ScreenWrapper> component should handle the bottom safe area inset in the most places.
  • To the ScreenWrapperStatusContext we added whether a top or bottom padding has been applied
  • We introduced a new hook, which should be used everywhere you want to handle safe area insets called useStyledSafeAreaInsets.
  • If in a screen the safe area insets have already been applied this hook will simply return 0 values, ensuring child components don't risk adding safe area padding multiple times
  • We have a lot of screens that work like this:
<ScreenWrapper>
<FormProvider>
....

Earlier the bottom safe area inset was handled by the FormProvider. This has shifted now to <ScreenWrapper>, so we changed a lot of to enable the inset: <ScreenWrapper includeSafeAreaPaddingBottom /> (where before it was false)

  • Two reasons for this:
  1. Its hard to understand how the safe area handling of a screen is working if its nested deep down in its children
  2. FormProvider shows a button at the bottom. If the button adds the paddingBottom space for the safe area, and you open the keyboard, the safe area spacing will be visible between the keyboard and the button, creating too much space. Thus the parent screen should add the paddingBottom
  • There are ways to get around this using verticalKeyboardOffset but that greatly complicates the code

Future

  • We deprecated useSafeAreaBottomInset and SafeAreaConsumer in this PR. We want to look into all of their usages carefully and eventually remove them entirely
  • From now on, when building new features, the developer should first try to use ScreenWrapper's includeSafeAreaPaddingBottom prop. If they need to customize the behaviour they should use useSafeAreaBottomInset
  • A good example for a custom behaviour is when your screen renders a ScrollView where you want the content to be underneath the status bar as well in this case you would apply the padding to the content of the list:
const { safeAreaPaddingBottomStyle } = useSafeAreaBottomInset()

<ScreenWrapper includeSafeAreaPaddingBottom={false}>
<ScrollView contentContainerStyle={safeAreaPaddingBottomStyle}>

Fixed Issues

$ #53183
$ #53207
$ #53217
$ #53221
$ #53192
PROPOSAL: N/A

Tests

  1. Verify that [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] Web - Expense - Submit button on confirmation page has extra bottom margin #53161 is not reproducible
  2. Verify that [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] Android - Video - Video controls are too close to the device navigation buttons #53215 is not reproducible
  3. Verify that [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] Android - LHN - Extra space at the bottom of LHN #53205 is not reproducible
  4. Verify that bottom/top padding works in the same way as current staging app

Offline tests

N/A

QA Steps

  1. Verify that [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] Web - Expense - Submit button on confirmation page has extra bottom margin #53161 is not reproducible
  2. Verify that [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] Android - Video - Video controls are too close to the device navigation buttons #53215 is not reproducible
  3. Verify that [HOLD for payment 2024-12-07] [HOLD for payment 2024-12-05] Android - LHN - Extra space at the bottom of LHN #53205 is not reproducible
  4. Verify that bottom/top padding works in the same way as current staging app

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
telegram-cloud-document-2-5354803205601516843.mp4
Android: mWeb Chrome
telegram-cloud-document-2-5354803205601516836.mp4
iOS: Native
new-insets-trimmed.mp4
iOS: mWeb Safari
ScreenRecording_11-29-2024.6-27-34.PM_1.MP4
MacOS: Chrome / Safari image image
MacOS: Desktop image image

@hannojg
Copy link
Contributor

hannojg commented Nov 28, 2024

stepping out quickly, will wrap that PR up in a few hours!

Copy link
Contributor

🚧 @mountiny has triggered a test build. You can view the workflow run here.

@mountiny mountiny marked this pull request as ready for review November 28, 2024 23:07
@mountiny mountiny requested a review from a team as a code owner November 28, 2024 23:07
@melvin-bot melvin-bot bot requested a review from lakchote November 28, 2024 23:07
Copy link

melvin-bot bot commented Nov 28, 2024

@lakchote 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]

@melvin-bot melvin-bot bot removed the request for review from a team November 28, 2024 23:07

This comment has been minimized.

@allroundexperts
Copy link
Contributor

BUG

Buttons overlapping with the screen

Screenshot 2024-11-29 at 4 48 51 AM

@allroundexperts
Copy link
Contributor

BUG

Abnormally large bottom padding.

Screenshot 2024-11-29 at 4 52 05 AM

@allroundexperts
Copy link
Contributor

BUG

Save button not consistent across screens

Screen.Recording.2024-11-29.at.4.53.45.AM.mov

@allroundexperts
Copy link
Contributor

BUG

Buttons overlapping here as well.

Screenshot 2024-11-29 at 4 56 32 AM

@kirillzyusko
Copy link
Contributor Author

Abnormally large bottom padding.

Fixed in 9901700

@kirillzyusko
Copy link
Contributor Author

Alright, I believe this PR is ready for another round of review 😊

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 29, 2024

Снимок экрана 2024-11-29 в 19 43 57 Снимок экрана 2024-11-29 в 19 43 25

I found a small bug
I'm not sure which version is correct (But looks like the year screen is wrong )
But the padding at the bottom of the year and time zone screen are slightly different

@kirillzyusko
Copy link
Contributor Author

But looks like the year screen is wrong

Fixed @ZhenjaHorbach ❤️

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 29, 2024

Workspace list screen
The same thing

Снимок экрана 2024-11-29 в 19 53 25

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 29, 2024

One more

2024-11-29.20.26.56.mov
2024-11-29.20.28.11.mov

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 29, 2024

@mountiny
As for me the changes look good !
I can fill out the checklist
Or is it better to wait for @allroundexperts to additionally made a double checking from his side ?

@mountiny
Copy link
Contributor

@ZhenjaHorbach @allroundexperts please add the checklist whoever is ready and we can merge this one

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 30, 2024

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

https://drive.google.com/drive/folders/1wfbYDmllorbgSoFgr3_MF3vpWcMrh4r2?usp=sharing

Android: mWeb Chrome

https://drive.google.com/drive/folders/1iBHleN7bEogGbCSwsaD_6JJgRATYsBqS?usp=sharing

iOS: Native

https://drive.google.com/drive/folders/1wfbYDmllorbgSoFgr3_MF3vpWcMrh4r2?usp=sharing

iOS: mWeb Safari

https://drive.google.com/drive/folders/1iBHleN7bEogGbCSwsaD_6JJgRATYsBqS?usp=sharing

MacOS: Chrome / Safari

https://drive.google.com/drive/folders/1rXHvup-hIdAYDQU8mtL8dUaqFkO_BrOK?usp=sharing

MacOS: Desktop

https://drive.google.com/drive/folders/1rXHvup-hIdAYDQU8mtL8dUaqFkO_BrOK?usp=sharing

@Expensify Expensify deleted a comment from allroundexperts Nov 30, 2024
@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 30, 2024

We have some eslint issues
But the issues are related to withOnyx

so LGTM !

@mountiny
Copy link
Contributor

Merge conflicts

@mountiny
Copy link
Contributor

ESLint failing because of the useOnyx so that is fine on such PR

From https://github.com/Expensify/App
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main

> new.expensify@[9](https://github.com/Expensify/App/actions/runs/12098304413/job/33734621362?pr=53250#step:4:10).0.69-1 lint-changed
> NODE_OPTIONS=--max_old_space_size=8192 eslint --max-warnings=0 --config ./.eslintrc.changed.js $(git diff --diff-filter=AM --name-only origin/main HEAD -- "*.ts" "*.tsx")

This is not a desktop build, adding babel-plugin-annotate-react
babel.config.js
  - api.version: 7.24.5
  - api.env: development
  - process.env.NODE_ENV: undefined
  - process.env.BABEL_ENV: undefined
  - running in:  undefined

/home/runner/work/App/App/src/pages/EnablePayments/EnablePaymentsPage.tsx
  95:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/GroupChatNameEditPage.tsx
  120:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/NewChatConfirmPage.tsx
  188:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx
  137:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/TeachersUnite/KnowATeacherPage.tsx
  143:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/iou/request/step/IOURequestStepCurrency.tsx
  93:40  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/iou/request/step/IOURequestStepDate.tsx
  144:36  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/iou/request/step/IOURequestStepDescription.tsx
  176:43  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/iou/request/step/IOURequestStepMerchant.tsx
  147:9  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/iou/request/step/IOURequestStepWaypoint.tsx
  252:9  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/settings/Profile/CustomStatus/SetDatePage.tsx
  84:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx
  225:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/settings/Report/RoomNamePage.tsx
  125:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/tasks/NewTaskDescriptionPage.tsx
  [10](https://github.com/Expensify/App/actions/runs/12098304413/job/33734621362?pr=53250#step:4:11)5:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/tasks/NewTaskDetailsPage.tsx
  [14](https://github.com/Expensify/App/actions/runs/12098304413/job/33734621362?pr=53250#step:4:15)9:16  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

/home/runner/work/App/App/src/pages/tasks/NewTaskTitlePage.tsx
  96:[16](https://github.com/Expensify/App/actions/runs/12098304413/job/33734621362?pr=53250#step:4:17)  error  'withOnyx' is deprecated. Use `useOnyx` instead of `withOnyx` whenever possible.

This is a higher order component that provides the ability to map a state property directly to
something in Onyx (a key/value store). That way, as soon as data in Onyx changes, the state will be set and the view
will automatically change to reflect the new data  deprecation/deprecation

✖ 16 problems (16 errors, 0 warnings)

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

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

One NAB comment, thanks for clearing this up and thanks @allroundexperts and @ZhenjaHorbach for review and testing

<FormElement
key={formID}
ref={formContentRef}
style={[style, safeAreaPaddingBottomStyle.paddingBottom ? safeAreaPaddingBottomStyle : styles.pb5]}
// Note: the paddingBottom is only grater 0 if no parent has applied the inset yet:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Note: the paddingBottom is only grater 0 if no parent has applied the inset yet:
// Note: the paddingBottom is only greater than 0 if no parent has applied the inset yet:

@mountiny mountiny merged commit 3cc88f5 into Expensify:main Nov 30, 2024
16 of 17 checks passed
Copy link

melvin-bot bot commented Nov 30, 2024

@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@mountiny
Copy link
Contributor

Not emergency, I have explained above why the test has been failing

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants