Skip to content

Commit 33831b6

Browse files
committed
feat: change naming convention from resize ruler to device preview
1 parent 5e22c9f commit 33831b6

4 files changed

Lines changed: 52 additions & 41 deletions

File tree

app-links.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export const appLinks = [
150150
},
151151
{
152152
from: '/app-links/resize-ruler',
153-
to: '/docs/file-management',
153+
to: '/docs/Pro Features/device-preview',
154154
},
155155
{
156156
from: '/app-links//terminal',
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Device Preview
3+
---
4+
5+
:::info Pro Feature
6+
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
7+
:::
8+
9+
**Device Preview** lets you check how your page looks at different screen widths without leaving Phoenix Code. Resize the Live Preview to common device sizes, snap to the CSS breakpoints from your stylesheets, or drag the panel edge to see a width ruler with tick marks and breakpoint bands.
10+
11+
<!-- Add an image here showing the Live Preview toolbar with the device-size button on the right and the width ruler visible during a resize -->
12+
13+
## Choosing a device size
14+
15+
The right end of the Live Preview toolbar has a device-size button.
16+
17+
- Click the **device icon** to cycle through phone, tablet, and desktop widths.
18+
- Click the **chevron** beside it to open the full device list.
19+
20+
<!-- Add an image here showing the device-size dropdown with the list of devices and CSS breakpoint entries -->
21+
22+
The dropdown lists predefined devices grouped by category (iPhone SE, iPhone 14, Galaxy S24, iPad Mini, iPad Air, iPad Pro, HD Desktop, Laptop, Desktop, Full HD), plus a **Fit** option in design mode that fills the available space. A check mark shows next to the size that matches the current width.
23+
24+
> Free users see the device list, but selecting any size opens a Pro upgrade prompt. Device Preview is a Phoenix Pro feature.
25+
26+
## CSS breakpoints
27+
28+
Phoenix Code reads your page's stylesheets and picks up any `min-width` or `max-width` media-query breakpoints. These show up in two places:
29+
30+
- In the **device dropdown**, listed at the bottom as `@media 768px` (etc.). Clicking one snaps the Live Preview to that exact width.
31+
- On the **width ruler**, as colored bands between breakpoints, each labelled with its pixel value.
32+
33+
Breakpoints update automatically as you edit your CSS.
34+
35+
<!-- Add an image here showing CSS breakpoint entries (@media labels) at the bottom of the device dropdown -->
36+
37+
## Width ruler
38+
39+
When you drag the edge of the Live Preview panel to resize it, a ruler appears across the toolbar showing:
40+
41+
- **Tick marks** every 10px, with numbers every 100px.
42+
- **Colored bands** for each CSS breakpoint range (see [CSS breakpoints](#css-breakpoints) above).
43+
- **A blue line** at the right edge marking the current width.
44+
45+
A small black label floats above the preview showing the current width and the closest matching device, like `iPad Mini — 768px`. The label also flashes briefly when you pick a size from the device dropdown.
46+
47+
The ruler disappears as soon as you stop resizing.
48+
49+
<!-- Add an image here showing the width ruler with tick marks, colored breakpoint bands, the blue right-edge marker, and the floating device label -->

docs/07-Pro Features/06-resize-ruler.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

docs/08-Features/08-Live Preview/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ The right end of the toolbar has two controls:
127127

128128
* **Live Preview Settings**: The gear icon on the left. Clicking it opens the Live Preview settings dialog. This icon is hidden by default and only appears when you hover over the toolbar. [Read more about Live Preview Settings](./live-preview-settings/#accessing-live-preview-settings).
129129

130-
* **Device Size Presets**: Resize the Live Preview to common phone, tablet, and desktop widths. Click the icon to cycle through sizes, or click the chevron for the full list. See [Resize Ruler](../../Pro%20Features/resize-ruler) for more.
130+
* **Device Preview**: Resize the Live Preview to common phone, tablet, and desktop widths, or snap to your CSS breakpoints. Click the icon to cycle through sizes, or click the chevron for the full list. See [Device Preview](../../Pro%20Features/device-preview) for more.
131131

132132
<VideoPlayer
133133
src="https://docs-images.phcode.dev/website/videos/device-size-pro-dialog.mp4"
134134
/>
135135

136136
:::note
137-
Device Size Presets is a Phoenix Pro feature.
137+
Device Preview is a Phoenix Pro feature.
138138
:::
139139

140140

0 commit comments

Comments
 (0)