-
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
14893: Edit message arrow up #15207
Merged
Merged
14893: Edit message arrow up #15207
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4ef5645
Moving up the reportActions sorting
gedu 0c821ff
Merge branch 'main' into 14893/edit_message_arrow_up
gedu 0d1f768
Updated props and removed shouldComponentUpdate
gedu 0d91a37
Fixed isPinned
gedu 17dc211
Merge branch 'main' into 14893/edit_message_arrow_up
gedu f54539a
replace local function for utils
gedu 6091178
Merge branch 'main' into 14893/edit_message_arrow_up
gedu e1834f1
removed call to unexisting function
gedu 5ec7c39
added participants check to rerender the report screen component
gedu 8114e7d
removed shouldComponentUpdate and sort the reports on componentDidUpdate
gedu 112ce8a
added the sorted report actions into the state and moved back the sho…
gedu 8118c20
Merge branch 'main' into 14893/edit_message_arrow_up
gedu 9444c98
moved up the getLastClosedAction function to handle archived room rea…
gedu 2b1a943
Changed the sorting to be in Onyx select
gedu 42ce483
ArchivedReportFooter listening directly the reportsAction and getting…
gedu 6784b28
Merge branch 'main' into 14893/edit_message_arrow_up
gedu ab82acd
Updated prop type from reportActions
gedu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,8 @@ import _ from 'underscore'; | |
import PropTypes from 'prop-types'; | ||
import {withOnyx} from 'react-native-onyx'; | ||
import {View, Keyboard} from 'react-native'; | ||
|
||
import CONST from '../../../CONST'; | ||
import ReportActionCompose from './ReportActionCompose'; | ||
import * as ReportUtils from '../../../libs/ReportUtils'; | ||
import SwipeableView from '../../../components/SwipeableView'; | ||
import OfflineIndicator from '../../../components/OfflineIndicator'; | ||
import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; | ||
|
@@ -17,14 +15,14 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../../../componen | |
import styles from '../../../styles/styles'; | ||
import reportActionPropTypes from './reportActionPropTypes'; | ||
import reportPropTypes from '../../reportPropTypes'; | ||
import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; | ||
import * as ReportUtils from '../../../libs/ReportUtils'; | ||
|
||
const propTypes = { | ||
/** Report object for the current report */ | ||
report: reportPropTypes, | ||
|
||
/** Report actions for the current report */ | ||
reportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)), | ||
reportActions: PropTypes.arrayOf(PropTypes.shape(reportActionPropTypes)), | ||
|
||
/** Offline status */ | ||
isOffline: PropTypes.bool.isRequired, | ||
|
@@ -50,7 +48,7 @@ const propTypes = { | |
|
||
const defaultProps = { | ||
report: {reportID: '0'}, | ||
reportActions: {}, | ||
reportActions: [], | ||
onSubmitComment: () => {}, | ||
errors: {}, | ||
pendingAction: null, | ||
|
@@ -68,18 +66,15 @@ class ReportFooter extends React.Component { | |
|
||
render() { | ||
const isArchivedRoom = ReportUtils.isArchivedRoom(this.props.report); | ||
let reportClosedAction; | ||
if (isArchivedRoom) { | ||
reportClosedAction = ReportActionsUtils.getLastClosedReportAction(this.props.reportActions); | ||
} | ||
const hideComposer = isArchivedRoom || !_.isEmpty(this.props.errors); | ||
|
||
return ( | ||
<> | ||
{(isArchivedRoom || hideComposer) && ( | ||
<View style={[styles.chatFooter, this.props.isSmallScreenWidth ? styles.mb5 : null]}> | ||
{isArchivedRoom && ( | ||
<ArchivedReportFooter | ||
reportClosedAction={reportClosedAction} | ||
reportClosedAction={this.props.reportClosedAction} | ||
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. We don't need this anymore 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. Thanks, created a PR here #15687 |
||
report={this.props.report} | ||
/> | ||
)} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This PR caused this regression #16324 because the
getLastClosedReportAction
has been returningundefined
which in turn did not get swapped for the defaultProps