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

[IMPROVE] Sidebar icons margins #22498

Merged
merged 8 commits into from
Jul 7, 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
18 changes: 10 additions & 8 deletions client/sidebar/Item/Condensed.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ const Condensed = ({
<Sidebar.Item {...props} href={href} clickable={!!href}>
{avatar && <Sidebar.Item.Avatar>{avatar}</Sidebar.Item.Avatar>}
<Sidebar.Item.Content>
{icon}
<Sidebar.Item.Title
data-qa='sidebar-item-title'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{title}
</Sidebar.Item.Title>
{badges}
<Sidebar.Item.Wrapper>
{icon}
<Sidebar.Item.Title
data-qa='sidebar-item-title'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{title}
</Sidebar.Item.Title>
</Sidebar.Item.Wrapper>
{badges && <Sidebar.Item.Badge>{badges}</Sidebar.Item.Badge>}
{menu && (
<Sidebar.Item.Menu {...handleMenuEvent}>
{menuVisibility ? (
Expand Down
60 changes: 32 additions & 28 deletions client/sidebar/Item/Extended.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,38 @@ const Extended = ({
>
{avatar && <Sidebar.Item.Avatar>{avatar}</Sidebar.Item.Avatar>}
<Sidebar.Item.Content>
<Sidebar.Item.Wrapper>
{icon}
<Sidebar.Item.Title
data-qa='sidebar-item-title'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{title}
</Sidebar.Item.Title>
{time && <Sidebar.Item.Time>{formatDate(time)}</Sidebar.Item.Time>}
</Sidebar.Item.Wrapper>
<Sidebar.Item.Wrapper>
<Sidebar.Item.Subtitle
tabIndex='-1'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{subtitle}
</Sidebar.Item.Subtitle>
<Sidebar.Item.Badge>{badges}</Sidebar.Item.Badge>
{menu && (
<Sidebar.Item.Menu {...handleMenuEvent}>
{menuVisibility ? (
menu()
) : (
<ActionButton square ghost mini rcx-sidebar-item__menu icon='kebab' />
)}
</Sidebar.Item.Menu>
)}
</Sidebar.Item.Wrapper>
<Sidebar.Item.Content>
<Sidebar.Item.Wrapper>
{icon}
<Sidebar.Item.Title
data-qa='sidebar-item-title'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{title}
</Sidebar.Item.Title>
{time && <Sidebar.Item.Time>{formatDate(time)}</Sidebar.Item.Time>}
</Sidebar.Item.Wrapper>
</Sidebar.Item.Content>
<Sidebar.Item.Content>
<Sidebar.Item.Wrapper>
<Sidebar.Item.Subtitle
tabIndex='-1'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{subtitle}
</Sidebar.Item.Subtitle>
<Sidebar.Item.Badge>{badges}</Sidebar.Item.Badge>
{menu && (
<Sidebar.Item.Menu {...handleMenuEvent}>
{menuVisibility ? (
menu()
) : (
<ActionButton square ghost mini rcx-sidebar-item__menu icon='kebab' />
)}
</Sidebar.Item.Menu>
)}
</Sidebar.Item.Wrapper>
</Sidebar.Item.Content>
</Sidebar.Item.Content>
{actions && (
<Sidebar.Item.Container>
Expand Down
18 changes: 10 additions & 8 deletions client/sidebar/Item/Medium.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ const Medium = ({
<Sidebar.Item {...props} href={href} clickable={!!href}>
{avatar && <Sidebar.Item.Avatar>{avatar}</Sidebar.Item.Avatar>}
<Sidebar.Item.Content>
{icon}
<Sidebar.Item.Title
data-qa='sidebar-item-title'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{title}
</Sidebar.Item.Title>
{badges}
<Sidebar.Item.Wrapper>
{icon}
<Sidebar.Item.Title
data-qa='sidebar-item-title'
className={unread && 'rcx-sidebar-item--highlighted'}
>
{title}
</Sidebar.Item.Title>
</Sidebar.Item.Wrapper>
{badges && <Sidebar.Item.Badge>{badges}</Sidebar.Item.Badge>}
{menu && (
<Sidebar.Item.Menu {...handleMenuEvent}>
{menuVisibility ? (
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"@rocket.chat/apps-engine": "1.27.1",
"@rocket.chat/css-in-js": "^0.27.0",
"@rocket.chat/emitter": "^0.27.0",
"@rocket.chat/fuselage": "^0.27.0",
"@rocket.chat/fuselage": "^0.6.3-dev.288",
"@rocket.chat/fuselage-hooks": "^0.27.0",
"@rocket.chat/fuselage-polyfills": "^0.27.0",
"@rocket.chat/fuselage-tokens": "^0.27.0",
Expand Down