Skip to content

Commit d4f18b9

Browse files
committed
Merge pull request #9726 from elsamaryv/fix-dashboard-ui
Fix CSS class name conflict in VM snapshot component affecting dashboard layout
2 parents 5ead27e + cb8f9af commit d4f18b9

File tree

3 files changed

+67
-69
lines changed

3 files changed

+67
-69
lines changed

app/javascript/components/vm-snapshot-tree-select/snapshot-tree.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const SnapshotTree = ({ nodes, setCurrentSnapshot }) => {
119119

120120
return (
121121
<div>
122-
<div className="checkbox">
122+
<div className="vm-snapshot-tree">
123123
<TreeView
124124
data={treeData}
125125
aria-label="Single select"
Lines changed: 64 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,108 @@
1-
.snapshot-details-div {
2-
.snapshot-details {
3-
margin-left: 30px;
4-
margin-bottom: 20px;
5-
}
6-
7-
.snapshot-detail-title {
8-
width: 80px;
9-
justify-content: right;
10-
display: inline-flex;
11-
margin-right: 30px;
12-
}
1+
.snapshot-details-div .snapshot-details {
2+
margin-left: 30px;
3+
margin-bottom: 20px;
4+
}
135

14-
.snapshot-detail-value {
15-
display: inline-flex;
16-
}
17-
}
6+
.snapshot-details-div .snapshot-detail-title {
7+
width: 80px;
8+
justify-content: right;
9+
display: inline-flex;
10+
margin-right: 30px;
11+
}
1812

19-
.snapshot-tree-title {
20-
font-size: 20px;
21-
padding-left: 20px;
22-
padding-top: 40px;
23-
}
13+
.snapshot-details-div .snapshot-detail-value {
14+
display: inline-flex;
15+
}
2416

25-
.no-snapshots-message {
26-
padding-left: 20px;
27-
}
17+
.snapshot-tree-title {
18+
font-size: 20px;
19+
padding-left: 20px;
20+
padding-top: 40px;
21+
}
2822

29-
.checkbox {
30-
font-size: 16px;
31-
user-select: none;
32-
min-height: 320px;
33-
padding: 20px;
34-
box-sizing: content-box;
35-
}
36-
37-
.selected-snapshot {
38-
background-color: #0f62fe;
39-
color: white;
40-
width: 100%;
41-
margin-left: 0px;
42-
pointer-events: none;
23+
.no-snapshots-message {
24+
padding-left: 20px;
25+
}
4326

44-
.arrow-div {
45-
pointer-events: all;
46-
}
27+
.vm-snapshot-tree {
28+
font-size: 16px;
29+
user-select: none;
30+
min-height: 320px;
31+
padding: 20px;
32+
box-sizing: content-box;
33+
}
4734

48-
span {
49-
pointer-events: all;
50-
}
51-
}
35+
.selected-snapshot {
36+
background-color: #0f62fe;
37+
color: white;
38+
width: 100%;
39+
margin-left: 0px;
40+
pointer-events: none;
41+
}
5242

53-
.arrow-div {
54-
display: inline-flex;
55-
margin-right: 5px;
56-
}
43+
.selected-snapshot .arrow-div {
44+
pointer-events: all;
45+
}
5746

58-
.node-icon-div {
59-
margin-right: 5px;
60-
display: inline-flex;
61-
}
47+
.selected-snapshot span {
48+
pointer-events: all;
49+
}
50+
51+
.arrow-div {
52+
display: inline-flex;
53+
margin-right: 5px;
54+
}
55+
56+
.node-icon-div {
57+
margin-right: 5px;
58+
display: inline-flex;
59+
}
6260

63-
.checkbox .tree,
64-
.checkbox .tree-node,
65-
.checkbox .tree-node-group {
61+
.vm-snapshot-tree .tree,
62+
.vm-snapshot-tree .tree-node,
63+
.vm-snapshot-tree .tree-node-group {
6664
list-style: none;
6765
margin: 0;
6866
padding: 0;
6967
}
7068

71-
.checkbox .tree-branch-wrapper,
72-
.checkbox .tree-node__leaf {
69+
.vm-snapshot-tree .tree-branch-wrapper,
70+
.vm-snapshot-tree .tree-node__leaf {
7371
outline: none;
7472
}
7573

76-
.checkbox .tree-node {
74+
.vm-snapshot-tree .tree-node {
7775
cursor: pointer;
7876
}
7977

80-
.checkbox .tree-node .name:hover {
78+
.vm-snapshot-tree .tree-node .name:hover {
8179
background: rgba(0, 0, 0, 0.1);
8280
}
8381

84-
.checkbox .tree-node--focused .name {
82+
.vm-snapshot-tree .tree-node--focused .name {
8583
background: rgba(0, 0, 0, 0.2);
8684
}
8785

88-
.checkbox .tree-node {
86+
.vm-snapshot-tree .tree-node {
8987
display: inline-block;
9088
}
9189

92-
.checkbox .checkbox-icon {
90+
.vm-snapshot-tree .checkbox-icon {
9391
margin: 0 5px;
9492
vertical-align: middle;
9593
}
9694

97-
.checkbox button {
95+
.vm-snapshot-tree button {
9896
border: none;
9997
background: transparent;
10098
cursor: pointer;
10199
}
102100

103-
.checkbox .arrow {
101+
.vm-snapshot-tree .arrow {
104102
margin-left: 5px;
105103
vertical-align: middle;
106104
}
107105

108-
.checkbox .arrow--open {
106+
.vm-snapshot-tree .arrow--open {
109107
transform: rotate(90deg);
110108
}

app/javascript/spec/vm-snapshot-tree/__snapshots__/vm-snapshot-tree.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`VM Snaspthot Tree Select should render snapshot tree 1`] = `
44
<div>
55
<div
6-
className="checkbox"
6+
className="vm-snapshot-tree"
77
>
88
<ForwardRef
99
aria-label="Single select"
@@ -138,7 +138,7 @@ exports[`VM Snaspthot Tree Select should submit select API call 1`] = `
138138
>
139139
<div>
140140
<div
141-
className="checkbox"
141+
className="vm-snapshot-tree"
142142
>
143143
<ForwardRef
144144
aria-label="Single select"

0 commit comments

Comments
 (0)