-
Notifications
You must be signed in to change notification settings - Fork 47
EZP-26523: Sorting UI for relation list edit view #990
Conversation
Thanks for opening this @ryanolee, we will try to do some reviews and see if we can help you get this into accepted form to merge. One initial question, in regards to debounce; this is only during initial rendering as you say right? Is there some other place we could hook into to avoid trying to make it sortable before rendering has completed? Review ping @mateuszbieniek, @adamwojs, .. |
Hi @andrerom, I personally found the debounce approach to be the best as it removed any chance for the Thanks! |
I think that we use debouncing in other places, so I think it should be fine. |
@ryanolee would you be able to rebase this on 1.13? I assume this is where you want this, not on a master that will never be released ;) |
Hi @andrerom, |
Hi @andrerom @mateuszbieniek, |
Then I was mistaken about debounce. We should be good with simple timeout:
|
@ryanolee could you please add this line as well:
|
ae96192
to
1c893a2
Compare
Looks like I accidentally closed the branch during the rebase. This should now be fixed. |
Made the change @mateuszbieniek 👍 |
👍 looks good |
I'm sending this to QA, however one of the test failures seems relevant and should be fixed in parallel if it is:
@mateuszbieniek You think you can find time for that this week? Or are you up for it @ryanolee ? |
@andrerom sure, I will give it a look. |
Hi @andrerom @mateuszbieniek , |
The test is failing due to this line:
We're missing
But now I'm ending with a different error : |
@ryanolee As there was a lot of fixing in tests (adding missing mocks and mocks fields) I created PR for this branch with changes, that should fix all broken tests (at least related to this PR 😉 ) |
Thank you very @mateuszbieniek much for helping to get tests working with this branch! I merged the PR into this feature branch. I will still try to get some tests written for this if I can get Grover set up 👍 |
One of the jobs failed with:
Is this maybe random due to timeout vs sometimes slow CI? |
@andrerom it's not related to this PR - I can get the same error on 1.13 branch. |
Indeed, so this is awaiting QA then. |
HI @andrerom @mateuszbieniek , |
Hi @andrerom @mateuszbieniek , |
Hi @andrerom @mateuszbieniek , Will this branch need tests writing for it before it is merged into the 1.13 . If so would either of you know where to begin with trying to write tests for this / how much of this needs testing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Approved on eZ Studio v1.13.5 with diff.
Couldn't reproduce the random order issues with or without the fix.
The new feature with manual reordering works fine.
Only a remark about UX. The mouse cursor could change to e.g. pointer shape to indicate to the user that reordering is possible.
@mateuszbieniek Can you merge this, and up? |
@andrerom on it. |
This PR is a continuation of #771 in relation to this issue https://jira.ez.no/browse/EZP-26523.
This PR has been reopened with a few changes to the original approach. Comments left on the older PR should have been addressed.
Notably, the
gallery-debounce
module is now used to initialize theY.Sortable
UI element the dom changes too quickly for it to properly load when the field is initially populated with related items.Y.later
could be used but conflicts with how events bind to the dom here https://yuilibrary.com/yui/docs/api/files/dd_js_delegate.js.html#l148 making Y.debounce a safer choice.Tests are missing pending an initial round of code review on this approach.