Skip to content

[HOLD for payment 2024-05-15] HIGH: [Polish] [$500] Redesign thread ancestry #36752

Description

@quinthar

Problem:

Infinite threading means you can get buried deep in a hierarchy and lose track of where you are. We show your ancestors to help with this, but user complaints suggest this isn't enough:

Image

Solution:

Make it look more clear! There was a log discussion on this (Slack) ending with this design:

Image

Specifically:

  • Add a blue "thread" link to each separator line
  • Add a gray "replies" message to the final separator
  • From below - we want the entire message (including the blue thread icon) to be clickable to navigate you to the thread.
  • From below - clicking on an ancestor message should take you to the thread/room where the message originally appeared, not the thread for the message.
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c49e505032aeb5f6
  • Upwork Job ID: 1758664864087191552
  • Last Price Increase: 2024-03-16
  • Automatic offers:
    • aimane-chnaif | Reviewer | 0
    • rayane-djouah | Contributor | 0

Activity

  1. converted this from a draft issue on Feb 17, 2024
  2. melvin-bot commented on Feb 17, 2024

    @melvin-bot

    Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

  3. changed the title [-]HIGH: Redesign thread ancestry[/-] [+][$500] HIGH: Redesign thread ancestry[/+] on Feb 17, 2024
  4. melvin-bot commented on Feb 17, 2024

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 17, 2024
  6. melvin-bot commented on Feb 17, 2024

    @melvin-bot

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

  7. neonbhai commented on Feb 17, 2024

    @neonbhai
    Contributor

    Proposal

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

    Redesign thread ancestr

    What is the root cause of that problem?

    New Feature

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

    We will be modifying the thread divider line here in regards to its ancestors:

    {!ancestor.shouldHideThreadDividerLine && <View style={[styles.threadDividerLine]} />}

    We will:

    • Wrap Text and Icon and Divider line with a view like this:

      <View style={[styles.flexRow, styles.alignItemsCenter, styles.ml5]}>
          <Icon />
          <Text style={[styles.link}>Thread</Text> 
          <View style={[styles.threadDividerLine]} />
      </View>
    • We can put this in a component called ThreadDividerLine

    • Render a divider line before elements here with text Thread

    • Take in index as the second argument when mapping ancestors here:

      {allAncestors.map((ancestor) => (

    • Render a divider line here according to the logic checking for last element:

      {i !== allAncestors.length - 1 ? <ThreadDividerLine text='common.Thread' fill={colors.blue400}/> : <ThreadDividerLine text='common.Replies'/>
    Result

    Icon will have to be requested from the design team

    Screenshot 2024-02-17 at 8 28 02 AM
  8. rayane-d commented on Feb 17, 2024

    @rayane-d
    Contributor

    Proposal

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

    Redesign thread ancestry

    What is the root cause of that problem?

    New Feature

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

    1. Add a blue "thread" link to each separator line

    to do this, we should remove the current thread separator that is displayed below every ancestors here:

    <ReportActionItem
    // @ts-expect-error TODO: Remove this once ReportActionItem (https://github.com/Expensify/App/issues/31982) is migrated to TypeScript.
    onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.reportID))}
    report={ancestor.report}
    action={ancestor.reportAction}
    displayAsGroup={false}
    isMostRecentIOUReportAction={false}
    shouldDisplayNewMarker={ancestor.shouldDisplayNewMarker}
    index={index}
    />
    {!ancestor.shouldHideThreadDividerLine && <View style={[styles.threadDividerLine]} />}

    and add a blue "thread" link with a thread divider line above every ancestor ReportActionItem here, we should add this code:

    <View style={[styles.flexRow, styles.alignItemsCenter, styles.ml5, index === 0 ? styles.mv2 : [styles.mt3, styles.mb1]]}>
        <PressableWithoutFeedback
            onPress={() =>  Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor?.report?.parentReportID ?? ''))}
            accessibilityLabel={"Thread"}
            role={CONST.ROLE.BUTTON}
            style={[styles.flexRow, styles.alignItemsCenter, styles.gap1]}
        >
            <Icon
                src={Expensicons.Thread}
                fill={theme.link}
                width={variables.iconSizeExtraSmall}
                height={variables.iconSizeExtraSmall}
            />
            <Text style={[styles.threadDividerText, styles.link]}>Thread</Text> 
        </PressableWithoutFeedback>
        {!ancestor.shouldDisplayNewMarker && <View style={[styles.threadDividerLine]} />} 
    </View>
    • Thread's divider line should hide when the ancestor item is marked as unread, This is so that they will not be conflicting.
      we will determine if we should display the Thread's divider line with ancestor.shouldDisplayNewMarker, therefore, the ancestor.shouldHideThreadDividerLine will not be needed anymore and we should remove it, here, and here.

    From #36752 (comment) - we want the entire message (including the blue thread icon) to be clickable to navigate you to the thread.
    From #36752 (comment) - clicking on an ancestor message should take you to the thread/room where the message originally appeared, not the thread for the message.

    • we should use PressableWithoutFeedback to make the link clickable.
    • we should pass Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.reportID)) to the PressableWithoutFeedback onPress prop to navigate to the thread on click.
    • we should change the ReportActionItem onPress prop here to:
    onPress={() =>  Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor?.report?.parentReportID ?? ''))}
    • we should use theme.link and styles.link to make the icon and "Thread" text blue.
    • For "Thread" and "Replies" text we should use this style:
    threadDividerText: {
        fontFamily: FontUtils.fontFamily.platform.EXP_NEUE,
        fontSize: variables.fontSizeSmall,
        textTransform: 'capitalize',
    },
    • we should change the threadDividerLine margins to match the design, instead of marginHorizontal: 20, we should use marginLeft: 8, marginRight: 20,
    • we should use ancestor index to apply a 8px vertical margin for the first ancestor, and for others we apply 12px top margin and 4px bottom margin.
    • if we want to display a pointer cursor on the report message, we need to modify the getReportActionItemStyle function here to return styles.cursorPointer in the styles based on a boolean, and we should pass this boolean here as !_.isUndefined(props.onPress) and remove the cursor.cursorAuto style for the message here
    1. Add a gray "replies" message to the final separator

    to do this, after displaying all ancestors here, we should add below them this code:

    <View style={[styles.flexRow, styles.alignItemsCenter, styles.ml5, styles.mv1]}>
        <Icon
            src={Expensicons.Thread}
            fill={theme.icon}
            width={variables.iconSizeExtraSmall}
            height={variables.iconSizeExtraSmall}
        />
        <Text style={[styles.threadDividerText, styles.textSupporting, styles.ml1]}>Replies</Text> 
        {!shouldHideThreadDividerLine && <View style={[styles.threadDividerLine]} />} 
    </View>
    • Thread's divider line should hide when the first item in the current thread is marked as unread, This is so that they will not be conflicting.
    • we should use theme.icon and styles.textSupporting to make the icon and "Replies" text gray.

    We should use localization function for "Thread" and "Replies" messages.

    We can refactor the code into reusable components.

    Compare changes

    Branch link for testing

    Result

    Threads.Redesign.Recording.2024-03-05.174204.mp4

    What alternative solutions did you explore? (Optional)

    N/A

  9. dannymcclain commented on Feb 19, 2024

    @dannymcclain
    Contributor

    Figma file here. cc'ing @Expensify/design on this for visibility.

    And here's one more mockup to show more context around how ancestry works:
    image

    This look right to you @designteam?

  10. 156 remaining items

  11. dylanexpensify commented on May 13, 2024

    @dylanexpensify
    Contributor

    updated to reflect

  12. dylanexpensify commented on May 14, 2024

    @dylanexpensify
    Contributor

    payment tomorrow!

  13. rayane-d commented on May 15, 2024

    @rayane-d
    Contributor

    Please correct the payment summary, the payment amount is 500$ not 750$

  14. melvin-bot commented on May 20, 2024

    @melvin-bot

    @dannymcclain, @chiragsalian, @dylanexpensify, @rayane-djouah Eep! 4 days overdue now. Issues have feelings too...

  15. dylanexpensify commented on May 21, 2024

    @dylanexpensify
    Contributor

    @rayane-djouah we decided $750 given there was a follow on issue created and done that wasn't necessarily needed to solve the bug, but a polish. Does that sound right? cc @chiragsalian

  16. rayane-d commented on May 23, 2024

    @rayane-d
    Contributor

    @dylanexpensify I trust your judgment on what you find fair. Thanks!

  17. dannymcclain commented on May 27, 2024

    @dannymcclain
    Contributor

    Not overdue, right @dylanexpensify?

  18. dylanexpensify commented on May 29, 2024

    @dylanexpensify
    Contributor

    Nope! Just finishing payments!

  19. dylanexpensify commented on May 29, 2024

    @dylanexpensify
    Contributor

    Done!

  20. JmillsExpensify commented on Jun 28, 2024

    @JmillsExpensify
    Contributor

    $750 approved for @allroundexperts

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 productionDailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions