-
Notifications
You must be signed in to change notification settings - Fork 9.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
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! |
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.
Looks great, just a few notes.
@@ -222,9 +222,31 @@ export interface IRepositoryState { | |||
} | |||
|
|||
export interface IBranchesState { | |||
/** |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
app/src/ui/branches/branch-list.tsx
Outdated
|
||
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.
app/src/ui/lib/filter-list.tsx
Outdated
* selected row is clicked on. | ||
* | ||
* @param selectedItem - The item that was just selected | ||
* @param source - The kind of user action that provoced the change, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
app/src/ui/merge-branch/merge.tsx
Outdated
} | ||
} | ||
|
||
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.
🐨 |
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.
👁🗨
app/src/ui/branches/branch-list.tsx
Outdated
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
AutoSizer
component from react-virtualized in favor of ResizeObserverAutoSizer
failed to provide a correct size when used inside a dialog. The dialog gets mounted in the DOM but doesn't appear until we callshowModal
so 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
.experimentalFeatures
is turned off by going back to using theAutoSizer
.AutoSizer
detects resizes (it injects a tracking element into the DOM).Additionally this removes one layer of nesting on Windows by returning an array from
List#renderContents
instead of wrapping the grid and the fake scroll inside a div.Fixes #749