-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix Edited Line Through Alignment #17781
Changes from 15 commits
f9d3ec3
2e56bd7
11a3777
4fffba5
32627e7
8ea952e
ea026be
74ef8c9
63772da
c5bf385
d977935
5e9687a
83a0173
6e0b118
4d4d79a
a4f096e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,15 @@ const propTypes = { | |
|
||
const EditedRenderer = (props) => { | ||
const defaultRendererProps = _.omit(props, ['TDefaultRenderer', 'style', 'tnode']); | ||
const isPendingDelete = !!props.tnode.attributes.deleted; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NAB: extra blank line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
return ( | ||
<Text | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...defaultRendererProps} | ||
fontSize={variables.fontSizeSmall} | ||
color={themeColors.textSupporting} | ||
style={[styles.alignItemsBaseline, editedLabelStyles]} | ||
style={[editedLabelStyles, isPendingDelete && styles.offlineFeedback.deleted]} | ||
> | ||
{/* Native devices do not support margin between nested text */} | ||
<Text | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ const ReportActionItemFragment = (props) => { | |
// Only render HTML if we have html in the fragment | ||
if (!differByLineBreaksOnly) { | ||
const isPendingDelete = props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && props.network.isOffline; | ||
const editedTag = props.fragment.isEdited ? '<edited></edited>' : ''; | ||
const editedTag = props.fragment.isEdited ? `<edited ${isPendingDelete ? 'deleted="true"' : ''}></edited>` : ''; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NAB: Do we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I've updated to use just the attribute key |
||
const htmlContent = applyStrikethrough(html + editedTag, isPendingDelete); | ||
|
||
return <RenderHTML html={props.source === 'email' ? `<email-comment>${htmlContent}</email-comment>` : `<comment>${htmlContent}</comment>`} />; | ||
|
@@ -125,7 +125,7 @@ const ReportActionItemFragment = (props) => { | |
<Text | ||
fontSize={variables.fontSizeSmall} | ||
color={themeColors.textSupporting} | ||
style={[styles.alignItemsBaseline, editedLabelStyles]} | ||
style={[editedLabelStyles, ...props.style]} | ||
> | ||
<Text | ||
selectable={false} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import display from '../utilities/display'; | ||
import flex from '../utilities/flex'; | ||
|
||
export default {...display.dInlineFlex}; | ||
export default {...display.dInlineFlex, ...flex.alignItemsBaseline}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
Boolean(props.tnode.attributes.deleted);
might be a little clearer. You could also do this inline on line 26 instead of making a separate variable for it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated