-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
7b2654c
to
5852bd0
Compare
<div className='post-list__loading post-list__loading-search'> | ||
<FormattedMessage | ||
id='posts_view.maxLoaded' | ||
defaultMessage='Looking for a specific message? Try searching 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.
@sudheerDev you need to add this string to the en.json file
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.
We could consider just removing this logic. MAX_POST_VISIBILITY
is 1000000, and there's no way you'll be able to load or render that many posts in the app anyway
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.
Ya true. Weird on how we even came up with the number on the first place
@@ -126,7 +126,7 @@ export default class PostList extends React.PureComponent { | |||
|
|||
window.addEventListener('resize', this.handleWindowResize); | |||
|
|||
EventEmitter.addListener('scroll_post_list_to_bottom', this.scrollToBottom); | |||
EventEmitter.addListener(EventTypes.POST_LIST_SCROLL_CHANGE, this.scrollToBottom); |
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.
Do these need to be changed to use this.scrollChange
?
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.
Nice catch. Fixed it.
@@ -66,6 +68,12 @@ export default class ReactionList extends React.PureComponent { | |||
} | |||
} | |||
|
|||
componentDidUpdate(prevProps) { | |||
if (this.props.reactions !== prevProps.reactions && disableVirtList()) { |
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.
Do we need to check disableVirtList()
here? If the virtualized post list doesn't respond to scrollPostList
, then it's not really necessary. Then again, this does make it really clear that this can be removed if disableVirtList
is. I'm 0/5 on this either way.
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.
Ya it makes it obvious so i am inclined to leaving the way it is
@hmhealey Assign me for merging this PR. I will be making some changes for perf improvements today. so i want to hold this for another day to see if we can avoid this. |
@sudheerDev perf improvements on IE11? Do you really think is worth the time? Maybe we should move on |
i am not going to spend time on it but just want to get a feeling of how this #2757 and the related react-window PR change performs on IE11. If we can avoid this PR with just adding couple of IE issues because of virt list i think it is an acceptable trade. One reason being we still have to make changes to this logic for bi-directional scrolling to support IE. Related PR's felt really good for me on safari. |
Not sure, to me disabling virtualized post list should also disable bi-directional scroll. |
I think it's fine not to support bi-directional scrolling on IE11 if it ends up being very difficult. We'd need to maintain the old version of permalink view for IE, but it might be easier to do that than to implement two different versions of bi-directional scrolling |
@hmhealey @enahum This open PR #2274 simplifies the old post_list logic so i can still use that with changes for virt list and i think it might work just fine, might even end up with a lot cleaner code. I am not a fan of older post list logic. Most of it is added because of channel sync issue with routing and this change https://github.com/mattermost/mattermost-webapp/pull/2274/files#diff-0ff7df265ab43f5f102437c059a2407eR172 here avoids it |
* Add missing string to en.json * Add logic for scroll corrections when height of textbox changes
This reverts commit 496360e.
Summary
Main changes are adding back old post_list code for fallback to enable older browsers to work without virt_list.
Includes using new event emitter for propagating scroll changes.
Includes new lifecycle methods for scroll corrections.
Ticket Link
https://mattermost.atlassian.net/browse/MM-14975