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

Web - Workspace name overflows when too long on report detail page #22894

Closed
1 of 6 tasks
kbecciv opened this issue Jul 14, 2023 · 6 comments
Closed
1 of 6 tasks

Web - Workspace name overflows when too long on report detail page #22894

kbecciv opened this issue Jul 14, 2023 · 6 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jul 14, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Create a workspace
  2. Update long name workspace
  3. Go #admin room
  4. Click header of room, observed that the workspace name is overflowing

Expected Result:

The name of the workspace is not overflowed

Actual Result:

Workspace name is overflowing

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.40-5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-07-14.at.05.55.37.mov
Recording.3629.mp4

Expensify/Expensify Issue URL:
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689288910992129

View all open jobs on GitHub

@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 14, 2023

Triggered auto assignment to @flaviadefaria (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jul 14, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@kbecciv
Copy link
Author

kbecciv commented Jul 14, 2023

Proposal

by: @namhihi237

Please re-state the problem that we are trying to solve in this issue.

The name of the workspace is not overflowed

What is the root cause of that problem?

We haven't styled it in case the workspace name is too long.

<PressableWithoutFeedback
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
accessibilityLabel={chatRoomSubtitle}
onPress={() => {
Navigation.navigate(ROUTES.getWorkspaceInitialRoute(props.report.policyID));
}}
>
{chatRoomSubtitleText}
</PressableWithoutFeedback>
) : (

What changes do you think we should make in order to solve the problem?

We can do the same WorkspaceInitialPage

<PressableWithoutFeedback
   style={[ styles.w100]}
>
    <Text
        numberOfLines={1}
        style={[styles.alignSelfCenter, styles.pre]}
    >
       {chatRoomSubtitleText}
    </Text>
</PressableWithoutFeedback>

What alternative solutions did you explore? (Optional)

We can show full name and drop line if we need show full

@hungvu193
Copy link
Contributor

hungvu193 commented Jul 14, 2023

actually it's dupe: #19609

@0xZaitsev
Copy link
Contributor

0xZaitsev commented Jul 15, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The issue we're trying to solve involves a parent container with certain styles and a child element with text that goes beyond the boundaries of the parent.

What is the root cause of that problem?

The align-items: center; property aligns the child elements vertically within the parent container along the cross-axis, which in the case of flex-direction: column; is the horizontal axis.

When you remove align-items: center; the default behavior is applied, which is align-items: stretch;. This causes the child elements to stretch horizontally to fill the width of the parent container, including any extra space.

By adding align-items: center;, the child elements are centered along the horizontal axis, and they no longer stretch to fill the parent's width. This can result in the text within the child element extending beyond the parent's boundaries if the text is wider than the available space.

What changes do you think we should make in order to solve the problem?

To prevent the child text from overflowing, you can either remove ...flex.alignItemsCenter here:

App/src/styles/styles.js

Lines 2160 to 2165 in b9508b6

reportDetailsRoomInfo: {
...flex.flex1,
...flex.dFlex,
...flex.flexColumn,
...flex.alignItemsCenter,
},

CleanShot.2023-07-15.at.19.16.42-converted.mp4

@melvin-bot melvin-bot bot added the Overdue label Jul 17, 2023
@flaviadefaria
Copy link
Contributor

Closing as this is a dupe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

4 participants