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

Fixing issue of scroll paddings in Navigation Drawer #9138

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const MainNavigationDrawerItems = () => {
contextProviderName="navigationDrawer"
componentInstanceId={`scroll-wrapper-navigation-drawer`}
defaultEnableXScroll={false}
scrollHide={true}
>
<NavigationDrawerOpenedSection />
<CurrentWorkspaceMemberFavoritesFolders />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,16 @@ const StyledItem = styled('button', {
padding-right: ${({ theme }) => theme.spacing(0.5)};
padding-top: ${({ theme }) => theme.spacing(1)};

margin-top: ${({ indentationLevel }) =>
indentationLevel === 2 ? '2px' : '0'};
margin-top: ${({ indentationLevel, theme }) =>
indentationLevel === 2 ? theme.spacing(0.5) : '0'};

pointer-events: ${(props) => (props.soon ? 'none' : 'auto')};

width: ${(props) =>
!props.isNavigationDrawerExpanded
? `${NAV_DRAWER_WIDTHS.menu.desktop.collapsed - 24}px`
: '100%'};
: `${NAV_DRAWER_WIDTHS.menu.desktop.expanded - 34}px`};

${({ isDragging }) =>
isDragging &&
`
Expand All @@ -115,13 +116,19 @@ const StyledItemElementsContainer = styled.span`
align-items: center;
display: flex;
gap: ${({ theme }) => theme.spacing(2)};
min-width: 0;
width: 100%;

& > span:nth-of-type(1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-wrap: break-word;
}
`;

const StyledItemLabel = styled.span`
font-weight: ${({ theme }) => theme.font.weight.medium};
text-overflow: ellipsis;
white-space: nowrap;
`;

const StyledItemCount = styled.span`
Expand Down Expand Up @@ -251,7 +258,7 @@ export const NavigationDrawerItem = ({
<StyledItemLabel>{label}</StyledItemLabel>
</NavigationDrawerAnimatedCollapseWrapper>

<StyledSpacer />
{(soon || count || keyboard || rightOptions) && <StyledSpacer />}

{soon && (
<NavigationDrawerAnimatedCollapseWrapper>
Expand All @@ -272,8 +279,9 @@ export const NavigationDrawerItem = ({
</StyledKeyBoardShortcut>
</NavigationDrawerAnimatedCollapseWrapper>
)}
<NavigationDrawerAnimatedCollapseWrapper>
{rightOptions && (

{rightOptions && (
<NavigationDrawerAnimatedCollapseWrapper>
<StyledRightOptionsContainer
isMobile={isMobile}
active={active || false}
Expand All @@ -284,8 +292,8 @@ export const NavigationDrawerItem = ({
>
{rightOptions}
</StyledRightOptionsContainer>
)}
</NavigationDrawerAnimatedCollapseWrapper>
</NavigationDrawerAnimatedCollapseWrapper>
)}
</StyledItemElementsContainer>
</StyledItem>
</StyledNavigationDrawerItemContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const StyledTitle = styled.div`
padding-right: ${({ theme }) => theme.spacing(0.5)};
padding-top: ${({ theme }) => theme.spacing(1)};
padding-bottom: ${({ theme }) => theme.spacing(1)};
margin-right: ${({ theme }) => theme.spacing(2.5)};
justify-content: space-between;

&:hover {
Expand Down
Loading