Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit 1db0625

Browse files
authored
Merge pull request #383 from netdata/bugfix/3049
Reduce spacing of menu items in right bar
2 parents 3351c79 + c666cde commit 1db0625

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netdata/dashboard",
3-
"version": "2.22.5",
3+
"version": "2.22.6",
44
"homepage": ".",
55
"main": "./lib/src/index-npm.js",
66
"files": [

src/domains/charts/menuGroup/menuGroup.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ const Container = styled(Flex)`
2727
&&& {
2828
border-left: 2px solid transparent;
2929
${props => props.active && styledActive}
30-
${props => props.active && `${MenuGroupLabelWrapper} { font-weight: bold; }`}
30+
${props =>
31+
props.active && `${MenuGroupLabelWrapper} { font-weight: bold; }`}
3132
3233
text-decoration: none;
3334
&:hover {
@@ -45,7 +46,7 @@ export const MenuGroupIcon = ({ icon }) => <Icon dangerouslySetInnerHTML={{ __ht
4546
export const MenuGroupIconContainer = withMenuGroup(MenuGroupIcon, ({ icon }) => ({ icon }))
4647

4748
export const MenuGroupItemWrapper = forwardRef(({ id, ...rest }, ref) => (
48-
<Container ref={ref} as="a" gap={2} padding={[1, 5]} data-sidebar-menugroupid={id} {...rest} />
49+
<Container ref={ref} as="a" gap={2} padding={[1, 2]} data-sidebar-menugroupid={id} {...rest} />
4950
))
5051

5152
export const MenuGroupItemContainer = withMenuGroup(MenuGroupItemWrapper, ({ id, link }) => ({

src/domains/charts/subMenu/menuItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const styledActive = css`
1212
const MenuItem = styled(TextSmall).attrs(({ active, id, title, link, children }) => ({
1313
as: "a",
1414
strong: active,
15-
padding: [0.5, 7],
15+
padding: [0.5, 3],
1616
role: "listitem",
1717
children: title || children,
1818
href: `#${link}`,

src/domains/dashboard/components/node-view/node-view.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ $CLOUD_SECONDARY_HEADER_HEIGHT: 64px;
211211

212212
&__sidebar-submenu-li--active {
213213
.node-view__sidebar-link {
214-
padding-left: 28px;
214+
padding-left: 7px;
215215
font-weight: 500;
216216
}
217217
}

src/styles/main.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,20 +172,24 @@ body.modal-open {
172172
/* All levels of nav */
173173
.dashboard-sidebar .nav > li > a {
174174
display: block;
175-
padding: 4px 20px;
175+
padding: 4px 8px;
176176
font-size: 13px;
177177
font-weight: 500;
178178
color: #767676;
179179
}
180180

181+
.dashboard-sidebar .nav > li > .nav > li > a {
182+
padding: 2px 12px;
183+
}
184+
181185
.dashboard-sidebar .nav > li > a > .svg-inline--fa {
182186
width: 20px;
183187
text-align: center;
184188
}
185189

186190
.dashboard-sidebar .nav > li > a:hover,
187191
.dashboard-sidebar .nav > li > a:focus {
188-
padding-left: 19px;
192+
padding-left: 7px;
189193
color: #563d7c;
190194
text-decoration: none;
191195
background-color: transparent;
@@ -195,7 +199,7 @@ body.modal-open {
195199
.dashboard-sidebar .nav > .active > a,
196200
.dashboard-sidebar .nav > .active:hover > a,
197201
.dashboard-sidebar .nav > .active:focus > a {
198-
padding-left: 18px;
202+
padding-left: 6px;
199203
font-weight: bold;
200204
color: #563d7c;
201205
background-color: transparent;
@@ -211,20 +215,19 @@ body.modal-open {
211215
.dashboard-sidebar .nav .nav > li > a {
212216
padding-top: 1px;
213217
padding-bottom: 1px;
214-
padding-left: 30px;
215218
font-size: 12px;
216219
font-weight: normal;
217220
}
218221

219222
.dashboard-sidebar .nav .nav > li > a:hover,
220223
.dashboard-sidebar .nav .nav > li > a:focus {
221-
padding-left: 29px;
224+
padding-left: 11px;
222225
}
223226

224227
.dashboard-sidebar .nav .nav > .active > a,
225228
.dashboard-sidebar .nav .nav > .active:hover > a,
226229
.dashboard-sidebar .nav .nav > .active:focus > a {
227-
padding-left: 28px;
230+
padding-left: 6px;
228231
font-weight: 500;
229232
}
230233

0 commit comments

Comments
 (0)