App: [HOLD for payment 2022-10-20] [$250] Ensure the page not found error message is properly centered in the chat view

Problem

In this PR https://github.com/Expensify/App/pull/10452 we’ve started using the FullPageNotFoundView component in the chat view. Seems the component is not quite centered: image

Solution

Investigate why (either due to the header or because the centering is optimized for the sidebar) and fix it

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

@dhairyasenjaliya proposal looks good, props for testing on all platforms and all occurrences of FullPageNotFoundView throughout the app

cc: @sketchydroide 🎀👀🎀 C+ reviewed!

Proposal

Cause

  • Currently component is not quite center just because we have two components (HeaderWithCloseButton + BlockingView)
  • As BlockingView is already centered but due to HeaderWithCloseButton component height, combining both components does not get actually centered view

Fix

  • In order to fix centered <BlockingView/> we need to add paddingBottom same height as HeaderWithCloseButton height
  • here in below <View> component we need to add paddingBottom: variables.contentHeaderHeight
  • Eventually, this will fix the center issue inside the drawer as well (currently if <FullPageNotFoundView/> is inside the drawer has also same align issue)
  • we need to create a new style inside styles.js to avoid inline styles

https://github.com/Expensify/App/blob/607f8e936a28a774a600c2185d66da5d9479e88c/src/components/BlockingViews/FullPageNotFoundView.js#L58-L64

Result

Web Fix

M-web

iPhone

Drawer

With Fix fix

Without fix (current code) issue

PR is ready but it needs to have QA steps, bit confused about what steps should I add in order to generate a page not found error can you do you have any suggestions regarding that @eVoloshchak @sketchydroide

I think https://github.com/Expensify/App/pull/10452 contains the necessary steps

will create PR soon 😃

sorry, assigned the wrong person initially, fixed that now, thanks @eVoloshchak, assgined @dhairyasenjaliya