| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | base system |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | Usability |
Issue Summary
This idea was raised in #659488: Properly test the overlay to determine if it belongs in core or contrib (originally by Owen Barton) as a simpler way to potentially solve some of the "loss of context" issues that the overlay is also trying to solve. This would be for users who do not use the overlay (wherever and however the module ends up).
We are moving it here so it can get its own discussion. Below I have copied some of the relevant discussion from the other issue:
#178
Owen Barton - January 5, 2010 - 13:37I have just read the entire thread, and wanted to add some analysis and 2 proposals that I think address the original UX problems in a much simpler and as effective way.
So - if we compare browsing with the overlay, to browsing Seven without it - the actual visual and functional differences are really quite small:
A: There is a large black border that faintly shows the original page you were on before you hit the admin area. Many people have noted that the underlying page is barely noticeable, and pretty much everyone was unanomous that it was too distracting when it was lighter/transparent.
B: There is an "X" at the top of the page that returns you to the original page when you click it.It seems to me that (A) adds little value - it is too dark to provide much context (you can't exactly refer to the content on that page while in the admin area), and is too distracting as a border on a large admin window when made lighter. (B) does provide a useful function, but doesn't really provide context either. While proper A/B user testing would prove it for sure, it seems very unlikely to me that these 2 small visual/functional changes are going to radically improve the UX. Especially when you consider the volume and complexity of the code needed to support these 2 changes it seems that there has to be a better option.
So here are my 2 proposals (we could do either or both):
1: Make regular admin pages non-overlay, but provide a way for users to easily get back to the last non-admin page they were on after they are done with their admin tasks. This could use an "X" link or it could use a "Back to History of the Drupal community 2008-2010" link, perhaps floated right on the same line as the breadcrumbs. The latter, together with the new admin theme would seem to provide the context to users in an equally or more effectively as the black border. This could be implemented with the adapting the destination URL parameter (or a new parameter) so that url() passes it unchanged on admin paths, or using a (tab/window sensitive) session value - either way should be very simple.
2: Use a more traditional modal popup for lightweight tasks. By lightweight tasks I mean "single hit" tasks that generally you only ever expect a single route through, normally a single form, before returning to the original page. We could have a simple path textarea for site builders to configure where these show up - by default they would probably be the forms accessed via the inline hover links - node/*/edit, admin/build/block/*/edit etc, as well as */confirm. Any links inside the popup would either open in the same page, or in a new (actual) window - never in the modal popup. Most of the time the popup could have a much smaller window, which should (together with the fact that the user is only 1 step away from their current page) allow the context to be much more apparent. Because we can use a more traditional popup metaphor we probably do not need to gray out the background. This could use the core of the overlay code, but could probably drop much of the AJAX/URL complexity we use to keep admin links loading in the overlay.
#270
David_Rothstein - April 28, 2010 - 09:31I think that Owen Barton's proposal in #178 is an interesting alternative. It definitely tries to address some of the same issues as the overlay, and in a much simpler way. I'm not sure it provides context quite as strongly as the overlay does, but that would be something interesting to test.
Here is a patch which provides a quick and dirty implementation of Owen's idea - just trying to get it towards something testable. This only makes sense right now if you turn the overlay off and leave the administrative theme on (including for content creation), but if you do that it should be somewhat testable. For a real implementation, #669510: Merge administration theme with hook_admin_paths() would probably be a requirement for this to make sense.
This would probably need some CSS work (and resolving the conflict with the breadcrumbs) in order to be more usefully testable - see attached screenshot :) Notice, by the way, that Owen's idea can sort of be seen as a more interesting and reasonable alternative to the infamous "Back to the live site" link from the original non-overlay Seven implementation (which was thankfully removed in #546694: "Back to the live site" is misleading and incorrect and #548806: No breadcrumbs in Seven). But this version of it might make a fair amount more sense.
Attachment Size Status Test result Operations
Attachment Size Status Test result Operations
overlay-alternative-659488-269.patchreview 1.94 KB Ignored None None
back-to-previous-page-link.png 103.88 KB Ignored None None#273
EvanDonovan - April 28, 2010 - 13:52@David_Rothstein: Oooh, interesting. I missed that. That might cool, even for people who don't ever want overlay enabled. Will try to test soon.
#274
Cliff - April 28, 2010 - 22:02@David_Rothstein, I agree that your approach would work. In fact, from a design standpoint, it makes more sense than an overlay. With an overlay, all pages with the same border could look the same, or at least similar enough for the user to goof. And that really won't show up as a problem until you have a lot of users working with it on rather large sites — in other words, sites with many pages that are similar in overall format.
With your approach (if I understand it correctly), there is a unique identifier in the link text pointing back to the page on which this work is being done: The title of that page. It's a simpler fix at all levels, and it's accessible.
If that approach were adopted, would Overlay be removed from core because it would no longer be necessary? Or would it simply be turned off by default?
#277
cha0s - April 29, 2010 - 05:00I have a feeling everyone's gonna come out of the woodwork against this one, but I had the idea so I made it happen and figured I'd share it.
This patch adds a new function, drupal_get_breadcrumb_back(), which returns the path that David ascertains with his current patch. That code has been updated in a couple ways; it doesn't act if the user is anonymous, and only adds the back link if the back path is different than the front page (as that would be redundant with 'Home').
So, I'll let the image/patch tell you the rest.
Attachment Size Status Test result Operations
Attachment Size Status Test result Operations
breadcrumb_back.png 66.21 KB Ignored None None
659488.patchreview 4.78 KB Ignored None None#278
cha0s - April 29, 2010 - 05:06Oops, copy paste is bad mmkayy...
Attachment Size Status Test result Operations
Attachment Size Status Test result Operations
659488.patchreview 4.46 KB Ignored None None#279
kika - April 29, 2010 - 10:02Great proposal, but:
1) I think it warrants a separate issue, this thread is way too lengthy to work on
2) Note that there is a similar UI proposal in the works what works other way around -- a special link getting _back_to_the_admin_page_ for "Demonstrate block regions" functionality. #655416: "Demonstrate block regions" bugs with regions, navigation, overlay and the mockup: http://img.skitch.com/20100421-xdnrpebeg4ty8g6ybyk1178cyp.jpg
This means the context-aware backlink needs to be nicely abstracted so in different scenarios different link content can be injected. Also, it should be bolted to permanent place in the page (likely docked to the menubar) and work both in admin and non-admin pages.
#280
Owen Barton - April 29, 2010 - 12:14Agreed that we should move this into a different issue, and that we should have some reasonable abstraction.
I also think that we should probably steer clear of sessions, unless someone has a way of ensuring this works properly across multiple tabs. I was thinking more along the lines of a persistent querystring parameter (like destination=), or possibly a context style URL (e.g. news/drupal-7-released/admin/build/modules), where everything in front of admin is removed from $_GET['q'] and stashed somewhere for later reference, in the same way the language prefixes work.
In terms of UI, the "back" (<<) breadcrumbs are an interesting idea and do make sense to me. I am not sure if that is a bit to unusual from a UX point of view though - I was thinking more of just having a normal link, positioned vertically in line with the breadcrumbs, but floated all the way to the right.
#281
kika - April 29, 2010 - 12:33For me, messing with breadcrumbs does not feel right and UX will start wildly differ in different themes. I'd go for a special (centered) docked element as suggested by yoroy http://img.skitch.com/20100421-xdnrpebeg4ty8g6ybyk1178cyp.jpg
#282
Owen Barton - April 29, 2010 - 17:32Yeah - that is more what I was thinking of.
#283
EvanDonovan - April 29, 2010 - 18:05I really like yoroy's design mockup. That might please everyone. We should move to another issue if we're going to have actual code, though.
#284
cha0s - April 29, 2010 - 21:00Yeah, that's pretty sexy. My only concern is, is it too late to get in? Are we pursuing this as an alternative to overlay or introducing this in addition to the overlay?
#285
kika - April 30, 2010 - 10:57Have we not been in that backlink-land? #546694: "Back to the live site" is misleading and incorrect #548806: No breadcrumbs in Seven ?
#286
Owen Barton - April 30, 2010 - 13:04Actually, reading those I think what is discussed here is different, but I suspect closer to what Mark Boulton and co were aiming for. It looks to me that the mockups showed a "Back to front page" link and someone added that hard coded (which was pointless, as home is already in the breadcrumbs), but I think the intention was for that to be context sensitive to the last non-admin page you were on, which is what we are looking at here.
Either way, the main point is that the Overlay was intended to give the user a context about where they "are" on the site, but currently it just gives a thin dark border that makes the underlying site barely visible (especially anything specific to the actual page you were on), and an "X" button that takes them back to the last non-admin page they were on. My feeling is that a well placed "Back to "" link as described above would provide this context better than the current Overlay, as well as the same functionality as that "X". It could replace the overlay completely (we could then use modal dialogs for temporal interactions, such as confirmations - which I think is a more valuable use overall), but even if the Overlay stays at very least this link would at least help fulfill the underlying user requirement of context that the overlay is (IMHO) failing to provide.
#287
kika - April 30, 2010 - 14:12What is missing to have an actual code? The backlink-storing is already in place, we just need a permanent place for backlink in templates and styling (I can help with the latter). Where this stuff should live at first place, file-wise? If it is bolted to menubar (toolbar is optional) then the presentation should be in the same place where menubar? How to make it work for #655416: "Demonstrate block regions" bugs with regions, navigation, overlay ? Does it need a special alter hook or render altering will do?
Comments
#1
Reposting the latest patch from @cha0s on that issue.
Marking "needs work" since we seemed to agree that rather than making this inline with the breadcrumbs, it would be better to have it styled in the same way as what is being proposed at (and whatever eventually comes out of) this issue: #655416: "Demonstrate block regions" bugs with regions, navigation, overlay
Owen also suggested (see above) that perhaps we don't want to use sessions since that could cause issues when the user has multiple browser tabs open. That's an interesting point, although given that the point here is to help maintain context it's kind of tricky situation no matter what. If you have two browser tabs open (to different non-admin pages) then go do an administrative task in one, then another administrative task in the other, then switch back to the first... well, your "context" (from a mental standpoint) is probably lost anyway :) In some ways, using $_SESSION might actually be sensible in that case, since it guarantees that the link you see will always take you back to the last non-administrative thing that you were doing (regardless of what browser tab you were doing it in). However, visually it would look a bit strange I guess.
#2
This makes sense. Though we need proper getter/setter functions.
#3
Do we really have to replicate the browsers 'Back'-button functionality? #655416: "Demonstrate block regions" bugs with regions, navigation, overlay is a pretty special case and I doubt this approach will help the 'keep context' problem overlay wants to solve.
#4
> Do we really have to replicate the browsers 'Back'-button functionality
As far as I understand, "Back to x"-button is functionally equivalent to closing overlay with (x) button. It is not the same as "Back" when you happen to be deeper in admin pages.
#5
Subscribing.
#6
I wonder should it be based on #787940: Generic approach for position:fixed elements like Toolbar, tableHeader?
#7
Doesn't work on Garland, which presumably overrides the theme function.
Also, I find it looks a bit strange to have the the 'home' link surrounded by << >> -- looks like it's quoted!
PS. But in general, this is great :)
#8
Great stuff.
This is what the overlay is about, and it really makes sense to built up an alternative that keeps the most important part (poorly disguised subscribe post).
#9
kika in #4 is correct, as far as I understand the proposal. This is not just the same as the back button, since you can be multiple levels deep in the admin interface.
IMO, although this is not backed up with testing (yet?), this would work better for most administrative tasks, whereas the overlay would work better for quick tasks triggered by the clicking of contextual links.
Perhaps we could have overlay in some form for contextual links (and adding/editing content?), but use this for pages like blocks and modules, which I really did *not* want to see in the overlay. That might be a compromise that would satisfy most people, as long as the accessibility issues with Overlay can be resolved.
(Subscribing... :) )
#10
> This is not just the same as the back button, since you can be multiple levels deep in the admin interface.
That's correct. I tried the patch on Stark theme, and starting from node/x (ie some random 'front-facing' content), went into an admin page at random, went several levels deep. The 'back to ...' link remained constant at the last non-admin page I was on.
#11
Anyone got code or ideas how to style that tabby thing from http://img.skitch.com/20100421-xdnrpebeg4ty8g6ybyk1178cyp.jpg ?
#12
Have a look at #787940: Generic approach for position:fixed elements like Toolbar, tableHeader
With that patch this will be much easier.
#13
Excuse my simple brain. Understood that this would be a more smartypants back button.
Can we keep the visual design discussion in #655416: "Demonstrate block regions" bugs with regions, navigation, overlay though?
Any working patch here should focus on the abstracted functionality, but keep #655416: "Demonstrate block regions" bugs with regions, navigation, overlay in the loop if you do.
#14
Thanks for opening this issue David.
Before we get too far, I think we should carefully consider the use of session vs. non-session solutions here. Users expect separate tabs to be separate, they never expect an action (with the exception of a form submit or a clearly labeled action link) in tab A to have an effect or side effect in tab B. In my experience when this happens this almost always results in confusion. I can think of several situations where I would want to go into 2 or more simultaneous admin activities, yet still want to go back to the last content page I was on in each case - not just the one I happened to come from last. Of course, there may be some method to prevent (or at least limit) side effects with sessions, or we could use some link state mechanism as I described previously.
#15
I changed a few things in this new patch, notably removing the front-end stuff from before.
The function is invoked in the preprocess hook as before... due to the way this is implemented, it must be called on every page or else context could be lost. It's not the best in the world but hey.
Owen, I'm interested in your 'link state mechanism'... I studied many of the issues surrounding this in detail and didn't find that. Please share.
#16
status for testbot
#17
It's in the description...
The latter one has the advantage of being essentially the same as the way overlay URLs work, except that the '#' is replaced with a '/'.
#18
Ahh interesting... I'm going to give this a shot very soon.
#19
Check out this craziness.
#20
The last submitted patch, 787896.patch, failed testing.
#21
Hm, strange tests to fail.
#22
I might be asking for a smackdown, but I think we actually need to rewrite $_GET['q'] to complete the deception that we're on an admin page.
#23
The last submitted patch, 787896.patch, failed testing.
#24
#22: 787896.patch queued for re-testing.
#25
That last patch applies nicely in my sandbox. However, I'm still having trouble tracking down where I would see it expressed. I did see a screenshot in an IRC discussion, but it must be that drupal_get_last_non_admin_page() is written in somewhere else to produce the link back.
Anyways, I do like the idea of this patch.
#26
The last submitted patch, 787896.patch, failed testing.
#27
Well, this isn't supposed to be the actual themed part. This is just supposed to be the logic.
Regardless, it's starting to look like everyone has forgotten about this issue...
#28
#29
Oh, hrm. I guess I should read an issue before just blatantly bumping it to 8.x since it's a feature that changes the UI after UI freeze, and doesn't fix a critical in the process. Still, though. Isn't it a bit late for this? It took us some 150 replies over at #655416: "Demonstrate block regions" bugs with regions, navigation, overlay to come to consensus about how to approach that problem, and I'd like to get a beta out the door here in a couple of weeks. This could be added by contrib for this release, no?
#30
Since Overlay is still pretty much unusable for me, this would still be the proper solution.
Moving back to 7.x + attaching a cleaned up and revised patch based on the David's original one for discussion and review. Alternatively, to make this code possible to work from contrib, I think we'd have to bring some flexibility into theme_breadcrumb(), basically to allow for an optional prefix/suffix, or similar, generally speaking: slightly change it so that it respects more stuff being passed to it.
#31
The last submitted patch, drupal.breadcrumb-back.30.patch, failed testing.
#32
woah, holy cow. I mistakenly had this patch still applied on my dev site, and thus stumbled over the link while manually testing something else. Awesome idea + experience, totally rocks.
#33
I'd love to see this feature implemented in D8 for those users who have the Overlay disabled.
#34
Note: I'd also love to see this implemented as a D7 contrib module if possible.
Other than positioning and styling, is there anything that would prevent the functionality from being reproduced as a contrib module?
#35
@Everett: I think it could be replicated in D7 contrib via an implementation of hook_preprocess_breadcrumb and theme_breadcrumb in a contributed module or theme. The back link for the breadcrumb would probably have to be set in hook_init() or something, though.
#36
Right, this shouldn't be too hard to do as a contrib module if there is interest.
Actually, I don't even think you'd need hook_init(), would you? You could probably just do everything in the breadcrumb theming and preprocess functions. (After all, that's more or less the only place in core that this patch touches.)
#37
Speaking of, implementing this as an option (among some others) is one of the stated goals of http://drupal.org/project/breadcrumb
#38
@sun: Last commit 6 years ago by Matt Westgate? So I take it this is an old module that you have commandeered? :) I was aware of Custom Breadcrumb, but I didn't know if this would be in scope for a 7.x version...guess maybe Breadcrumb module will supersede all the many breadcrumb modules.
@David_Rothstein: I thought #'s 22 & 30 made it sound like something more needed to be changed. But I think you're right actually.