-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-05-15] HIGH: [Polish] [$500] Redesign thread ancestry #36752
Comments
Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext. |
Job added to Upwork: https://www.upwork.com/jobs/~01c49e505032aeb5f6 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
ProposalPlease 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:
We will:
|
ProposalPlease 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?
to do this, we should remove the current thread separator that is displayed below every ancestors here: App/src/pages/home/report/ReportActionItemParentAction.tsx Lines 86 to 96 in 91ea979
and add a blue "thread" link with a thread divider line above every ancestor <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>
onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor?.report?.parentReportID ?? ''))}
threadDividerText: {
fontFamily: FontUtils.fontFamily.platform.EXP_NEUE,
fontSize: variables.fontSizeSmall,
textTransform: 'capitalize',
},
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>
We should use localization function for "Thread" and "Replies" messages. We can refactor the code into reusable components. ResultThreads.Redesign.Recording.2024-03-05.174204.mp4What alternative solutions did you explore? (Optional)N/A |
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: This look right to you |
That looks right to me, thanks for laying it out like that! |
Triggered auto assignment to @dylanexpensify ( |
@aimane-chnaif can you please review the proposals above? |
Nice nice, thanks Matt! |
@aimane-chnaif what's the holdup -- what are the next steps and when will they get done? |
Ah this is weekly so missed from my radar. 2 proposals to review. will update on Monday |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
New Features default to |
ProposalPlease re-state the problem that we are trying to solve in this issue.Redesign thread ancestry. What is the root cause of that problem?No problem here. This is a new feature. What changes do you think we should make in order to solve the problem?The new thread and replies markers look very similar to the unread message indicator, so I propose refactoring the It also helps with organization and debugging when all related logic is kept together. Here's how we'll go about this.
This icon will be imported in
type UnreadActionIndicatorProps = {
reportActionID: string;
+ isThreadDividerLine?: boolean;
+ isLastThread?: boolean;
+. parentReportID?: string | undefined
}; These will be function UnreadActionIndicator({reportActionID, parentReportID = '', isThreadDividerLine = false, isLastThread = false}: UnreadActionIndicatorProps)
<View style={isThreadDividerLine ? styles.threadDividerLine : styles.unreadIndicatorLine} />
This marker will be stored in a variable below the current two variables already present. const threadDividerChildren = (
<>
<Icon
src={Expensicons.CommentBubbleReply}
fill={isLastThread ? styles.textSupporting.color : styles.link.color}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
additionalStyles={styles.mr1}
/>
<Text style={[styles.unreadIndicatorText, isLastThread ? styles.textSupporting : styles.link]}>{isLastThread ? 'Replies' : 'Thread'}</Text>
</>
);
const threadDivider = isLastThread ? (
<View style={[styles.flexRow, styles.alignItemsCenter]}>{threadDividerChildren}</View>
) : (
<PressableWithoutFeedback
onPress={() => {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(parentReportID));
}}
// Dummy label for now
accessibilityLabel={'Thread marker link'}
role={CONST.ROLE.LINK}
style={[styles.flexRow, styles.alignItemsCenter]}
>
{threadDividerChildren}
</PressableWithoutFeedback>
);
This is what the new code in the <View
// This will require a more generic label like 'MessageLineDivider'
accessibilityLabel={translate('accessibilityHints.newMessageLineIndicator')}
data-action-id={reportActionID}
style={[isThreadDividerLine ? styles.threadDividerLineContainer : styles.unreadIndicatorContainer, styles.userSelectNone, !isThreadDividerLine && styles.pointerEventsNone]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
>
<View style={isThreadDividerLine ? styles.threadDividerLine : styles.unreadIndicatorLine} />
{isThreadDividerLine ? threadDivider : <Text style={styles.unreadIndicatorText}>{translate('common.new')}</Text>}
</View>
The Similarly, we'll conditionally render the now Since we're already mapping through this array, we can use the We'll also pass the outcome of this check to Here's what the code from line 78 in + {allAncestors.map((ancestor, i) => (
<OfflineWithFeedback
// ... props
>
+ <UnreadActionIndicator
+ reportActionID={ancestor.reportAction.reportActionID}
+ isThreadDividerLine={true}
+ parentReportID={ancestor.report.parentReportID}
+ />
<ReportActionItem
- onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.reportID))}
+ onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID))}
// ... props
/>
+ {!shouldHideThreadDividerLine && i === allAncestors.length - 1 && (
+ <UnreadActionIndicator
+ reportActionID={ancestor.report.reportID}
+ isThreadDividerLine={true}
+ isLastThread={i === allAncestors.length - 1}
+ />
)}
threadDividerLineContainer: {
flexDirection: 'row-reverse',
alignItems: 'center',
width: '100%',
paddingHorizontal: 20,
paddingVertical: 4
}, The thread divider line will have a threadDividerLine: {
height: 1,
backgroundColor: theme.border,
flexGrow: 1,
- marginHorizontal: 20,
+ marginLeft: 8,
}, The words 'Replies' and 'Thread' will be translated using the Short demo after changesexpensify-updated-thread-redesign-solution.movWhat alternative solutions did you explore? (Optional)None as of yet. |
All good now. |
Similar |
Looks like 39982 has been deployed. |
Off hold, The PR is merged |
NOICE! |
PR not yet on staging, waiting |
Payment summary:
Please apply/request! |
@dannymcclain, @chiragsalian, @dylanexpensify, @rayane-djouah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
updated to reflect |
payment tomorrow! |
Please correct the payment summary, the payment amount is 500$ not 750$ |
@dannymcclain, @chiragsalian, @dylanexpensify, @rayane-djouah Eep! 4 days overdue now. Issues have feelings too... |
@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 |
@dylanexpensify I trust your judgment on what you find fair. Thanks! |
Not overdue, right @dylanexpensify? |
Nope! Just finishing payments! |
Done! |
$750 approved for @allroundexperts |
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:
Solution:
Make it look more clear! There was a log discussion on this (Slack) ending with this design:
Specifically:
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: