+
@@ -949,10 +949,14 @@
@@ -964,11 +968,6 @@
diff --git a/src/styles/CentralControlBar.less b/src/styles/CentralControlBar.less
index 6252272771..39b10dfd02 100644
--- a/src/styles/CentralControlBar.less
+++ b/src/styles/CentralControlBar.less
@@ -73,9 +73,9 @@
pointer-events: none;
}
- svg.ccb-binoculars-icon {
+ svg.ccb-edit-icon {
width: 15px;
- height: 15px;
+ height: 11px;
pointer-events: none;
}
diff --git a/src/styles/Extn-CollapseFolders.less b/src/styles/Extn-CollapseFolders.less
index ecdfaab1ca..91b6f82b8b 100644
--- a/src/styles/Extn-CollapseFolders.less
+++ b/src/styles/Extn-CollapseFolders.less
@@ -1,17 +1,21 @@
-#collapse-folders {
+#collapse-folders,
+#show-in-file-tree {
display: flex;
- flex-direction: column;
align-items: center;
justify-content: center;
padding: 0.2em 0.65em;
margin-top: 0.1em;
position: absolute !important;
- right: 0;
opacity: 0;
visibility: hidden;
transition:
opacity 0.2s ease-in-out,
visibility 0.2s ease-in-out;
+}
+
+#collapse-folders {
+ flex-direction: column;
+ right: 0;
.collapse-icon {
font-size: 0.5em;
@@ -19,7 +23,20 @@
}
}
-#sidebar:hover #collapse-folders {
+#show-in-file-tree {
+ // Sit to the left of #collapse-folders.
+ right: 24px;
+
+ .show-in-tree-icon {
+ // Sized to match the combined stacked-chevron glyph of #collapse-folders.
+ width: 11px;
+ height: 11px;
+ pointer-events: none;
+ }
+}
+
+#sidebar:hover #collapse-folders,
+#sidebar:hover #show-in-file-tree {
opacity: 1;
visibility: visible;
}
diff --git a/src/styles/images/redo.svg b/src/styles/images/redo.svg
new file mode 100644
index 0000000000..5ec2115800
--- /dev/null
+++ b/src/styles/images/redo.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/styles/images/undo.svg b/src/styles/images/undo.svg
new file mode 100644
index 0000000000..7e62bb85e4
--- /dev/null
+++ b/src/styles/images/undo.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/thirdparty/licences/credits.md b/src/thirdparty/licences/credits.md
index edb9783af2..9a97f6680f 100644
--- a/src/thirdparty/licences/credits.md
+++ b/src/thirdparty/licences/credits.md
@@ -18,3 +18,6 @@ Please find all other licenses and attributions below:
### https://onehtmlpagechallenge.com/
* For the code samples in starter projects
+
+### https://seekicon.com/author/mariusz-ostrowski
+* For the undo redo icons used in the editor
diff --git a/src/view/CentralControlBar.js b/src/view/CentralControlBar.js
index a25b77c884..f45f85dbb3 100644
--- a/src/view/CentralControlBar.js
+++ b/src/view/CentralControlBar.js
@@ -129,6 +129,9 @@ define(function (require, exports, module) {
}
$mainToolbar.css({ left: "", right: "", width: "" });
$content.css({ width: "", "min-width": "", right: "", visibility: "", "pointer-events": "" });
+ // Snapshot the pre-collapse width before clearing it — we read it below to
+ // restore the toolbar to its original size when LP was already open.
+ const preCollapseToolbarWidth = savedToolbarWidth;
savedToolbarWidth = null;
livePreviewWasOpen = false;
if (savedSidebarMaxSize !== null) {
@@ -151,7 +154,7 @@ define(function (require, exports, module) {
// by the collapse action, fall back to the default panel size so it stays
// visibly open at a reasonable width.
const defaultWidth = Math.floor(window.innerWidth / 2.5);
- let targetWidth = (savedToolbarWidth && savedToolbarWidth > 50) ? savedToolbarWidth : defaultWidth;
+ let targetWidth = (preCollapseToolbarWidth && preCollapseToolbarWidth > 50) ? preCollapseToolbarWidth : defaultWidth;
// If the sidebar was resized larger while collapsed (e.g. to fill most of
// the screen), restoring the pre-collapse live-preview width would push
// main-toolbar back under the sidebar. Clamp so sidebar + CCB + a
@@ -261,10 +264,6 @@ define(function (require, exports, module) {
e.preventDefault();
_executeCmd(Commands.VIEW_HIDE_SIDEBAR);
});
- $("#ccbShowInTreeBtn").on("click", function (e) {
- e.preventDefault();
- _executeCmd(Commands.NAVIGATE_SHOW_IN_FILE_TREE);
- });
}
const _toggleDesignModeCommand = CommandManager.register(Strings.CMD_TOGGLE_DESIGN_MODE,
@@ -288,7 +287,6 @@ define(function (require, exports, module) {
// navForwardButton get their localized titles from NavigationProvider.)
$("#ccbCollapseEditorBtn").attr("title", Strings.CCB_SWITCH_TO_DESIGN_MODE);
$("#ccbSidebarToggleBtn").attr("title", Strings.CMD_TOGGLE_SIDEBAR);
- $("#ccbShowInTreeBtn").attr("title", Strings.CMD_SHOW_IN_TREE);
$("#ccbUndoBtn").attr("title", Strings.CMD_UNDO);
$("#ccbRedoBtn").attr("title", Strings.CMD_REDO);
$("#ccbSaveBtn").attr("title", Strings.CMD_FILE_SAVE);
diff --git a/test/UnitTestSuite.js b/test/UnitTestSuite.js
index c18b0e392c..97d84344be 100644
--- a/test/UnitTestSuite.js
+++ b/test/UnitTestSuite.js
@@ -92,6 +92,7 @@ define(function (require, exports, module) {
require("spec/ExtensionUtils-integ-test");
require("spec/InlineEditorProviders-integ-test");
require("spec/PreferencesManager-integ-test");
+ require("spec/CentralControlBar-integ-test");
require("spec/MainViewFactory-integ-test");
require("spec/MainViewManager-integ-test");
require("spec/SidebarTabs-integ-test");
diff --git a/test/control-bar-tests-todo.md b/test/control-bar-tests-todo.md
deleted file mode 100644
index 42a5c192f8..0000000000
--- a/test/control-bar-tests-todo.md
+++ /dev/null
@@ -1,236 +0,0 @@
-# Central Control Bar & Design Mode — Tests TODO
-
-Planned as `mainview`-category integration tests (spawns full Phoenix iframe so
-sidebar, CCB, live-preview panel, and main-toolbar are all real). Single suite:
-
-```js
-describe("mainview: central control bar + design mode", function () { … });
-```
-
-Keep this file updated as we add coverage; remove lines as suites land.
-
----
-
-## 1. Layout / DOM structure
-
-- [ ] `#centralControlBar` exists at boot, positioned between sidebar and
- `.content`, 30px wide.
-- [ ] CCB groups render in order: collapse-editor, sidebar-toggle, undo/redo,
- save, nav (search / back / forward), vertical filename label.
-- [ ] Sidebar's `data-minsize` is `30` (so drag can't auto-collapse below CCB).
-- [ ] Sidebar's resizer handle is shifted right of the CCB via CSS
- `transform: translateX(30px)` — clicking at `sidebar.right + 30` lands
- on the resizer element.
-- [ ] When the sidebar is hidden, the Resizer moves the handle to be a sibling
- of `#sidebar` inside `.main-view`; the same shift still applies.
-
-## 2. CCB buttons
-
-- [ ] Undo / Redo / Save buttons fire `Commands.EDIT_UNDO`, `EDIT_REDO`,
- `FILE_SAVE` respectively.
-- [ ] Search / Back / Forward / Show-in-Tree buttons still trigger the
- `NavigationProvider` behaviors after being moved out of `#mainNavBarRight`.
-- [ ] `#ccbSidebarToggleBtn` executes `VIEW_HIDE_SIDEBAR` and the icon flips
- `fa-angles-left` ↔ `fa-angles-right` on panelCollapsed/panelExpanded.
-- [ ] The old `#sidebar-toggle-btn` in the menubar is NOT in the DOM.
-- [ ] `#ccbShowInTreeBtn` is rendered in `.ccb-group-nav` directly below
- `#searchNav` and has a `title` of `Strings.CMD_SHOW_IN_TREE`.
-- [ ] Clicking `#ccbShowInTreeBtn` executes `NAVIGATE_SHOW_IN_FILE_TREE` (if
- sidebar was hidden, it re-opens as part of the command).
-- [ ] Binoculars `