Skip to content

Commit 04142e0

Browse files
committed
refactor: better live preview toolbar icons positioning
1 parent 2f47df8 commit 04142e0

2 files changed

Lines changed: 41 additions & 14 deletions

File tree

docs/API-Reference/view/PanelView.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@ The editor holder element, passed from WorkspaceManager
171171
## \_recomputeLayout : <code>function</code>
172172
recomputeLayout callback from WorkspaceManager
173173

174+
**Kind**: global variable
175+
<a name="_defaultPanelId"></a>
176+
177+
## \_defaultPanelId : <code>string</code> \| <code>null</code>
178+
The default/quick-access panel ID
179+
180+
**Kind**: global variable
181+
<a name="_$addBtn"></a>
182+
183+
## \_$addBtn : <code>jQueryObject</code>
184+
The "+" button inside the tab overflow area
185+
174186
**Kind**: global variable
175187
<a name="EVENT_PANEL_HIDDEN"></a>
176188

@@ -205,10 +217,16 @@ during drag without being overly sensitive.
205217
Minimum panel height (matches Resizer minSize) used as a floor
206218
when computing a sensible restore height.
207219

220+
**Kind**: global constant
221+
<a name="PREF_BOTTOM_PANEL_MAXIMIZED"></a>
222+
223+
## PREF\_BOTTOM\_PANEL\_MAXIMIZED
224+
Preference key for persisting the maximize state across reloads.
225+
208226
**Kind**: global constant
209227
<a name="init"></a>
210228

211-
## init($container, $tabBar, $tabsOverflow, $editorHolder, recomputeLayoutFn)
229+
## init($container, $tabBar, $tabsOverflow, $editorHolder, recomputeLayoutFn, defaultPanelId)
212230
Initializes the PanelView module with references to the bottom panel container DOM elements.
213231
Called by WorkspaceManager during htmlReady.
214232

@@ -221,6 +239,7 @@ Called by WorkspaceManager during htmlReady.
221239
| $tabsOverflow | <code>jQueryObject</code> | The scrollable area holding tab elements. |
222240
| $editorHolder | <code>jQueryObject</code> | The editor holder element (for maximize height calculation). |
223241
| recomputeLayoutFn | <code>function</code> | Callback to trigger workspace layout recomputation. |
242+
| defaultPanelId | <code>string</code> | The ID of the default/quick-access panel. |
224243

225244
<a name="exitMaximizeOnResize"></a>
226245

src/extensionsIntegrated/Phoenix-live-preview/live-preview.css

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,9 @@
8080
}
8181

8282
#live-preview-plugin-toolbar:hover .lp-settings-icon {
83-
display: flex;
84-
align-items: center;
85-
color: #a0a0a0;
8683
opacity: 1;
8784
visibility: visible;
8885
transition: unset;
89-
padding-left: 7.5px;
9086
}
9187

9288
.live-preview-settings input.error, .live-preview-settings input:focus.error{
@@ -98,25 +94,37 @@
9894
.lp-settings-icon {
9995
opacity: 0;
10096
color: #a0a0a0;
101-
display: flex;
102-
align-items: center;
10397
visibility: hidden;
10498
transition: opacity 1s, visibility 0s linear 1s; /* Fade-out effect */
105-
padding-left: 7.5px;
99+
width: 30px;
100+
height: 22px;
101+
padding: 1px 6px;
102+
flex-shrink: 0;
103+
margin-top: 3.5px;
106104
}
107105

108106
.lp-device-size-icon {
109-
color: #a0a0a0;
107+
min-width: fit-content;
110108
display: flex;
111109
align-items: center;
112-
padding-left: 7.5px;
113-
margin-right: 7.5px;
110+
margin: 3.5px 4px 0 3px;
111+
cursor: pointer;
112+
background: #3C3F41;
113+
box-shadow: none;
114+
border: 1px solid #3C3F41;
115+
box-sizing: border-box;
116+
color: #a0a0a0;
117+
padding: 0 0.35em;
118+
}
119+
120+
.lp-device-size-icon:hover {
121+
border: 1px solid rgba(0, 0, 0, 0.24) !important;
122+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
114123
}
115124

116125
#deviceSizeBtn.btn-dropdown::after {
117126
position: static;
118-
margin-top: 2px;
119-
margin-left: 3px;
127+
margin-left: 5px;
120128
}
121129

122130
.device-size-item-icon {
@@ -154,7 +162,7 @@
154162
min-width: fit-content;
155163
display: flex;
156164
align-items: center;
157-
margin: 3px 4px 0 3px;
165+
margin: 3.5px 4px 0 3px;
158166
max-width: 80%;
159167
text-overflow: ellipsis;
160168
overflow: hidden;

0 commit comments

Comments
 (0)