0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-10 23:59:31 +08:00
discourse/spec/system/page_objects
chapoi 14b972f993
UX: Category danger zone + cleanup old category page selectors (#41049)
Previously, the delete-category action lived in a footer shared across
all edit-category tabs, with its "can't delete" reason shown via a
separate warning alert and tooltip toggle. It's placement didn't
sufficiently communicate the destructive functionality see
https://meta.discourse.org/t/delete-category-button-is-more-prominent-than-save/403037

This change consolidates deletion into a dedicated "Danger zone"
section, only present on the settings tab, surfacing the delete button
or the forbidden reason inline immediately, removing the superfluous
flow of clicking the button to see the warning message.

The tabs were also nesting `form.Section`, which then had to be solved
for it with a `display-contents` for some `edit-category-content` tabs.
As this was redundant, it's been refactored as fas as possible.

This commit also:
* removed the unused `category-name-fields` component
* cleaned up all the old category pages CSS that was left over
* corrected a few FormKit issues
* styled doc categories plugin import to match FormKit section header
* removed the old `edit-category-content` and only use the new
`edit-category-tab`


| What | BC | AC |
|--------|--------|--------|
| Delete category | <img width="974" height="906" alt="CleanShot
2026-06-19 at 11 59 26"
src="https://github.com/user-attachments/assets/10522aa5-cef0-49f0-aab7-ff351b4a0ca8"
/> | <img width="1100" height="907" alt="CleanShot 2026-06-19 at 09 50
50"
src="https://github.com/user-attachments/assets/15de9e83-7413-408a-8530-1594dc6080cf"
/> |
| Delete category forbidden | <img width="1874" height="910"
alt="CleanShot 2026-06-19 at 11 56 59"
src="https://github.com/user-attachments/assets/f6dd15ef-9874-4960-913b-7f7dd973d326"
/> | <img width="1100" height="907" alt="CleanShot 2026-06-19 at 09 51
59"
src="https://github.com/user-attachments/assets/5690b272-2bc1-440a-bdce-0e944eec585d"
/> |
| Doc Plugin | <img width="844" height="219" alt="CleanShot 2026-06-19
at 12 00 03"
src="https://github.com/user-attachments/assets/446da166-db57-4940-8394-258a2a98c8d3"
/> | <img width="778" height="162" alt="CleanShot 2026-06-19 at 10 10
35"
src="https://github.com/user-attachments/assets/a7e45aad-5fd8-44ec-920f-7bd1e63ef175"
/> |
2026-06-20 08:35:16 +02:00
..
components FIX: Exclude anonymous searches from the dashboard search section (#40966) 2026-06-17 14:32:04 +08:00
modals FEATURE: Accept shared files via the Web Share Target (#41030) 2026-06-18 17:35:09 -03:00
pages UX: Category danger zone + cleanup old category page selectors (#41049) 2026-06-20 08:35:16 +02:00
cdp.rb DEV: Fix (again again) the chat upload spec (#40746) 2026-06-10 20:05:37 +02:00