Skip to content

Commit

Permalink
[IMPROVE] Sidebar icons margins (#22498)
Browse files Browse the repository at this point in the history
* Change components

* Update fuselage

Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
  • Loading branch information
gabriellsh and tassoevan authored Jul 7, 2021
1 parent dc5b544 commit 212636a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 48 deletions.
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

0 comments on commit 212636a

Please sign in to comment.