-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Cleanup] Adjusting Company Switcher Per New Design #2330
base: develop
Are you sure you want to change the base?
[Cleanup] Adjusting Company Switcher Per New Design #2330
Conversation
@turbo124 The only color I used from Figma is for the icons of add_company, logout, and other actions. It looks really great to me in both light and dark mode - better than any other from the color scheme. All other colors are used from the existing scheme. |
After minimising the sidebar, how do we re-expand it? cc @beganovich ok I found it: Problem. it is not very intuitive for me (perhaps we need to relocate this to bottom so that it is always in context. Also, i note a huge delay when clicking to reopen the sidebar I think this is related to the API call for updating the react_settings for this, we should not need to await this. |
@turbo124 The icon has been replaced and the expanding/collapsing sidebar speed has been improved. Let me now your thoughts. |
@@ -31,7 +31,7 @@ export function useInjectUserChanges(options?: Options) { | |||
const changes = useUserChanges(); | |||
|
|||
useEffect(() => { | |||
if (changes && options?.overwrite === false) { |
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.
@beganovich I don't think this ever worked correctly. David reported that the speed of collapsing/expanding sidebar is really slow - the reason for that is exactly this logic. The changes object is constantly being injected again because this if statement is almost never true.
By default, the changes object used in this if statement is an empty object ({}), it is never null/undefined. So, that part of the condition is always true, while the second part is equal to false only if the overwrite is passed through options. So, instead of comparing types also, we just want to check if the overwrite is set to true.
The overwrite is never passed as a true value, but also I don't think we ever need to overwrite changes over the changes we currently have.
The same thing applies to useInjectCompanyChange
- the overwrite never passes the check that is false.
@turbo124 Ah, sure thing! It has been replaced! |
@turbo124 Sure thing, the font size in avatars has been increased. Screenshot: Let me know your thoughts. |
@beganovich @turbo124 The PR includes the redesign of the company switcher using the existing color scheme and font sizes but with a new design. Screenshot:
Let me know your thoughts.