Commit c499caf
[6.x] Handle many tabs for both the blueprint and entry view (#14073)
* Add overflowing tabs
* Correct icon
* Long tab names (e.g. lorem ipsum) in the overflow dropdown will now truncate with “...” at that max width.
* Long tab names (e.g. lorem ipsum) in the menu will now truncate with “...” at that max width.
* Use overflow-clip instead, just because it's the modern equivalent of overflow-hidden
* Solve tab overflow with clipping for small mobile-like viewports
* Add a incy wincy tiny bit of padding to solve clip margin. This means you can tab to the overflow menu and the focus outline won't be clipped.
overflow-clip-margin: 1px; won't work here for some reason but 1px of end padding is not visually noticeable.
* Apply the same treatment to tabs on the entry form
* Tidy
* Fix some focus clipping e.g. if you tab to "Main" the focus outline would be clipped on the left
* Add a tooltip to show the full text if the tab name is excessively long
* Onl list overflowedTabs instead of all tabs.
* Add a way to access tab controls when they overflow
* Add logic to span all columns of the dropdown menu if there's no icon
* refactor tab overflow logic into a composable to DRY it up
* recompute overflow after tab switches (just in case) and remove unused import and var
---------
Co-authored-by: Jack McDade <jack@jackmcdade.com>1 parent 2db624f commit c499caf
File tree
5 files changed
+264
-28
lines changed- resources/js
- components
- blueprints
- ui
- Dropdown
- Publish
- util
5 files changed
+264
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
20 | 57 | | |
21 | 58 | | |
22 | 59 | | |
| |||
54 | 91 | | |
55 | 92 | | |
56 | 93 | | |
| 94 | + | |
57 | 95 | | |
58 | 96 | | |
59 | 97 | | |
60 | | - | |
| 98 | + | |
61 | 99 | | |
62 | 100 | | |
63 | 101 | | |
| |||
69 | 107 | | |
70 | 108 | | |
71 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
72 | 114 | | |
73 | 115 | | |
74 | 116 | | |
| |||
138 | 180 | | |
139 | 181 | | |
140 | 182 | | |
| 183 | + | |
141 | 184 | | |
142 | 185 | | |
143 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
144 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
145 | 197 | | |
146 | 198 | | |
147 | 199 | | |
148 | 200 | | |
149 | 201 | | |
| 202 | + | |
150 | 203 | | |
151 | 204 | | |
152 | 205 | | |
153 | 206 | | |
154 | 207 | | |
155 | 208 | | |
156 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
157 | 222 | | |
158 | 223 | | |
159 | 224 | | |
160 | 225 | | |
161 | 226 | | |
162 | 227 | | |
| 228 | + | |
163 | 229 | | |
164 | 230 | | |
165 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
166 | 236 | | |
167 | 237 | | |
168 | 238 | | |
| |||
180 | 250 | | |
181 | 251 | | |
182 | 252 | | |
183 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
184 | 257 | | |
185 | 258 | | |
186 | 259 | | |
| |||
294 | 367 | | |
295 | 368 | | |
296 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
297 | 386 | | |
298 | 387 | | |
299 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | | - | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
106 | 144 | | |
107 | 145 | | |
108 | 146 | | |
109 | 147 | | |
110 | 148 | | |
111 | 149 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
121 | 196 | | |
122 | 197 | | |
123 | 198 | | |
| |||
0 commit comments