Skip to content

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

Closed

Description

@iwiznia

Problem

In this PR #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

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    ImprovementItem broken or needs improvement.
    on Sep 30, 2022
  2. melvin-bot commented on Sep 30, 2022

    @melvin-bot

    Triggered auto assignment to @MitchExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  3. melvin-bot commented on Sep 30, 2022

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 30, 2022
  5. melvin-bot commented on Sep 30, 2022

    @melvin-bot

    Triggered auto assignment to @sketchydroide (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  6. changed the title [-]Ensure the page not found error message is properly centered in the chat view[/-] [+][$250] Ensure the page not found error message is properly centered in the chat view[/+] on Sep 30, 2022
  7. dhairyasenjaliya commented on Sep 30, 2022

    @dhairyasenjaliya
    Contributor

    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

    <View style={styles.flex1}>
    <BlockingView
    icon={Expensicons.QuestionMark}
    title={props.translate(props.titleKey)}
    subtitle={props.translate(props.subtitleKey)}
    />
    </View>

    Result

    Web
    Fix

    M-web

    iPhone

    Drawer

    With Fix
    fix

    Without fix (current code)
    issue

  8. krishnemd commented on Oct 1, 2022

    @krishnemd

    Proposal:

    Cause : With reference to View, BlockingView is centered but with presence of HeaderWithCloseButton BlockingView is not centered wrt to the page.
    Solution:
    We can enforce centerStyle wrapper that will center any component with respect to the browser DOM despite the associated components. Such wrapper can come handy in later stages of development too.

    Wrapper Style:

        centerStyle: {
            position: 'absolute',
            left: '50%',
            top: '50%',
            transform: 'translate(-50%, -50%)',
        },
    
    

    Add this style to View Component as

    <View style={[styles.flex1, styles.centerStyle]}>

    Before the wrapper:

    Screen Shot 2022-10-01 at 12 29 06

    After the wrapper:

    Screen Shot 2022-10-01 at 12 28 58

  9. 14 remaining items

  10. dhairyasenjaliya commented on Oct 4, 2022

    @dhairyasenjaliya
    Contributor

    will create PR soon :)

  11. dhairyasenjaliya commented on Oct 5, 2022

    @dhairyasenjaliya
    Contributor

    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

  12. eVoloshchak commented on Oct 5, 2022

    @eVoloshchak
    Contributor

    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 #10452 contains the necessary steps

  13. dhairyasenjaliya commented on Oct 5, 2022

    @dhairyasenjaliya
    Contributor

    QA steps updated thank you,PR ready for review :) @eVoloshchak

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 13, 2022
  15. melvin-bot commented on Oct 13, 2022

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.13-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2022-10-20. 🎊

  16. changed the title [-][$250] Ensure the page not found error message is properly centered in the chat view[/-] [+][HOLD for payment 2022-10-20] [$250] Ensure the page not found error message is properly centered in the chat view[/+] on Oct 13, 2022
  17. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 19, 2022
  18. MitchExpensify commented on Oct 20, 2022

    @MitchExpensify
    Contributor
  19. MitchExpensify commented on Oct 20, 2022

    @MitchExpensify
    Contributor

    Paid all!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions