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

Update header subtitle styles for thread (child) reports #23621

Merged
merged 9 commits into from
Aug 2, 2023
2 changes: 1 addition & 1 deletion src/components/AvatarWithDisplayName.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function AvatarWithDisplayName(props) {
{!_.isEmpty(parentNavigationSubtitleData) && (
<ParentNavigationSubtitle
parentNavigationSubtitleData={parentNavigationSubtitleData}
report={props.report}
parentReportID={props.report.parentReportID || ''}
grgia marked this conversation as resolved.
Show resolved Hide resolved
/>
)}
{!_.isEmpty(subtitle) && (
Expand Down
9 changes: 4 additions & 5 deletions src/components/ParentNavigationSubtitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import styles from '../styles/styles';
import CONST from '../CONST';
import Text from './Text';
import reportPropTypes from '../pages/reportPropTypes';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Navigation from '../libs/Navigation/Navigation';
import ROUTES from '../ROUTES';
Expand All @@ -18,16 +17,16 @@ const propTypes = {
workspaceName: PropTypes.string,
}).isRequired,

/** report */
report: reportPropTypes,
/** parent Report ID */
parentReportID: PropTypes.string,

/** PressableWithoutFeedack additional styles */
// eslint-disable-next-line react/forbid-prop-types
pressableStyles: PropTypes.arrayOf(PropTypes.object),
};

const defaultProps = {
report: {},
parentReportID: '',
pressableStyles: [],
};

Expand All @@ -39,7 +38,7 @@ function ParentNavigationSubtitle(props) {
return (
<PressableWithoutFeedback
onPress={() => {
Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID));
Navigation.navigate(ROUTES.getReportRoute(props.parentReportID));
}}
accessibilityLabel={translate('threads.parentNavigationSummary', {rootReportName, workspaceName})}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function HeaderView(props) {
{!_.isEmpty(parentNavigationSubtitleData) && (
<ParentNavigationSubtitle
grgia marked this conversation as resolved.
Show resolved Hide resolved
parentNavigationSubtitleData={parentNavigationSubtitleData}
report={props.report}
parentReportID={props.report.parentReportID || ''}
pressableStyles={[styles.alignSelfStart, styles.mw100]}
/>
)}
Expand Down
Loading