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

fix: sidebar styles refactoring and sidebar light theme #1208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

3em
Copy link
Collaborator

@3em 3em commented Mar 7, 2025

  • fix new app sidebar with design
  • add new light theme to app sidebar

image
image
image
image

@3em 3em requested a review from knagurski as a code owner March 7, 2025 14:21
Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for harness-design ready!

Name Link
🔨 Latest commit 1cf425d
🔍 Latest deploy log https://app.netlify.com/sites/harness-design/deploys/67cb00f515265f0008605e96
😎 Deploy Preview https://deploy-preview-1208--harness-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for harness-xd-review ready!

Name Link
🔨 Latest commit 1cf425d
🔍 Latest deploy log https://app.netlify.com/sites/harness-xd-review/deploys/67cb00f5aa7b69000856b553
😎 Deploy Preview https://deploy-preview-1208--harness-xd-review.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@knagurski knagurski left a 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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')}
Copy link
Collaborator

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?

Suggested change
{t('component:navbar.pin')}
{t('component:navbar.pin', 'Pin')}

@@ -47,48 +47,48 @@ export function CommandPaletteWrapper() {
label: 'Search repositories...',
key: PageKey.REPOSITORIES,
shortcut: ['⇧', 'R'],
Copy link
Collaborator

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" />
Copy link
Collaborator

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?

Suggested change
icon: () => <Icon name="repositories" className="!h-[14px] !w-[14px] text-icons-1" />
icon: () => <Icon name="repositories" size={14} className="text-icons-1" />

Comment on lines +74 to +79
<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
Copy link
Collaborator

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

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}
Copy link
Collaborator

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?

Suggested change
onClick={handleClose}

@@ -8,8 +8,9 @@ const ScrollArea = React.forwardRef<
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & {
viewportClassName?: string
scrollBarClassName?: string
Copy link
Collaborator

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

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?

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

Successfully merging this pull request may close these issues.

2 participants