Closed Bug 893796 Opened 11 years ago Closed 11 years ago

Remove drag handle on stage track events

Categories

(Webmaker Graveyard :: Popcorn Maker, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: thecount, Assigned: thecount)

References

Details

(Whiteboard: popbetter)

Attachments

(1 file)

Right now we have pretty terrible drag handles for track events in the stage.

If we remove this, we need a way to drag them.

If we allow the whole element to be draggable, we need a way to interact with the content.

We can handle this with single and double clicks, but I forget the logic. Going to ping Kate about that.
Assignee: nobody → scott
Cool thanks! Just what I needed.

This ticket is going to implement this: http://k88hudson.github.io/bestdraggable/#dblclick-container
Blocks: 895252
Whiteboard: popbetter
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

Updated.

Can we remove font awesome in another ticket?

I'm not a fan of changes just because I'm in this code.
Attachment #785241 - Flags: review- → review?(david.humphrey)
You removed the code that uses what I am asking you to remove. Seems to make sense to remove this now.
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

Bouncing this one to Kate.
Attachment #785241 - Flags: review?(david.humphrey) → review?(kate)
@Matt, ah cool, I was not aware.

That's legit, I'll remove it.
Can you remove the circle (it is problematic for single lines of text in particular) for now?

You could try replacing it with a tooltip that says "Double click to edit"  http://dl.dropbox.com/u/29163874/Screenshots/ku.png
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

ugh, our tooltip code was a bit of a rabit hole.

Anyway, I made a tooltip, and removed the green circle.

I had to make the tooltip not default to a top value, because the value it defaults to is static and not very useful.

Not setting it is more useful. Does what it is trying to do anyway, and is dynamic.

I also made the tooltip go away per track event if a double click to edit happens.

I considered a more global hide of tooltips for all track events if even one is double clicked to edit, but I didn't think it was worth it. This is better than nothing. Let's land this before it gets even bigger.

Last review was not a fail, but, putting it back on you anyway. r?
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

Moving this to Matt as I fixed some of his review comment concerns.
Attachment #785241 - Flags: review?(kate) → review?(schranz.m)
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

Some questions, but also a request.

Also, these tooltips are bringing back an old bug we had with being able to drag things out of the parent containers bounds in Chrome. https://dl.dropboxusercontent.com/u/8586348/new_Drags.png
Attachment #785241 - Flags: review?(schranz.m) → review-
Woah, that's a nasty bug. I don't remember that. What are the STRs to get that screen so I can debug what I broke?
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

I think I found a solution to all your issues :D
Attachment #785241 - Flags: review- → review?(schranz.m)
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

Would still like to see the option of no tooltip for Wikipedia as it has no edit case at all.

Also, I still managed to get the dragging bug to occur.
Attachment #785241 - Flags: review?(schranz.m) → review-
Comment on attachment 785241 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/153

Updated with a solution to the show stopper bug.

Going to try to walk through what happened.

You can see it in master if you try to drag a handle that's not yet selected.

Master (popcorn.mofostaging.net) STRs:

1. create a teaxt event.
2. deselect it.
3. try to drag it.

Now, my new draggable patch changes this:

It all started on these click changes: https://github.com/mozilla/popcorn.webmaker.org/pull/153/files#L6L102

This is a needed change, but it exposes the above steps on master, to happen all the time.

So what ends up happening when you try to move an event is this:

1. mousedown happens.
2. this deselects everything (to later reselect the single clicked on event)
3. closes the editor.
4. reselect the clicked on event.
5. open it in the editor.
6. creates all new editor inputs, including a new colour picker.
7. colour picker sets up callbacks for when it changes, so it can fire trackevent updates with the new values.
8. then sets the current track event colour value.
9. fires callback...
10 track event update.
11. new draggable elements are created.
12. we boned. the container we were dragging is now gone.

So the fix here is to setup the colour picker default value before we create a callback, thus a track event update doesn't happen when the editor is opened.

Whew.
Attachment #785241 - Flags: review- → review?(schranz.m)
Ah, good old mystery disappearing drag/resize handles.
Status: NEW → ASSIGNED
Epic troubleshooting
Staged: https://github.com/mozilla/popcorn.webmaker.org/commit/8655f046ae04ec3a9d54ac68aef0d1a0235de413

Needs verification.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(scott)
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Flags: needinfo?(scott)
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: