To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #141 (closed defect: fixed)

Opened 2 years ago

Last modified 13 months ago

Browsing away from Media Engine while isSelecting() = true should cause isSelecting() = false

Reported by: johnnyoffline Owned by: tboutell
Priority: major Milestone: 1.5
Component: apostrophePlugin: Media Version: trunk
Keywords: Media Engine, 1.5rc2 Cc: team@…
Symfony version: 1.4

Description

If you are in the Media Engine in Selecting mode where you are choosing images for a Slideshow but instead of hitting Save or Cancel you decide to browser away from the media engine, the Selecting state should automatically cancel.

We could use javascript to invoke isSelecting = false when the user browses away from the page.

Change History

Changed 2 years ago by boutell

  • status changed from new to accepted
  • milestone changed from 1.0 to 1.0.9

Changed 23 months ago by boutell

  • milestone changed from 1.0.9 to 1.1

Changed 21 months ago by boutell

  • milestone changed from 1.4 to 1.5

Changed 17 months ago by tboutell

  • owner changed from boutell to tboutell

Changed 16 months ago by johnnyoffline

  • cc geoffd, wjohnald, mgrosse, added
  • version set to trunk

This is still a really important detail that is flying under the radar.

It's kind of a messy thing to deal with.

Clear selecting if the user leaves media, but not if the user is simply filtering media.

You're refreshing the page but you're coming back to the same location.

So it's more like:

Clear media if the user clicks the site navigation, header link, or any global toolbar items ?

Changed 15 months ago by geoffd

  • keywords Engine, 1.5b added; Engine removed

Changed 15 months ago by tboutell

Don't forget to not freak out if the user is opening one of those links in a new tab. It's very kosher to go mess about with the tag and category editors and then continue your selection.

Changed 15 months ago by geoffd

  • keywords 1.5rc2 added; 1.5b removed

We don't cancel if someone is in /admin/media, but we do if they go anywhere else.

Changed 13 months ago by tboutell

  • status changed from accepted to closed
  • resolution set to fixed

Implemented in [2958]: cancel the media selection if the user browses away from the media repository by following a link.

I've done this as conservatively as I can to avoid breaking stuff. There is a synchronous AJAX request to cancel the selection, then the link operates as it normally would. This should avoid breaking things that have other, equally or more important fancified javascript handlers on them.

IMPORTANT: if you are creating a button or link that will just be a hook for media related javascript please *don't* write href="/#" as the leading / means my code can't detect this as an "inside the media repository, don't cancel" link. Instead write href="#" so it is clear that this is "within the page" and not a link to the homepage. I had trouble with a couple of these and wound up grepping for them.

The "cancel selection, then let the link operate normally" behavior assumes that links starting with '#' and links containing '/admin/media' anywhere inside them are local to the media repository and should not cancel the selection. Anything else cancels the selection before operating normally.

"Open link in new tab" does not trigger javascript at all, so it is not affected. This is good because it means you can open a tab to go manage tags or something without busting your selection, but I can't really take credit for it.

* * *

In the long term the whole business of selecting media should probably become a roll-down, "90% of the page" experience inside the page you came from, which we can think about for 1.6, certainly for 2.0.

Changed 13 months ago by tboutell

  • cc team@… added; rickybanister, johnnyoffline, agilbert, hillerj, dordille, geoffd, wjohnald, mgrosse, removed

Adding team to the cc:

Browsing away from the media repository now cancels any media selection in progress.

Note: See TracTickets for help on using tickets.