-
Notifications
You must be signed in to change notification settings - Fork 26
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
Opening sidebar should not displace main content #300
Conversation
Apply Sweep Rules to your PR?
|
Can you please rebase this on |
d00e6d5
to
7265d64
Compare
Just rebased and pushed the squashed commit. |
Some general comments:
![]()
@tarasglek what's your opinion of this? Do you care if the sidebar is persistent? Overlaps content vs. sits beside it? |
|
@humphd If this doesn't work well, we can only apply this behavior on smaller breakpoints where content gets squished. I noticed that ChatGPT also does the same way. |
I showed this to some users, and a few want to know if it can be made so you can pin it open. By default it can close, but some people want the side bar open all the time. Should be a pref with UI to allow changing it. |
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.
I'm confused. I pulled this locally and tried it but the animation still plays on load, there's no way to pin it. Am I looking at the wrong thing somehow?
I'm on faa2c87
@humphd seems to work fine for me. Edit: Also, checked in Github Codespaces The only scenario when the animation plays on load is when the sidebar is meant to be opened, which was more of a feature from my perspective. I made sure that there is no redundant close animation when the sidebar is meant to be closed on load. |
OK, I completely missed that new icon, which is a bad sign. I think we need to do some more work on this. Here's an example of how a lot of drawers, which support open/close states, work: https://sparkmailapp.com/help/tips-tricks/new-expanded-sidebar. Here are some suggestions for next steps here:
Another example: GitHub's file tree (closed vs. open) ![]() ![]() I also don't think we should animate it when hitting the breakpoint as the window expands. If it fits all of a sudden, and you want to show it, do that, but don't draw attention to it. |
Just made some changes based on the feedback. 1. I replaced the hamburger icon with sidebar icons as suggested. 2. I tried to relocate the pin sidebar icon so users can easily find it. To make the purpose of the button clearer, I have replaced the native title property with Tooltip from Chakra. I am not sure if that's the best place to put it, if you can think of a better location please let me know. 3. For sidebar open animation, it is an edge case that only occurs when you pin the sidebar open on larger screen, close it on the smaller screen and then try to resize to a larger window again. In any case, this is a pretty rare occurence and shouldn't bother users much as a user would typically work on the same screen size. Please let me know what you think about this. |
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.
@Amnish04 I tested the functionalities in browser. Have not looked at the code.
The functionalities work as you described (side bar now overlaps the main program rather than pushing it to the right; sidebar can be pinned)
However I am not sure if this will benefit users that are using a narrower browser screen, since they won't be able to type to ChatCraft unless they minimize the sidebar, whereas previously they were able to. (see screenshot showing production behaviour and behaviour of this PR). Require input from admins on this @humphd @tarasglek
The problem with Mobile View is that everything gets squished to a very small width, which is not a very good UX. |
@Amnish04 I know that chatcraft production and chatgpt all don't handle very small screen sizes well (less than width 774px approx~) when the sidebar is out, but for browser width such as 774px (this is an approximation) or more chatcraft prod and chatgpt is still useable with the sidebar out. |
79f6ebc
to
bc8b12a
Compare
@kliu57 I was also thinking about that. Maybe we should just do the overlap behaviour for mobile screens. The desktop behaviour can stay the same, except the pin sidebar feature would be an addition. |
Opening sidebar should not displace main content Add sidebar animations Add box shadow to sidebar
bc8b12a
to
9787aa7
Compare
9787aa7
to
ade5dcd
Compare
Continued in #437 |
@humphd
I spent a while to figure out a solution that requires least amount of changes to the existing structure.
I have made the following changes:
Please let me know if any changes are required.
Fixes #299