Skip to content

Commit b01b63e

Browse files
TASK: Render hover color for node items
1 parent 5f97f07 commit b01b63e

File tree

6 files changed

+47
-13
lines changed

6 files changed

+47
-13
lines changed

Resources/Private/FlatNav/src/FlatNav.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default class FlatNav extends Component {
117117
if (isHidden) {
118118
return (
119119
<span className="fa-layers fa-fw">
120-
<Icon icon={nodeTypeIcon} />
120+
<Icon icon={nodeTypeIcon} className={style.baseIcon} />
121121
<Icon icon="circle" color="error" transform="shrink-3 down-6 right-4" />
122122
<Icon icon="times" transform="shrink-7 down-6 right-4" />
123123
</span>
@@ -127,15 +127,15 @@ export default class FlatNav extends Component {
127127
if (isHiddenBefore || isHiddenAfter) {
128128
return (
129129
<span className="fa-layers fa-fw">
130-
<Icon icon={nodeTypeIcon} />
130+
<Icon icon={nodeTypeIcon} className={style.baseIcon} />
131131
<Icon icon="circle" color="primaryBlue" transform="shrink-5 down-6 right-4" />
132132
<Icon icon="clock" transform="shrink-9 down-6 right-4" />
133133
</span>
134134
);
135135
}
136136

137137
return (
138-
<Icon icon={nodeTypeIcon} />
138+
<Icon icon={nodeTypeIcon} className={style.baseIcon} />
139139
);
140140
}
141141

Resources/Private/FlatNav/src/style.modules.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
.panel {
1515
height: 100%;
16+
overflow-y: hidden;
1617
}
1718

1819
.toolbar {
@@ -53,18 +54,29 @@
5354
border-bottom: 1px solid var(--colors-ContrastDark);
5455
}
5556

57+
.treeWrapper {
58+
flex-grow: 1;
59+
padding: 5px 0;
60+
}
61+
5662
.pageTreeToolbarOriginal :is(div) {
5763
border-top: 0;
5864
}
5965

6066
.node {
6167
display: flex;
6268
overflow: hidden;
63-
white-space: nowrap;
64-
text-overflow: ellipsis;
6569
width: 100%;
6670
padding: 3px 6px;
6771
cursor: pointer;
72+
73+
&:hover {
74+
.nodeIconWrapper,
75+
.nodeIconWrapper svg.baseIcon,
76+
.nodeLabel {
77+
color: var(--colors-PrimaryBlueHover);
78+
}
79+
}
6880
}
6981

7082
.nodeIconWrapper {

Resources/Public/JavaScript/FlatNav/Plugin.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
.style-modules__tabsContent_gGud6a__ {
77
height: calc(100% - 41px);
88
}
9-
.style-modules__tabsPanel_gGud6a__,
9+
.style-modules__tabsPanel_gGud6a__ {
10+
height: 100%;
11+
}
1012
.style-modules__panel_gGud6a__ {
1113
height: 100%;
14+
overflow-y: hidden;
1215
}
1316
.style-modules__toolbar_gGud6a__ {
1417
background-color: var(--colors-ContrastDarker);
@@ -44,18 +47,25 @@
4447
height: 100%;
4548
display: flex;
4649
}
50+
.style-modules__treeWrapper_gGud6a__ {
51+
flex-grow: 1;
52+
padding: 5px 0;
53+
}
4754
.style-modules__pageTreeToolbarOriginal_gGud6a__ :is(div) {
4855
border-top: 0;
4956
}
5057
.style-modules__node_gGud6a__ {
51-
white-space: nowrap;
52-
text-overflow: ellipsis;
5358
cursor: pointer;
5459
width: 100%;
5560
padding: 3px 6px;
5661
display: flex;
5762
overflow: hidden;
5863
}
64+
.style-modules__node_gGud6a__:hover .style-modules__nodeIconWrapper_gGud6a__,
65+
.style-modules__node_gGud6a__:hover .style-modules__nodeIconWrapper_gGud6a__ svg.style-modules__baseIcon_gGud6a__,
66+
.style-modules__node_gGud6a__:hover .style-modules__nodeLabel_gGud6a__ {
67+
color: var(--colors-PrimaryBlueHover);
68+
}
5969
.style-modules__nodeIconWrapper_gGud6a__ {
6070
text-align: center;
6171
width: 2em;

Resources/Public/JavaScript/FlatNav/Plugin.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,11 @@
298298
});
299299

300300
// src/style.modules.css
301-
var loadMoreButton, node, nodeDirty, nodeFocused, nodeIconWrapper, nodeLabel, nodeRemoved, pageTreeContainer, pageTreeToolbarOriginal, panel, tabsContent, tabsPanel, toolbar, toolbarButtons, toolbarSearch, toolbarSearchClearButton, toolbarSearchInput, toolbarSearchNoResults, style_modules_default;
301+
var baseIcon, loadMoreButton, node, nodeDirty, nodeFocused, nodeIconWrapper, nodeLabel, nodeRemoved, pageTreeContainer, pageTreeToolbarOriginal, panel, tabsContent, tabsPanel, toolbar, toolbarButtons, toolbarSearch, toolbarSearchClearButton, toolbarSearchInput, toolbarSearchNoResults, treeWrapper, style_modules_default;
302302
var init_style_modules = __esm({
303303
"src/style.modules.css"() {
304304
init_();
305+
baseIcon = "style-modules__baseIcon_gGud6a__";
305306
loadMoreButton = "style-modules__loadMoreButton_gGud6a__";
306307
node = "style-modules__node_gGud6a__";
307308
nodeDirty = "style-modules__nodeDirty_gGud6a__";
@@ -320,7 +321,9 @@
320321
toolbarSearchClearButton = "style-modules__toolbarSearchClearButton_gGud6a__";
321322
toolbarSearchInput = "style-modules__toolbarSearchInput_gGud6a__";
322323
toolbarSearchNoResults = "style-modules__toolbarSearchNoResults_gGud6a__";
324+
treeWrapper = "style-modules__treeWrapper_gGud6a__";
323325
style_modules_default = {
326+
"baseIcon": baseIcon,
324327
"loadMoreButton": loadMoreButton,
325328
"node": node,
326329
"nodeDirty": nodeDirty,
@@ -338,7 +341,8 @@
338341
"toolbarSearch": toolbarSearch,
339342
"toolbarSearchClearButton": toolbarSearchClearButton,
340343
"toolbarSearchInput": toolbarSearchInput,
341-
"toolbarSearchNoResults": toolbarSearchNoResults
344+
"toolbarSearchNoResults": toolbarSearchNoResults,
345+
"treeWrapper": treeWrapper
342346
};
343347
}
344348
});
@@ -524,12 +528,12 @@
524528
const isHiddenAfter = node2?.properties?._hiddenAfterDateTime;
525529
const nodeTypeIcon = nodeType?.ui?.icon;
526530
if (isHidden) {
527-
return /* @__PURE__ */ import_react5.default.createElement("span", { className: "fa-layers fa-fw" }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: nodeTypeIcon }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "circle", color: "error", transform: "shrink-3 down-6 right-4" }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "times", transform: "shrink-7 down-6 right-4" }));
531+
return /* @__PURE__ */ import_react5.default.createElement("span", { className: "fa-layers fa-fw" }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: nodeTypeIcon, className: style_modules_default.baseIcon }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "circle", color: "error", transform: "shrink-3 down-6 right-4" }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "times", transform: "shrink-7 down-6 right-4" }));
528532
}
529533
if (isHiddenBefore || isHiddenAfter) {
530-
return /* @__PURE__ */ import_react5.default.createElement("span", { className: "fa-layers fa-fw" }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: nodeTypeIcon }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "circle", color: "primaryBlue", transform: "shrink-5 down-6 right-4" }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "clock", transform: "shrink-9 down-6 right-4" }));
534+
return /* @__PURE__ */ import_react5.default.createElement("span", { className: "fa-layers fa-fw" }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: nodeTypeIcon, className: style_modules_default.baseIcon }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "circle", color: "primaryBlue", transform: "shrink-5 down-6 right-4" }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: "clock", transform: "shrink-9 down-6 right-4" }));
531535
}
532-
return /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: nodeTypeIcon });
536+
return /* @__PURE__ */ import_react5.default.createElement(import_react_ui_components5.Icon, { icon: nodeTypeIcon, className: style_modules_default.baseIcon });
533537
}
534538
render() {
535539
const { focused, nodes, isLoadingReferenceNodePath, isLoading, preset, isAllowedToAddChildOrSiblingNodes, canBeDeleted, canBeEdited } = this.props;

Resources/Public/JavaScript/FlatNav/src/style.modules.css.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export declare const baseIcon: string;
12
export declare const loadMoreButton: string;
23
export declare const node: string;
34
export declare const nodeDirty: string;
@@ -16,8 +17,10 @@ export declare const toolbarSearch: string;
1617
export declare const toolbarSearchClearButton: string;
1718
export declare const toolbarSearchInput: string;
1819
export declare const toolbarSearchNoResults: string;
20+
export declare const treeWrapper: string;
1921

2022
declare const ClassNames: {
23+
"baseIcon": string;
2124
"loadMoreButton": string;
2225
"node": string;
2326
"nodeDirty": string;
@@ -36,5 +39,6 @@ declare const ClassNames: {
3639
"toolbarSearchClearButton": string;
3740
"toolbarSearchInput": string;
3841
"toolbarSearchNoResults": string;
42+
"treeWrapper": string;
3943
};
4044
export default ClassNames;

Resources/Public/JavaScript/FlatNav/src/style.modules.d.css.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export declare const baseIcon: string;
12
export declare const loadMoreButton: string;
23
export declare const node: string;
34
export declare const nodeDirty: string;
@@ -16,8 +17,10 @@ export declare const toolbarSearch: string;
1617
export declare const toolbarSearchClearButton: string;
1718
export declare const toolbarSearchInput: string;
1819
export declare const toolbarSearchNoResults: string;
20+
export declare const treeWrapper: string;
1921

2022
declare const ClassNames: {
23+
"baseIcon": string;
2124
"loadMoreButton": string;
2225
"node": string;
2326
"nodeDirty": string;
@@ -36,5 +39,6 @@ declare const ClassNames: {
3639
"toolbarSearchClearButton": string;
3740
"toolbarSearchInput": string;
3841
"toolbarSearchNoResults": string;
42+
"treeWrapper": string;
3943
};
4044
export default ClassNames;

0 commit comments

Comments
 (0)