Skip to content
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

Add appearance setting to adjust tab size #17469

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Sep 30, 2023

Closes #15561

Description

  • Previously, tab characters on GitHub Desktop were always rendered at 8 spaces in width, in constrast to the site offering several options for tab size. This PR serves to add that functionality; though, instead of a list of integers, it instead utilizes a TextBox. Any input will be converted to a number and, if valid, clamped between 1 and 16. Much like themes, this setting will update the appearance in realtime

  • Though not strictly required, I'd highly recommend this be added either alongside or sometime after Render tab characters properly in diffs #17428. The current tab display is broken, with values under 5 being erroneously truncated for the first character in a line. As such, the ability to access lower values is likely to display erroneously as-is, and this kind of update would be far better suited for an environment where the functionality is working as expected Merged!

Screenshots

Example taken using #17428

23-09-30.12-42-53.GitHubDesktop-dev.mp4

Release notes

Notes: [New] Allow customizing tab character width in spaces

@sergiou87
Copy link
Member

Thanks @Repiteo ! I was thinking about this when I worked on #17428

I still have to discuss this with the team (adding settings is always controversial, we don't want many), but maybe it'd make more sense to add that setting to this popover:
image

@sergiou87
Copy link
Member

We just talked about this and decided to follow GitHub.com approach (check https://github.com/settings/appearance), so basically what you just did 😄

The main difference is that the default tab size, as with GitHub.com, will be 8.

@Repiteo
Copy link
Contributor Author

Repiteo commented Oct 2, 2023

D'oh! I'm so used to a width of 4 that I made that the default without even thinking lmao. Easy fix though!

@Repiteo Repiteo force-pushed the tab-size-selector branch 2 times, most recently from 14e7160 to 8e4b718 Compare October 6, 2023 15:08
@Repiteo
Copy link
Contributor Author

Repiteo commented Oct 6, 2023

Now that #17428 has been merged, I've rebased the repo so it can be tested as-is

@fabtjar
Copy link

fabtjar commented Jan 17, 2024

I was just about to suggest adding this feature in to match the website settings. Looking forward to using it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab size setting for diffs
3 participants