-
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
add comment to explain scroll to bottom #13518
Conversation
@@ -298,6 +298,9 @@ class ReportActionsView extends React.Component { | |||
Report.readOldestAction(this.props.report.reportID, oldestActionSequenceNumber); | |||
} | |||
|
|||
/** | |||
* Scrolls down to the bottom of the chat when the new messages dialog is clicked. |
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.
Just to clarify, are we planning to alter this behavior in the future?
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 don't really think this change is needed. It won't really prevent anyone from changing anything if they are determined to do so.
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.
Also we should not say where a function will be used in a comment. It could be used in multiple places and you can search to see where it is actually used.
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.
Yeah that makes sense - I just added a use case since I saw it done in the comment below it but yeah new use cases could be made for that method. I think that it just adds another layer that someone would have to make to change this behavior and would be more easily caught since it's a comment which is clearer than a method name. I also don't think the change has any drawbacks but if you don't think it's necessary at all, I can close out this PR.
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.
And I'm not sure @MariaHCD, I was talking to Marc about this last week and understood that we're trying to implement bidirectional scrolling which would help in situations like this but I'm not sure if we have plans to change the functionality of when someone clicks "New Messages"
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.
Personally, I think we should close this. We have no way of knowing whether this comment will help avoid any future or past situation. The content can also be extracted by looking at the method name and then looking at where it's used.
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.
Yeah you're right, that makes sense so I'll close out this PR 👍🏾
Details
Add comment to explain that the chat is supposed to scroll to the bottom once new messages is clicked and not to the last unread message. Most methods around it also have comments explaining the method so would be similar
Fixed Issues
$ N/A (Should I create an issue for just adding a comment?)
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
N/A
Mobile Web - Chrome
N/A
Mobile Web - Safari
N/A
Desktop
N/A
iOS
N/A
Android
N/A