UX: multiple drafts menu improvements (#31195)

This change includes the following updates:

- Rename view all to view all drafts
- Remove view all link from drop-down when all drafts are displayed in
the menu
- Different icon for draft topics and PMs (adds envelope for PMs)
- Disable drop-down when New Topic button is disabled (private
categories etc)
- Improve drafts drop-down loading (no longer disables the trigger btn
on click)
This commit is contained in:
David Battersby
2025-02-05 15:19:13 +04:00
committed by GitHub
parent bb12f8275d
commit 5f0c21d906
6 changed files with 107 additions and 18 deletions

View File

@ -13,6 +13,10 @@ module PageObjects
has_no_css?(MENU_SELECTOR + "-trigger")
end
def disabled?
find(MENU_SELECTOR + "-trigger")["disabled"]
end
def open?
has_css?(MENU_SELECTOR + "-content")
end
@ -21,6 +25,14 @@ module PageObjects
has_no_css?(MENU_SELECTOR + "-content")
end
def has_view_all_link?
has_css?(MENU_SELECTOR + "-content .view-all-drafts")
end
def has_no_view_all_link?
has_no_css?(MENU_SELECTOR + "-content .view-all-drafts")
end
def open
find(MENU_SELECTOR + "-trigger").click
end