Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

[MM-35922] Fixed a couple style issues with the sidebar category headers on drag #8157

Merged
merged 4 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/sidebar/sidebar_category_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ export const SidebarCategoryHeader = React.forwardRef((props: Props, ref?: React
<div
className={classNames('SidebarChannelGroupHeader', {
muted: props.muted,
dragging: props.isDragging,
})}
>
<button
ref={ref}
className={classNames('SidebarChannelGroupHeader_groupButton', {
dragging: props.isDragging,
})}
className={classNames('SidebarChannelGroupHeader_groupButton')}
aria-label={props.displayName}
onClick={props.onClick}
>
Expand Down
29 changes: 13 additions & 16 deletions sass/layout/_sidebar-left.scss
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,21 @@
opacity: 0.4;
}
}

&.dragging {
border-radius: 4px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
color: var(--sidebar-text);

.SidebarChannelGroupHeader_groupButton {
border-radius: 4px;
}
}
}

.SidebarChannelGroup:not(.autoSortedCategory) .draggingOver .SidebarChannelGroupHeader:hover {
box-shadow: inset -1px 0 0 rgba(var(--sidebar-text-rgb), 0.60), inset 0 -1px 0 rgba(var(--sidebar-text-rgb), 0.6), inset 1px 0 0 rgba(var(--sidebar-text-rgb), 0.6), inset 0 1px 0 rgba(var(--sidebar-text-rgb), 0.6);
border-radius: 4px;

.SidebarChannelGroupHeader_groupButton {
background-color: inherit;
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not entirely sure why this was added, but removing it makes sure that the issues with the border go away.

}
}

.SidebarChannelGroupHeader_groupButton {
Expand All @@ -634,7 +640,7 @@
text-align: left;
border: none;
color: rgba(var(--sidebar-text-rgb), 0.6);
background-color: var(--sidebar-bg);
background-color: transparent;
top: 0;
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.33);
transition: box-shadow 0.25s ease-in-out;
Expand All @@ -656,12 +662,6 @@
padding-left: 16px;
}

&.dragging {
border-radius: 4px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
color: var(--sidebar-text);
}

i.icon-chevron-down {
max-width: 16px;

Expand Down Expand Up @@ -748,11 +748,8 @@

.SidebarChannelGroupHeader {
background-color: var(--sidebar-bg);

.SidebarChannelGroupHeader_groupButton {
border-radius: 4px 4px 0 0;
box-shadow: inset -1px 0 0 rgba(var(--sidebar-text-rgb), 0.6), inset 1px 0 0 rgba(var(--sidebar-text-rgb), 0.6), inset 0 1px 0 rgba(var(--sidebar-text-rgb), 0.6);
}
border-radius: 4px 4px 0 0;
box-shadow: inset -1px 0 0 rgba(var(--sidebar-text-rgb), 0.6), inset 1px 0 0 rgba(var(--sidebar-text-rgb), 0.6), inset 0 1px 0 rgba(var(--sidebar-text-rgb), 0.6);
}
}

Expand Down