Repository navigation
Preferences redesign - #8813
Preferences redesign#8813
Conversation
|
For when y'all get back from the holidays... 🙏 @ampinsk would love a design review from you! Feel free to make modifications as you see fit (commits are welcome!) @tierninho would appreciate your QA on this! |
|
@ampinsk is it desired/expected to have that salmon background color for the merge tool section? It's from a |
@kuychaco That style is one we used to apply in the early days when designs were not finalized yet. @joshaber dubbed it "pink brutalism" and the thinking was that by applying that style a developer could trigger something deep and unsettling within myself or @donokuda and said discomfort would result in us springing into action and finalizing the actual designs before anyone else would see the abhorrent injustice afflicted on the otherwise perfect piece of design that was the Desktop app. In this case the merge tool selection is behind a dev feature flag because we never ended up shipping it. At some point it might be a good idea to unship all of #2802 since it's been superseded by the in-app conflict resolution work. |
Poppin' in here to say that the plan backfired and I ended up embracing pink brutalism 😍 |
There was a problem hiding this comment.
Here are my test results on this feature:
- No way to tab up/down the menu items
- Padding here looks very narrow between the button and bottom of the window. Maybe add some?

- Selecting the "Always stash on current branch" option fails to warn the user if a stash is already on that branch.
- On multiple occasions, the "Always stash on current branch" option resulted in losing the stashed files. After files were stashed, I selected a few other branches and came back to branch with stashed files and no where to be found.
- Overall the stashing updates were not working correctly. I select "ask me" option, then on the first attempt it asks me, but second it attempt it does not -- the changes are brought over without the prompt due to a protected branch.
- Line is not the same width

Bloopin' in here to say that @donokuda is a creative genius without equal in this world. |
Co-Authored-By: evelyn masso <[email protected]>
|
Thank you @kuychaco this is looking so good! 💕 A couple of tiny things I noticed that I wasn't sure how to fix on my own: In this screenshot:
In this screenshot:
Let me know if you want to pair on any of this! ✨ |
Co-Authored-By: evelyn masso <[email protected]>
Co-Authored-By: evelyn masso <[email protected]>
Co-Authored-By: Amanda Pinsker <[email protected]>
Co-Authored-By: evelyn masso <[email protected]> Co-Authored-By: Amanda Pinsker <[email protected]>
|
Okay! Styling fixes complete! Thanks @outofambit and @ampinsk for your great input 🙏 @ampinsk how does this look for the Advanced section... we can pair if you want to further tweak the spacing. Or you can make changes to the values I used in 5bbc79d
Otherwise I think this is ready for a full code review! /cc @outofambit |
|
That spacing looks great!! Just one last thing I noticed from your screenshot is the non-selected icons should be gray 😄 Otherwise this seems ready to go! |
Co-Authored-By: Amanda Pinsker <[email protected]>
outofambit
left a comment
There was a problem hiding this comment.
left some initial thoughts, mostly around types. still need to review the .tsx files more closely.
|
|
||
| const strategy = localStorage.getItem( | ||
| uncommittedChangesStrategyKindKey | ||
| ) as UncommittedChangesStrategyKind |
There was a problem hiding this comment.
I'd really like to avoid using as here, though I'm not sure of a good alternative approach yet. localStorage.getItem can return undefined if the given key doesn't exist, and this implementation tells the compiler that 'undefined' is a valid UncommittedChangesStrategyKind, which will result in runtime errors.
| if (hasChanges) { | ||
| if (uncommittedChangesStrategy.kind === askToStash.kind) { | ||
| this._showPopup({ | ||
| type: PopupType.StashAndSwitchBranch, | ||
| branchToCheckout: foundBranch, | ||
| repository, | ||
| }) | ||
| return repository | ||
| } |
| export function getUncommittedChangesStrategy( | ||
| kind: UncommittedChangesStrategyKind | ||
| ) { | ||
| switch (kind) { | ||
| case UncommittedChangesStrategyKind.AskForConfirmation: | ||
| return askToStash | ||
| case UncommittedChangesStrategyKind.MoveToNewBranch: | ||
| return moveToNewBranch | ||
| case UncommittedChangesStrategyKind.StashOnCurrentBranch: | ||
| return stashOnCurrentBranch | ||
| default: | ||
| return assertNever( | ||
| kind, | ||
| `Unknown UncommittedChangesStrategyKind: ${kind}` | ||
| ) | ||
| } | ||
| } |
There was a problem hiding this comment.
I have some concerns about this function, but I think the core of my concern is that it took me a while to figure out what it was doing. Perhaps documenting this to clarify that its primary purpose is to map a kind to an actual UncommittedChangesStrategy?
It feels to me like there's a simpler version of this overall approach, but I'm not sure what it is yet...Is the main reason this exists so that we can store an UncommittedChangesStrategyKind in AppState and convert it to an UncommittedChangesStrategy whenever we use it? perhaps we could store the result of this function in AppState and avoid doing this conversion in many places?
outofambit
left a comment
There was a problem hiding this comment.
a few more comments, nothing non-blocking. react components and styling look good to me!
|
|
||
| readonly selectedUncommittedChangesStrategy: UncommittedChangesStrategy | ||
|
|
||
| readonly hasChangesAndStash: boolean |
There was a problem hiding this comment.
non-blocking idea for a maybe more legible name:
| readonly hasChangesAndStash: boolean | |
| readonly couldOverwriteStash: boolean |
| (type === TabBarType.Switch | ||
| ? 'switch' | ||
| : type === TabBarType.Vertical | ||
| ? 'vertical' | ||
| : 'tabs') |
There was a problem hiding this comment.
would be nice to pull this out into a little switch...case with an assertNever, but not a big deal. (non-blocking)
|
|
||
| readonly selectedUncommittedChangesStrategy: UncommittedChangesStrategy | ||
|
|
||
| readonly hasChangesAndStash: boolean |
There was a problem hiding this comment.
same thing as above regarding variable name
useful for getting values out of local storage Co-Authored-By: Katrina Uychaco <[email protected]>
Co-Authored-By: Katrina Uychaco <[email protected]>
Co-Authored-By: Katrina Uychaco <[email protected]>
Co-Authored-By: evelyn masso <[email protected]>





Closes #8774
Closes #7746
Description
From @ampinsk
This PR implements the new preference, as well as the redesign of the preferences pane.
Screenshots
Before: Tab design

After: Sidebar design
Release notes
Notes: Redesign preferences pane and add preference for stashing changes when switching branches.