Skip to content

Commit b992c02

Browse files
committed
added dummy styling panel
1 parent ef674e9 commit b992c02

4 files changed

Lines changed: 85 additions & 0 deletions

File tree

src/graph/core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,9 @@ class GraphCoreManager {
899899
case "m":
900900
this.cache.metrics.toggleUI();
901901
break;
902+
case "y":
903+
this.cache.ui.toggleStylingPanel();
904+
break;
902905
default:
903906
break;
904907
}

src/graph_lens_lite.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ <h3>Graph Lens Lite</h3>
3232
<button id="metricsToggleBtn" class="showOnLoad medium-btn" title="Toggle network metrics panel (M)" onclick="cache.metrics.toggleUI()">📊</button>
3333
<button id="dataToggleBtn" class="showOnLoad medium-btn" title="Toggle data editor (D)" onclick="cache.ui.toggleDataEditor()">🔢</button>
3434
<button id="queryToggleBtn" class="showOnLoad medium-btn" title="Toggle query editor (Q)" onclick="cache.ui.toggleQueryEditor()">📝</button>
35+
<button id="styleToggleBtn" class="showOnLoad medium-btn" title="Open styling panel (Y)" onclick="cache.ui.toggleStylingPanel()">🎨</button>
3536
<button id="editBtn" class="showOnLoad medium-btn" title="Toggle Edit mode (E)" onclick="cache.ui.toggleEditMode()">⚙️</button>
3637
</div>
3738
</div>
@@ -100,6 +101,18 @@ <h5 class="purple">Shown:
100101
</div>
101102
<div id="innerGraphContainer"></div>
102103
</div>
104+
<div id="rightSidebar">
105+
<div id="rightSidebarContentContainer">
106+
<div class="header-row">
107+
<h3>Styling Panel</h3>
108+
<button id="closeStylingPanelBtn" class="small-btn red" title="Close styling panel" onclick="cache.ui.toggleStylingPanel()">×</button>
109+
</div>
110+
<hr>
111+
<div id="stylingPanelContent">
112+
<!-- Styling controls will be populated here -->
113+
</div>
114+
</div>
115+
</div>
103116
</div>
104117
<div id="bottomBar">
105118
<div class="resize-handle"></div>

src/managers/ui.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,22 @@ class UIManager {
329329
this.handleEditModeUIChanges();
330330
}
331331

332+
toggleStylingPanel() {
333+
const rightSidebar = document.getElementById("rightSidebar");
334+
const styleBtn = document.getElementById("styleToggleBtn");
335+
const isActive = rightSidebar.classList.contains("active");
336+
337+
if (isActive) {
338+
rightSidebar.classList.remove("active");
339+
styleBtn.classList.remove("highlight");
340+
this.info("Styling panel closed");
341+
} else {
342+
rightSidebar.classList.add("active");
343+
styleBtn.classList.add("highlight");
344+
this.info("Styling panel opened");
345+
}
346+
}
347+
332348
async toggleLassoSelection() {
333349
const lassoWrapper = document.getElementById("lassoWrapper");
334350
let lassoIsActive = lassoWrapper.classList.contains("active");
@@ -448,6 +464,8 @@ class UIManager {
448464

449465
this.buildFilterUI();
450466

467+
this.buildStylingPanelUI();
468+
451469
document.getElementById("resetSelectedElementsStyleBtn").title = this.cache.CFG.RESET_SELECTION_BUTTON_RESETS_POSITIONS
452470
? "Reset the visual appearance and positions of the selected elements to their defaults"
453471
: "Reset the visual appearance of the selected elements to their defaults";
@@ -679,6 +697,16 @@ class UIManager {
679697
this.cache.EVENT_LOCKS.QUERY_UPDATE_EVENT = false;
680698
}
681699
}
700+
701+
buildStylingPanelUI() {
702+
const content = document.getElementById("stylingPanelContent");
703+
content.innerHTML = "";
704+
705+
const placeholder = document.createElement("div");
706+
placeholder.className = "alert-info";
707+
placeholder.innerHTML = "<p>Styling controls will be added here.</p>";
708+
content.appendChild(placeholder);
709+
}
682710
}
683711

684712
export {UIManager};

src/style.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,47 @@ body, html {
3030
flex-shrink: 0;
3131
}
3232

33+
#rightSidebar {
34+
min-width: 0;
35+
width: 0;
36+
background-color: #f4f4f4;
37+
padding-right: 0;
38+
overflow: hidden;
39+
transition: width 0.3s ease-in-out, min-width 0.3s ease-in-out, padding-right 0.3s ease-in-out;
40+
display: flex;
41+
flex-direction: column;
42+
flex-shrink: 0;
43+
border-left: 0 solid #ccc;
44+
}
45+
46+
#rightSidebar.active {
47+
min-width: 360px;
48+
width: 360px;
49+
padding-right: 10px;
50+
padding-left: 10px;
51+
border-left: 1px solid #ccc;
52+
}
53+
54+
#rightSidebarContentContainer {
55+
flex: 1;
56+
overflow-y: auto;
57+
overflow-x: hidden;
58+
opacity: 0;
59+
transition: opacity 0.3s ease-in-out;
60+
}
61+
62+
#rightSidebar.active #rightSidebarContentContainer {
63+
opacity: 1;
64+
}
65+
66+
#stylingPanelContent {
67+
padding-top: 10px;
68+
}
69+
70+
#closeStylingPanelBtn {
71+
margin-left: auto;
72+
}
73+
3374
#sidebarContentContainer {
3475
flex: 1;
3576
overflow-y: auto;

0 commit comments

Comments
 (0)