Skip to content

Christina/drag drop outline 3 - #4605

Merged
cahrens merged 4 commits into
bulk-publishingfrom
christina/drag-drop-outline-3
Aug 1, 2014
Merged

Christina/drag drop outline 3#4605
cahrens merged 4 commits into
bulk-publishingfrom
christina/drag-drop-outline-3

Conversation

@cahrens

@cahrens cahrens commented Jul 29, 2014

Copy link
Copy Markdown

Drag and drop on new outline page.

@polesye I will address your review feedback noted in #4550 tomorrow.
Can you take a look at the issue @talbs mentioned concerning the is-collapsible class?

@cahrens

cahrens commented Jul 29, 2014

Copy link
Copy Markdown
Author

Here is the comment about is-collapsible (from @talbs)

Issue: After working further on this branch, I noticed a bug that is caused by toggling the .is-collapsible class. In short, the arrow to the left of the item's title rotates when dragging. Looking at the styling, we will need this class to be consistently on every element that is collapsible in the UI (both the collapsed and expanded styling depend on it).

We may have to go the road of removing transitions or some other method than dropping this needed class.

Comment thread cms/static/sass/views/_outline.scss Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it a bug?

@polesye

polesye commented Jul 30, 2014

Copy link
Copy Markdown
Contributor

@talbs please take a look at my latest changes. I just disable transition when dragging via @include transition-property(none);

@cahrens

cahrens commented Jul 30, 2014

Copy link
Copy Markdown
Author

I just found a bug we will need to address. Dragging a unit into or out of a subsection does not update the state of the subsection (I assume this is true for sections as well).

For example,
Have a subsection with just a locked unit in it. The subsection shows as locked. Now drag that unit into a different subsection. Neither the source nor the target subsections update to show the new state.

@cahrens

cahrens commented Jul 30, 2014

Copy link
Copy Markdown
Author

Regarding bok choy test coverage, it would certainly be nice to have. But my experience with bok choy and drag and drop has been that the tests are flaky (I wrote drag and drop tests for the container page). Also, there is no way to do drag and drop without ActionChains (and testeng would prefer us not use them-- https://edx-wiki.atlassian.net/wiki/display/~clytwynec/Bok+Choy+Best+Practices+Questions).

Time permitting, I am willing to try a bok choy test (and in particular, I'd like it to cover the bug I noted above), but I do not plan to hold up this PR for that.

@talbs

talbs commented Jul 30, 2014

Copy link
Copy Markdown
Contributor

@polesye, you rock! Both of those fixes are great and my local outline looks and behaves very well. Things look good from my perspective.

👍

@cahrens

cahrens commented Jul 30, 2014

Copy link
Copy Markdown
Author

@polesye I responded to your feedback (and @talbs request to not show content or splints at unit level). I think the only remaining issue is the bug that parent xblocks will need to refresh when drag parent source is different from drag parent target. Actually, both section and subsection xblocks will need to update for dragging units. If you have time tomorrow, can you look into this? I have very little development time due to all the PR reviews and scrummaster duties.

@polesye

polesye commented Jul 30, 2014

Copy link
Copy Markdown
Contributor

@cahrens sure.

@polesye

polesye commented Jul 31, 2014

Copy link
Copy Markdown
Contributor

@cahrens bug is fixed. Please review my code and verify that everything works well.

@cahrens

cahrens commented Jul 31, 2014

Copy link
Copy Markdown
Author

@polesye Unfortunately that change doesn't completely fix it. It is only re-rendering the source parent view, but when you drag into a different parent, the target parent view needs to re-render also.

For example,

  1. Section and Subsection with release date in the past and no content (blue)
  2. Section and Subsection with release date in the past and a locked unit (black)

Drag unit from #2 to #1. #2 should turn blue and #1 should turn black

I'm thinking we will need to go to more of an eventing model (where the view listens to events fired by the drag and drop code and then refreshes the appropriate views).

@polesye

polesye commented Jul 31, 2014

Copy link
Copy Markdown
Contributor

@cahrens please take a look at 98c9d96.

@cahrens

cahrens commented Jul 31, 2014

Copy link
Copy Markdown
Author

@polesye seems to work. Any way to make it less "flashy"? You can definitely tell the rendering is happening twice.

@frrrances

Copy link
Copy Markdown
Contributor

Aside from known issues, lgtm. 👍

@cahrens

cahrens commented Jul 31, 2014

Copy link
Copy Markdown
Author

I believe this is ready to merge (Leslie has given a thumbs-up). I will wait until tomorrow so we can see test runs.

@polesye

polesye commented Aug 1, 2014

Copy link
Copy Markdown
Contributor

@cahrens Think you need these changes to fix flaky UnitPublishing bok-choy tests

cahrens and others added 4 commits August 1, 2014 16:42
* adding back in drag and drop indicators to outline DOM
* correcting visual display of drag action in outline UI
* adjusting styling of outline drag and drop indicators
* adjusting styling of drag and drop was-dropped state
@polesye

polesye commented Aug 1, 2014

Copy link
Copy Markdown
Contributor

👍

cahrens pushed a commit that referenced this pull request Aug 1, 2014
@cahrens
cahrens merged commit 04663f2 into bulk-publishing Aug 1, 2014
@cahrens
cahrens deleted the christina/drag-drop-outline-3 branch August 1, 2014 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants