-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Virtualize AccordianList to resolve performance issues with many dbs/schemas/tables/fields #6324
Conversation
…section titles and avoid hard coding row heights
@metabase/core-developers This is almost ready, and it's worth giving a try now. The only remaining issue I'm aware of is that because |
…nentName/:exampleName routes
…o support virtualized AccordianList which requires an explicit height
@metabase/core-developers Alright, I've fixed the remaining known issues. Please review. |
7afffa7
to
6ec9cc0
Compare
@salsakran Ah yes, I forgot to enable the |
6ec9cc0
to
db39950
Compare
seems to work pretty well for me! |
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.
Couple tiny code things we should probably clean up before merging but overall seems reasonable. Dig the addition of examples. 👍
I'd also really love it if we could get at least a couple unit tests onto AccordianList since there's some pretty intense logic going on in there.
const element = this.refs.selected && ReactDOM.findDOMNode(this.refs.selected); | ||
if (element && element.scrollIntoView && !elementIsInView(element)) { | ||
element.scrollIntoView(); | ||
this._forceUpdateList(); |
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.
Would be nice to have a note here about why this is needed.
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.
Done.
@@ -164,91 +198,151 @@ export default class AccordianList extends Component { | |||
return this.props.getItemClasses && this.props.getItemClasses(item, itemIndex); | |||
} | |||
|
|||
renderSectionHeader(section, sectionIndex) { |
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.
Would probably be good to remove this if it's not called anywhere (doesn't look like it is).
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.
Done.
…x error due to ListSearchField trying to focus after virtualized row is unmounted
@kdoh Thanks, made those changes and added some unit tests. @metabase/core-developers Anyone else want to review the code? |
TODO
maxHeight
is propagated to all instances of<AccordianList>
DataSelector
FieldList
nested directly insidePopover
:BreakoutWidget
FieldWidget
BreakoutPopover
AggregationPopover
FilterPopover