backdrop / backdrop-issues

Issue tracker for Backdrop core.
145 stars 40 forks source link

[UX] Fix page titles for the various "Add xyz" tasks under "Structure" #1456

Open klonos opened 8 years ago

klonos commented 8 years ago

backdrop-menu_link_add_page

The menu link edit page does not have these two tabs and the page title is ok ("Edit menu link"):

backdrop-menu_link_edit_page

...although, it would be better IMO to have it be "Edit menu link [menu_link_title]" instead in order to differentiate in case one has multiple tabs open in their browser.


~PR by @BWPanda: https://github.com/backdrop/backdrop/pull/2088~ PR by @quicksketch: https://github.com/backdrop/backdrop/pull/2097

klonos commented 8 years ago

I often open many edit/add link tabs in my browser and it is really hard to find the right one. This is annoying. Can we set a milestone please?

ghost commented 6 years ago

Simple PR fixes this.

herbdool commented 6 years ago

The PR fixes the main issue by getting it to display Add Link as title and gets rid of the tabs.

quicksketch commented 6 years ago

Using the sandbox site, this looks to have the side-effect of removing the link to add a link while viewing the menu individually:

image

Links can still be added by going to the listing of menus, then using the dropbutton next the menu to add a link.

It also removes the link to add a new menu entirely:

image

Though you can add a new link via the Admin Bar.

I think I'd be more comfortable with adding a backdrop_set_title() in the menu callbacks. Or ideally we'd fix the way titles are displayed when using action links. Right now action links everywhere do this weird behavior of using their parent menu item as the page title.

quicksketch commented 6 years ago

I filed a new PR at https://github.com/backdrop/backdrop/pull/2097 that should fix the display of action links throughout Backdrop, and the titles for adding a menu or menu link specifically.

The first fix is simple: let menu_get_active_title() return the action link title instead of using the parent item title.

However, after fixing that, it appears as though we have some cruft from the Drupal 6 era in menu module that manually creates individual menu links for each created menu. I couldn't see any reason for this, as we don't do this with any other menu links that contain wildcards (e.g. editing content types, vocabularies, layouts, views, etc.) I think it's simply code that had been ported forward because no one really understood what it did.

So this PR removes that cruft (the entire menu_enable() function), cleans up the database menu_links table, and also switches the title that is used when on a page created by a local action link.

olafgrabienski commented 6 years ago

Good catch with the disappeared action links! The sandbox site of the new PR works as expected: You can add menus and links again using the action links; the title of these pages are "Add menu" and "Add link" respectively.

Compared to the former PR, the two inactive tabs on the Add link page are still visible.

quicksketch commented 6 years ago

Compared to the former PR, the two inactive tabs on the Add link page are still visible.

If we're going to change that, we'd need to come up with something global. This happens for all pages where there are both local tasks (tabs) and local actions (the "+ Add [whatever]" links). You can see this same thing on admin/structure/layouts/add, admin/structure/views/add, admin/config/urls/path/add, admin/config/urls/redirect/add, and probably other places. So perhaps we save that for a different issue.

quicksketch commented 6 years ago

I updated the PR a bit to also remove unnecessary backdrop_set_title() calls elsewhere. Now that action links use their own link title as the page title, we can remove calls to backdrop_set_title() when adding a block, text editor, layout, block, or view.

ghost commented 2 years ago

Closed my PR (https://github.com/backdrop/backdrop/pull/2088) in favour of https://github.com/backdrop/backdrop/pull/2097

klonos commented 2 years ago

...this needs a rebase and some conflicts resolution.

klonos commented 6 months ago

Bumped into this again while working on #6578, where the page title for admin/structure/file-types/add is "File types" instead of "Add file type" 👎🏼 ...and is showing the horizontal tabs 👎🏼 :

image

I'm looping back to this to get it out of the way.

klonos commented 6 months ago

...and is showing the horizontal tabs 👎🏼 :

That is intentional after all - I just thought that it was random because I couldn't figure out the logic. So lets address just the titles issue here, and decide if hiding the tabs is a good thing or a bad thing UX-wise in a separate issue: #6579

klonos commented 6 months ago

OK, PR ready for review: https://github.com/backdrop/backdrop/pull/4770

stpaultim commented 2 months ago

@klonos This needs a rebase. No available sandbox.

laryn commented 2 months ago

@stpaultim I rebased it.