Repository navigation
List some branches - #1126
List some branches#1126
Conversation
Obsoleted when expandable foldouts was removed
For some reason this regressed at some point and the only way I could get it to work was by expanding the width some arbitrary amount. At the same time I moved the scrollbar out by 3px so that it wouldn't interfere with the resize handle of a Resizable component
|
I think this is ready for review! |
joshaber
left a comment
There was a problem hiding this comment.
Looks great, just a few notes.
| } | ||
|
|
||
| export interface IBranchesState { | ||
| /** |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| private getGroupLabel(identifier: BranchGroupIdentifier) { | ||
| if (identifier === 'default') { | ||
| return 'Default Branch' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * differs from `onRowSelected`. For example, it won't be called if an already | ||
| * selected row is clicked on. | ||
| * | ||
| * @param selectedItem - The item that was just selected |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| private onItemClick = (item: Branch) => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🐨 |
| const branch = item.branch | ||
| this.props.onItemClick(branch) | ||
| if (this.props.onItemClick) { | ||
| this.props.onItemClick(item.branch) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
In order to make this possible I have
AutoSizercomponent from react-virtualized in favor of ResizeObserverAutoSizerfailed to provide a correct size when used inside a dialog. The dialog gets mounted in the DOM but doesn't appear until we callshowModalso I assume that has something to do with it. Either way, I couldn't get it to work except by holding off on mounting the list until some arbitrary time after we'd calledshowModal.experimentalFeaturesis turned off by going back to using theAutoSizer.AutoSizerdetects resizes (it injects a tracking element into the DOM).Additionally this removes one layer of nesting on Windows by returning an array from
List#renderContentsinstead of wrapping the grid and the fake scroll inside a div.Fixes #749