Skip to content

Commit 38ba4cd

Browse files
committed
feat: move image gallery and measurements to its separate section
1 parent 45aef62 commit 38ba4cd

File tree

3 files changed

+80
-71
lines changed

3 files changed

+80
-71
lines changed

docs/07-Pro Features/01-live-preview-edit.md

Lines changed: 4 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ The Tool Box displays different options depending on the selected element type.
6464
- **Edit Hyperlink** *(link icon)*: Opens a floating input box that lets you edit the element’s `href` attribute.
6565
*This button appears only for `<a>` elements.*
6666

67-
- **Image Gallery** *(image icon)*: Opens an image gallery at the bottom of the Live Preview, where you can browse and select an image. You can also choose an image from your computer. Phoenix Code automatically saves the image to your project folder and updates the src attribute of the element.
68-
*This button appears only for `<img>` elements.* See the [Image Gallery](#image-gallery) section for more details.
67+
- **Image Gallery** *(image icon)*: Opens an image gallery at the bottom of the Live Preview, where you can browse and select an image. You can also choose an image from your computer. Phoenix Code automatically saves the image to your project folder and updates the src attribute of the element.
68+
*This button appears only for `<img>` elements.* See [Image Gallery](./02-image-gallery.md) for more details.
6969

7070
- **Duplicate** *(copy icon)*: Copies the selected element and places it below.
7171
*This option is available for all elements.*
7272

7373
- **Delete** *(trash icon)*: Deletes the selected element. You can also delete elements using the `Delete` key.
7474
*This option is available for all elements.*
7575

76-
- **More Options** *(three-dots icon)*: Opens a menu with additional actions such as `Cut`, `Copy`, `Paste`, and `Show Measurements`.
77-
*This option is available for all elements.*
76+
- **More Options** *(three-dots icon)*: Opens a menu with additional actions.
77+
*This option is available for all elements.* See [Cut, Copy, and Paste](#cut-copy-and-paste) and [Show Measurements](./03-show-measurements.md) for more details.
7878

7979
> The Tool Box is never shown for non-editable elements that are dynamically created by JavaScript.
8080
@@ -148,73 +148,6 @@ To cancel a drag, press `Esc`.
148148

149149
---
150150

151-
## Image Gallery
152-
153-
The **Image Gallery** is a panel that appears at the bottom of the Live Preview. It lets you browse images from Unsplash or select images from your device.
154-
155-
> The Image Gallery is available only for `<img>` elements.
156-
157-
By default, the Image Gallery appears when you select an `<img>` element. You can close it by clicking the Image Gallery button in the Tool Box or the Close button in the gallery. To reopen it, click the Image Gallery button again.
158-
159-
<!-- TODO: add image showing the Image Gallery ribbon -->
160-
161-
### Browsing Images
162-
163-
Type a search term in the search box and press `Enter` or click the search icon. The gallery displays matching images from Unsplash. Use the left and right arrows to browse through the results.
164-
165-
> The gallery remembers your last search query and shows it when you reopen it. If there is no previous search, Phoenix Code shows results for a random query.
166-
167-
Hover over a thumbnail to preview the image in your page. The previously selected image is restored when you move the cursor away from the gallery.
168-
169-
To select an image, click the thumbnail or the **Use this Image** button. Phoenix Code downloads the image, saves it to the selected folder, and automatically updates the `src` attribute.
170-
171-
> If this is your first time selecting an image, Phoenix Code prompts you to choose a folder where images should be saved. See [Folder Selection Dialog](#folder-selection-dialog) for details.
172-
173-
Below each thumbnail, the photographer’s name and a link to their Unsplash profile are displayed.
174-
175-
<!-- TODO: add video showing image gallery workflow -->
176-
177-
### Selecting from Device
178-
179-
Click the **Select from device** button at the top of the gallery to choose an image from your local files.
180-
181-
### Folder Selection Dialog
182-
183-
The first time you select an image, Phoenix Code prompts you to choose where images should be saved in your project.
184-
185-
The dialog includes:
186-
- **Folder path input**: Enter a folder path relative to your project root. Phoenix Code suggests matching folders as you type.
187-
- **Remember this folder for this project**: When checked (default), Phoenix Code reuses this folder for future image downloads in the same project.
188-
189-
> If the folder does not exist, Phoenix Code creates it.
190-
> If the folder path is left empty, images are saved to an `images` folder in the project root.
191-
192-
<!-- TODO: add image showing the folder selection dialog -->
193-
194-
To change the saved folder later, click the **Folder Selection** button *(folder icon)* in the Image Gallery header.
195-
196-
---
197-
198-
## Show Measurements
199-
200-
The **Show Measurements** feature displays ruler lines extending from the edges of a selected element to the edges of the Live Preview document, with labels showing exact pixel positions. This helps you position elements more accurately.
201-
202-
<!-- TODO: add image showing measurements feature -->
203-
204-
> Ruler lines appear in blue for editable elements and gray for non-editable (dynamically created) elements.
205-
206-
### Enabling Measurements
207-
208-
To enable measurements, click the **mode selector dropdown** in the Live Preview toolbar and select **Show Measurements**. By default, this option is unchecked.
209-
210-
<!-- TODO: add image showing how to enable measurements -->
211-
212-
Alternatively, you can enable measurements from the **More Options** menu *(three-dots icon)* in the Tool Box. Select **Show Measurements** to toggle it on or off.
213-
214-
You can also change this setting by updating the `livePreviewShowMeasurements` preference in the preferences file. Set it to `true` or `false` (default). See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.
215-
216-
---
217-
218151
## Cut, Copy, and Paste
219152

220153
You can cut, copy, and paste elements in Edit Mode using standard keyboard shortcuts or the Tool Box **More Options** menu *(three-dots icon)*.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Image Gallery
3+
---
4+
5+
import React from 'react';
6+
import VideoPlayer from '@site/src/components/Video/player';
7+
8+
The **Image Gallery** is a panel that appears at the bottom of the Live Preview. It lets you browse images from Unsplash or select images from your device.
9+
10+
> The Image Gallery is available only for `<img>` elements.
11+
12+
By default, the Image Gallery appears when you select an `<img>` element. You can close it by clicking the Image Gallery button in the Tool Box or the Close button in the gallery. To reopen it, click the Image Gallery button again.
13+
14+
<!-- TODO: add image showing the Image Gallery ribbon -->
15+
16+
---
17+
18+
## Browsing Images
19+
20+
Type a search term in the search box and press `Enter` or click the search icon. The gallery displays matching images from Unsplash. Use the left and right arrows to browse through the results.
21+
22+
> The gallery remembers your last search query and shows it when you reopen it. If there is no previous search, Phoenix Code shows results for a random query.
23+
24+
Hover over a thumbnail to preview the image in your page. The previously selected image is restored when you move the cursor away from the gallery.
25+
26+
To select an image, click the thumbnail or the **Use this Image** button. Phoenix Code downloads the image, saves it to the selected folder, and automatically updates the `src` attribute.
27+
28+
> If this is your first time selecting an image, Phoenix Code prompts you to choose a folder where images should be saved. See [Folder Selection Dialog](#folder-selection-dialog) for details.
29+
30+
Below each thumbnail, the photographer's name and a link to their Unsplash profile are displayed.
31+
32+
<!-- TODO: add video showing image gallery workflow -->
33+
34+
---
35+
36+
## Selecting from Device
37+
38+
Click the **Select from device** button at the top of the gallery to choose an image from your local files.
39+
40+
---
41+
42+
## Folder Selection Dialog
43+
44+
The first time you select an image, Phoenix Code prompts you to choose where images should be saved in your project.
45+
46+
The dialog includes:
47+
- **Folder path input**: Enter a folder path relative to your project root. Phoenix Code suggests matching folders as you type.
48+
- **Remember this folder for this project**: When checked (default), Phoenix Code reuses this folder for future image downloads in the same project.
49+
50+
> If the folder does not exist, Phoenix Code creates it.
51+
> If the folder path is left empty, images are saved to an `images` folder in the project root.
52+
53+
<!-- TODO: add image showing the folder selection dialog -->
54+
55+
To change the saved folder later, click the **Folder Selection** button *(folder icon)* in the Image Gallery header.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Show Measurements
3+
---
4+
5+
The **Show Measurements** feature displays ruler lines extending from the edges of a selected element to the edges of the Live Preview document, with labels showing exact pixel positions. This helps you position elements more accurately.
6+
7+
<!-- TODO: add image showing measurements feature -->
8+
9+
> Ruler lines appear in blue for editable elements and gray for non-editable (dynamically created) elements.
10+
11+
---
12+
13+
## Enabling Measurements
14+
15+
To enable measurements, click the **mode selector dropdown** in the Live Preview toolbar and select **Show Measurements**. By default, this option is unchecked.
16+
17+
<!-- TODO: add image showing how to enable measurements -->
18+
19+
Alternatively, you can enable measurements from the **More Options** menu *(three-dots icon)* in the Tool Box. Select **Show Measurements** to toggle it on or off.
20+
21+
You can also change this setting by updating the `livePreviewShowMeasurements` preference in the preferences file. Set it to `true` or `false` (default). See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.

0 commit comments

Comments
 (0)