-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: sidebar styles refactoring and sidebar light theme #1208
base: main
Are you sure you want to change the base?
Conversation
3em
commented
Mar 7, 2025
- fix new app sidebar with design
- add new light theme to app sidebar
✅ Deploy Preview for harness-design ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for harness-xd-review ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Code-wise this looks pretty good, just a few questions and suggestions. I'll approve when the discussion about alignment styling is resolved.
@@ -39,6 +83,8 @@ export const AppViewWrapper: FC<PropsWithChildren<AppViewWrapperProps>> = ({ | |||
setShowSettingsMenu(current => !current) | |||
}, []) | |||
|
|||
console.log(pinnedMenu) |
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.
console.log(pinnedMenu) |
className="text-sidebar-foreground-6 data-[highlighted]:bg-sidebar-background-2 data-[highlighted]:text-sidebar-foreground-1" | ||
onSelect={handlePin} | ||
> | ||
<Text size={2} truncate color="inherit"> | ||
{t('component:navbar.pin')} |
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 know these weren't introduced in this PR, but can we add the fallback values to the calls to t
just to make sure they render nicely when we're mocking the translations stuff?
{t('component:navbar.pin')} | |
{t('component:navbar.pin', 'Pin')} |
@@ -47,48 +47,48 @@ export function CommandPaletteWrapper() { | |||
label: 'Search repositories...', | |||
key: PageKey.REPOSITORIES, | |||
shortcut: ['⇧', 'R'], |
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 know, also not part of this PR, but these things marked up as being shift-R seems really weird 🤔
@@ -47,48 +47,48 @@ export function CommandPaletteWrapper() { | |||
label: 'Search repositories...', | |||
key: PageKey.REPOSITORIES, | |||
shortcut: ['⇧', 'R'], | |||
icon: () => <Icon name="repositories" className="!w-[14px] !h-[14px] text-icons-1" /> | |||
icon: () => <Icon name="repositories" className="!h-[14px] !w-[14px] text-icons-1" /> |
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 wonder why we can't use the standard width/height/size props instead of passing custom classes?
icon: () => <Icon name="repositories" className="!h-[14px] !w-[14px] text-icons-1" /> | |
icon: () => <Icon name="repositories" size={14} className="text-icons-1" /> |
<Text | ||
className={cn('z-10 w-full truncate leading-4 text-foreground-4 duration-0 ease-in-out', { | ||
'text-sidebar-foreground-4': isMainNav | ||
})} | ||
size={1} | ||
truncate |
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.
Do we need both the truncate
prop as well as the truncate
class?
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> | ||
>(({ className, orientation = 'vertical', ...props }, ref) => ( | ||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & { | ||
scrollBarClassName?: string |
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.
Since this is a ScrollBar
it's kinda weird having className
and scrollBarClassName
.
className={cn( | ||
'text-icons-4 hover:text-icons-2 focus:ring-0 focus-visible:outline-none', | ||
closeClassName | ||
)} | ||
variant="custom" | ||
size="icon" | ||
onClick={handleClose} |
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.
Do we still need this if the SheetPrimitive.Close
is using asChild
?
onClick={handleClose} |
@@ -8,8 +8,9 @@ const ScrollArea = React.forwardRef< | |||
React.ElementRef<typeof ScrollAreaPrimitive.Root>, | |||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & { | |||
viewportClassName?: string | |||
scrollBarClassName?: string |
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.
This kinda annoys me. "Scrollbar" is a single word, not two. And this doesn't get applied to the scrollbar, but rather the ScrollAreaThumb
@@ -1750,13 +1790,27 @@ | |||
/* Sidebar */ | |||
--canary-sidebar-background-01: var(--canary-black); | |||
--canary-sidebar-background-02: hsla(var(--canary-grey-50) / 0.1); | |||
--canary-sidebar-background-03: hsla(var(--canary-grey-50) / 0); |
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.
So this just becomes transparent?