Merge pull request #280 from matrix-org/rav/gemini_no_relayout

Don't relayout scrollpanels every time something changes
This commit is contained in:
Richard van der Hoff 2016-04-20 12:32:15 +01:00
commit e18e5f1425
6 changed files with 22 additions and 11 deletions

View File

@ -35,7 +35,7 @@
"q": "^1.4.1", "q": "^1.4.1",
"react": "^15.0.1", "react": "^15.0.1",
"react-dom": "^15.0.1", "react-dom": "^15.0.1",
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#4707b88", "react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#6f5336c",
"sanitize-html": "^1.11.1", "sanitize-html": "^1.11.1",
"velocity-animate": "^1.2.3", "velocity-animate": "^1.2.3",
"velocity-ui-pack": "^1.2.2" "velocity-ui-pack": "^1.2.2"

View File

@ -540,6 +540,7 @@ module.exports = React.createClass({
// it's not obvious why we have a separate div and ol anyway. // it's not obvious why we have a separate div and ol anyway.
return (<GeminiScrollbar autoshow={true} ref="geminiPanel" return (<GeminiScrollbar autoshow={true} ref="geminiPanel"
onScroll={this.onScroll} onResize={this.onResize} onScroll={this.onScroll} onResize={this.onResize}
relayoutOnUpdate={false}
className={this.props.className} style={this.props.style}> className={this.props.className} style={this.props.style}>
<div className="mx_RoomView_messageListWrapper"> <div className="mx_RoomView_messageListWrapper">
<ol ref="itemlist" className="mx_RoomView_MessageList" aria-live="polite"> <ol ref="itemlist" className="mx_RoomView_MessageList" aria-live="polite">

View File

@ -342,7 +342,9 @@ module.exports = React.createClass({
<div className="mx_UserSettings"> <div className="mx_UserSettings">
<SimpleRoomHeader title="Settings" onCancelClick={ this.props.onClose }/> <SimpleRoomHeader title="Settings" onCancelClick={ this.props.onClose }/>
<GeminiScrollbar className="mx_UserSettings_body" autoshow={true}> <GeminiScrollbar className="mx_UserSettings_body"
relayoutOnUpdate={false}
autoshow={true}>
<h3>Profile</h3> <h3>Profile</h3>

View File

@ -521,7 +521,9 @@ module.exports = React.createClass({
return ( return (
<div className="mx_MemberList"> <div className="mx_MemberList">
{inviteMemberListSection} {inviteMemberListSection}
<GeminiScrollbar autoshow={true} className="mx_MemberList_joined mx_MemberList_outerWrapper"> <GeminiScrollbar autoshow={true}
relayoutOnUpdate={false}
className="mx_MemberList_joined mx_MemberList_outerWrapper">
<TruncatedList className="mx_MemberList_wrapper" truncateAt={this.state.truncateAt} <TruncatedList className="mx_MemberList_wrapper" truncateAt={this.state.truncateAt}
createOverflowElement={this._createOverflowTile}> createOverflowElement={this._createOverflowTile}>
{this.makeMemberTiles('join', this.state.searchQuery)} {this.makeMemberTiles('join', this.state.searchQuery)}

View File

@ -324,7 +324,9 @@ module.exports = React.createClass({
var self = this; var self = this;
return ( return (
<GeminiScrollbar className="mx_RoomList_scrollbar" autoshow={true} onScroll={ self._repositionTooltips } ref="gemscroll"> <GeminiScrollbar className="mx_RoomList_scrollbar"
relayoutOnUpdate={false}
autoshow={true} onScroll={ self._repositionTooltips } ref="gemscroll">
<div className="mx_RoomList"> <div className="mx_RoomList">
<RoomSubList list={ self.state.lists['im.vector.fake.invite'] } <RoomSubList list={ self.state.lists['im.vector.fake.invite'] }
label="Invites" label="Invites"

View File

@ -162,9 +162,13 @@ var SearchableEntityList = React.createClass({
</div> </div>
); );
} }
list = <GeminiScrollbar autoshow={true} className="mx_SearchableEntityList_listWrapper"> list = (
<GeminiScrollbar autoshow={true}
relayoutOnUpdate={false}
className="mx_SearchableEntityList_listWrapper">
{ list } { list }
</GeminiScrollbar>; </GeminiScrollbar>
);
} }
return ( return (