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

[Cleanup] Adjusting Company Switcher Per New Design #2330

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

Civolilah
Copy link
Collaborator

@Civolilah Civolilah commented Jan 26, 2025

@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:

Screenshot 2025-01-29 at 18 57 41

Let me know your thoughts.

@Civolilah Civolilah marked this pull request as ready for review January 29, 2025 18:06
@Civolilah
Copy link
Collaborator Author

@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.

@turbo124
Copy link
Member

turbo124 commented Jan 29, 2025

After minimising the sidebar, how do we re-expand it? cc @beganovich

ok I found it:

image

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

image

I think this is related to the API call for updating the react_settings for this, we should not need to await this.

@Civolilah
Copy link
Collaborator Author

After minimising the sidebar, how do we re-expand it? cc @beganovich

ok I found it:

image

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

image

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) {
Copy link
Collaborator Author

@Civolilah Civolilah Jan 30, 2025

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
Copy link
Member

image

both change buttons need to be in the same location to keep the UX consistent, place them both in the footer section.

@Civolilah
Copy link
Collaborator Author

image

both change buttons need to be in the same location to keep the UX consistent, place them both in the footer section.

@turbo124 Ah, sure thing! It has been replaced!

@turbo124
Copy link
Member

image

If no company logo present we should a character, can we please ensure this sizes proportionately to fill the circle.

@Civolilah
Copy link
Collaborator Author

Civolilah commented Jan 31, 2025

image

If no company logo present we should a character, can we please ensure this sizes proportionately to fill the circle.

@turbo124 Sure thing, the font size in avatars has been increased. Screenshot:

Screenshot 2025-01-31 at 18 39 04

Let me know your thoughts.

@beganovich
Copy link
Member

This doesn't look that good imho. Can we make icons smaller and do some spacing to see how it looks?

image

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

Successfully merging this pull request may close these issues.

3 participants