question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Branches button to take up full middle of toolbar because get truncated pretty early

See original GitHub issue

Description

The team I working with has a convention of using branch names that follow this format: [gh-username]/[project-name]/[feature-or-fix-title], which can make for pretty long branch names.

This is especially convenient when scanning a list of branches for your current feature branch, such as in this branches tab of the GitHub.com repository with a search param for our team or project name.

The Desktop experience of working with these longer branches is a little less helpful, however – . specifically when glancing to see which branch I’m currently on, something I do frequently when I have several different feature branches in progress:

image

The truncation kicks in pretty early, so given our convention, I typically don’t even get to see my feature name part of the branch.

Suggestion: a floated Fetch origin button

The solution I’d like to propose is a floated (visual description, not technical implementation advice 😉) Fetch origin button that allows for the branch button (and menu dropdown) to occupy the entire full width of the toolbar. E.g.:

image

This would:

  • allow the full branch name to be displayed for most branches, even longer ones
  • put the Fetch button (which I would assume is the button most frequently clicked in the navbar) in a very familiar primary call to action location
  • open up some extra breathing room in the dropdown to display full branch names there too

There may be some glaring downsides that I’m not considering, too. What might those be?

Not sure how many developers or teams of developers on GH follow a similar pattern of branch naming that produces relatively longer names. Do we have any existing data around average branch name length that might help inform us here?

cc @donokuda @nerdneha

Version

  • GitHub Desktop: Version 1.1.1
  • Operating system: MacOS 10.13.4

Steps to Reproduce

  1. Create a branch with a very long name, for example myusername/myproject/my-new-feature-1
  2. Observe that truncation in the branch button cuts off the branch name after a relatively few amount of characters.

Expected Behavior

I would expect to be able to see the entire branch name.

Actual Behavior

I cannot see the full branch name.

Additional Information

Not applicable.

Logs

Not applicable.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

15reactions
cocco3commented, Oct 4, 2018

This is still a poor user experience to have to hover over everything in a list to find what you’re looking for instead of just being able to quickly scan it.

7reactions
cocco3commented, Nov 20, 2018

Most of my branch names are still truncated, so I didn’t even notice the menu was widened in the latest release 😃

So is there a specific reason to not allow the button and menu taking up available space?

The code below worked great for me. I also resized the app and everything looked ok. (The commented out properties are things that would have to be removed.)

#desktop-app-toolbar .toolbar-dropdown.branch-button {
    /* width: 230px; */
    flex: 1;
}

.branches-container {
    /* width: 350px; */
}

.branches-container .branches-list {
    /* width: 350px; */
}
screen shot 2018-11-19 at 5 47 13 pm
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tried the new UI? Please share your feedback here! - Reddit
I have tried it out in the IntelliJ 2022.2 EAP. Dislikes (mostly dealing with the new look and functionality of the toolbars on...
Read more >
how to achieve vertical (left-side) toolbar + HORIZ button text ?
tab.rotatevertical: If True, will rotate text on the tab so it is readable on vertically- placed tabs. Once again, use the Configuration/Tab Placement...
Read more >
Git Branches popup is displaced : IDEA-237387 - YouTrack
Git menu showing all roots and branches, startable by clicking on bottom right branch name (as shown in first attachment, branch name is...
Read more >
Git log history in Visual Studio 2019 - Stack Overflow
If only one branch is shown without the merge, that's because one of the button in the toolbar to show all the branches...
Read more >
3.1 HTML | bookdown: Authoring Books and Technical ...
Currently we have provided a number of different styles for HTML output: ... The first button on the toolbar can toggle the visibility...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found