CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

✨ Snap Sidebar To Width

Open austincondiff opened this issue 3 years ago • 6 comments

Describe the solution you'd like

Snap the sidebar at a specific width. Xcode snaps to 270 we should follow suit.

When below this snapped width, the sidebar dock icons condense.

In Finder, when the sidebar snaps to a width, the user gets subtle haptic feedback to reinforce what happened.

Video Demo

https://user-images.githubusercontent.com/806104/201810793-a4a02d92-4612-4c4f-a808-dcc4d6d15d1d.mov

austincondiff avatar Nov 15 '22 02:11 austincondiff

I'd like to take this issue.

yapryntsev avatar Dec 30 '22 15:12 yapryntsev

@yapryntsev thx! Assigned it to you!

lukepistrol avatar Dec 30 '22 15:12 lukepistrol

I need a couple of clarifications:

  1. Current implementation sets minimumThickness at 260. If we snapped at 270, the way between 270 and 260 feels slightly laggy. Should we decrease the lower boundary a bit?
  2. Currently sidebar dock icons are perfectly fit because minimumThickness is 260. Is space between icons should increase when the width is more than 270? If so, by what value does it increase?

yapryntsev avatar Dec 30 '22 16:12 yapryntsev

  1. Xcode’s minimum width seems to be 242. Let’s go with that.
  2. Xcode reduces icon spacing to 9px when width is less than the snap (< 270). image When width is 270 and above the spacing is normal at 15px. image

It also seems like our icons are stretch (not proportioned correctly) we may need to set the aspect ratio to fit. Screenshot 2022-12-30 at 10 51 49 AM

austincondiff avatar Dec 30 '22 16:12 austincondiff

@austincondiff close this issue as we merged the PR for it!

bombardier200 avatar Jan 05 '23 20:01 bombardier200

@yapryntsev please have a look at the following comment regarding failing tests introduced in PR #882:

  • https://github.com/CodeEditApp/CodeEdit/pull/882#issuecomment-1378172709

lukepistrol avatar Jan 11 '23 02:01 lukepistrol