Skip to content

Commit f1195cc

Browse files
committed
feat: full docs for tab bar
1 parent dde7d11 commit f1195cc

File tree

9 files changed

+148
-1
lines changed

9 files changed

+148
-1
lines changed

docs/05-file-management.md

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ See the [Keyboard Shortcuts Guide](./Features/keyboard-shortcuts) for complete d
3939
By default, the File Tree sorts folders first (in ascending order *a-z*), followed by files.
4040

4141
To sort folders and files together:
42-
1. Click the **arrows icon** at the top-right of the sidebar.
42+
1. Click the **double-arrow** at the top-right of the sidebar.
4343
2. In the dropdown, uncheck **Sort Folders First**.
4444

4545
![File Tree folders sort](./images/fileManagement/file-tree-sort-folders-option.png "File Tree folders sort")
@@ -62,3 +62,150 @@ To collapse all folders:
6262
<VideoPlayer
6363
src="https://docs-images.phcode.dev/videos/file-management/collapse-folders.mp4"
6464
/>
65+
66+
---
67+
68+
## Tab Bar
69+
70+
The **Tab Bar** appears at the top of the editor and displays all open files.
71+
Each file in the Tab Bar is referred to as a **tab**, and you can open as many tabs as you like.
72+
*The Tab Bar helps you switch quickly between files while working.*
73+
74+
![Tab Bar](./images/fileManagement/tab-bar.png "Tab Bar")
75+
76+
The active tab is highlighted with a *blue* marker to distinguish it from inactive ones.
77+
To switch between tabs, simply click the tab you want to view.
78+
79+
To close a tab, click the `×` button beside its name.
80+
For inactive tabs, this button appears only when you hover over them.
81+
82+
**Phoenix Code** shows a small `` icon on tabs that have unsaved changes.
83+
84+
When multiple tabs have the same name, **Phoenix Code** displays their parent folder name so you can easily tell them apart.
85+
> Hovering over a tab will show a tooltip with its full path.
86+
87+
![Tab Bar UI](./images/fileManagement/tab-bar-main.png "Tab Bar UI")
88+
89+
> The image above shows various UI elements of a tab.
90+
91+
### Tab Bar in Split Panes
92+
When multiple panes are open, each pane has its own Tab Bar and maintains its own list of open tabs.
93+
94+
The active tab in the **active pane** is marked in *blue*,
95+
while the active tab in an **inactive pane** appears in *gray*.
96+
97+
![Split Pane Tab Bar](./images/fileManagement/split-panes-tabs.png "Split Pane Tab Bar")
98+
99+
> A file can appear as a tab in more than one pane.
100+
101+
### Hidden Tabs
102+
When you open a new file, its tab is added to the right of the existing tabs.
103+
If there are more tabs than can fit within the visible area, **Phoenix Code** displays a **Show Hidden Tabs** button.
104+
105+
![Overflow button](./images/fileManagement/overflow-button.png "Overflow Button")
106+
107+
Clicking this button opens a dropdown list of all tabs that are not fully visible.
108+
From this list, you can select a tab to bring it into view or close tabs directly from the dropdown.
109+
110+
<VideoPlayer
111+
src="https://docs-images.phcode.dev/videos/file-management/overflow-tabs.mp4"
112+
/>
113+
114+
### Drag-Drop Tabs
115+
You can reorder tabs by dragging and dropping them.
116+
While dragging, **Phoenix Code** highlights the drop position with a vertical blue marker, showing exactly where the tab will be placed.
117+
118+
Tabs can also be dragged between panes.
119+
<VideoPlayer
120+
src="https://docs-images.phcode.dev/videos/file-management/drag-drop-tabs.mp4"
121+
/>
122+
123+
124+
### Showing or Hiding the Tab Bar
125+
You can enable or disable the Tab Bar in several ways:
126+
127+
#### 1. From the View Menu
128+
Go to `View > File Tab Bar` to toggle it on or off.
129+
130+
![View > File Tab Bar](./images/fileManagement/disable-tab-bar-1.png "View > File Tab Bar")
131+
132+
#### 2. From the Sidebar
133+
Click the **double-arrow** icon in the top-right corner of the sidebar,
134+
then use the `Show File Tab Bar` option in the dropdown to toggle the Tab bar.
135+
136+
![Disable Tab Bar](./images/fileManagement/disable-tab-bar-2.png "Disable Tab Bar")
137+
138+
#### 3. From Preferences**
139+
You can also toggle the Tab bar by updating the `showTabBar` option in the preferences file.
140+
```json
141+
"tabBar.options": {
142+
"showTabBar": false
143+
}
144+
```
145+
*Add this in your preferences file to hide the Tab bar.*
146+
Set the value to `true` to enable it.
147+
See [Editing Preferences](./editing-text#editing-preferences) if you need help in editing the preferences.
148+
149+
### Limiting the Number of Tabs
150+
**Phoenix Code** allows you to control the maximum number of tabs visible in the Tab Bar at once.
151+
By default, the value is set to `-1`, which means all open tabs are displayed.
152+
153+
For example, if you want to show a maximum of **3 tabs** in the Tab Bar, you can add the following to your preferences file:
154+
155+
```json
156+
"tabBar.options": {
157+
"numberOfTabs": 3,
158+
"showTabBar": true
159+
}
160+
```
161+
You can set `numberOfTabs` to any positive number to define the maximum tab limit.
162+
If you set it to `0`, the Tab Bar will be hidden entirely.
163+
Any negative value (such as `-1`) displays all open tabs without restriction.
164+
> The active tab is always visible, except when the `numberOfTabs` value is set to `0`.
165+
166+
167+
### Tab Bar Context Menu
168+
When you right-click a tab, a context menu appears which has multiple options so that you can work with tabs easily.
169+
170+
![Tab bar context menu](./images/fileManagement/tab-bar-context-menu.png "Tab bar context menu")
171+
172+
### Tab Bar Context Menu
173+
174+
When you right-click a tab, a context menu appears with multiple options that make it easy to manage open files.
175+
176+
![Tab bar context menu](./images/fileManagement/tab-bar-context-menu.png "Tab Bar Context Menu")
177+
178+
#### Tab Bar Context Menu Options
179+
180+
* **Close Tab** — Closes the tab that was right-clicked.
181+
*For example, in the image, the `script.js` tab will be closed.*
182+
183+
* **Close Tabs to the Left** — Closes all tabs to the left of the selected one (excluding the right-clicked tab).
184+
*In the image, the `styles.css` tab will be closed.*
185+
186+
* **Close Tabs to the Right** — Closes all tabs to the right of the selected one (excluding the right-clicked tab).
187+
*In the image, the `index.html` tab will be closed.*
188+
189+
* **Close Saved Tabs** — Closes all tabs with saved content. *Tabs for files that have unsaved changes remain open.*
190+
191+
* **Close All Tabs** — Closes every tab currently open in the Tab Bar.
192+
193+
* **Rename** — Allows you to rename the file linked to the selected tab. *When you choose this option, Phoenix Code opens the File Tree (if it is closed) and highlights the file so you can rename it directly.*
194+
195+
* **Delete** — Deletes the file from the project and removes its tab from the Tab Bar.
196+
197+
* **Show in File Tree** – Highlights the selected file in the File Tree so you can locate it easily.
198+
199+
* **Reopen Closed File** — Reopens the most recently closed file or tab.
200+
201+
> These options provide quick access to common file operations directly from the Tab Bar.
202+
203+
#### Git - Tab Bar
204+
**Phoenix Code** integrates with Git. The Tab Bar displays file status indicators, showing which files are untracked or modified.
205+
206+
![Tab bar Git](./images/fileManagement/tab-bar-git.png "Tab bar Git")
207+
208+
- A **green marker** indicates an **untracked** file.
209+
- An **orange marker** indicates a **modified** file.
210+
211+
> These indicators appear only when your project is a Git repository.
52.3 KB
Loading
138 KB
Loading
267 KB
Loading
341 KB
Loading
60 KB
Loading
61.3 KB
Loading
81.3 KB
Loading
225 KB
Loading

0 commit comments

Comments
 (0)