Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix #2076: Two indistinguishable events for different cases of working set reordering #3080

Merged
merged 7 commits into from
Jun 14, 2013
Merged

Fix #2076: Two indistinguishable events for different cases of working set reordering #3080

merged 7 commits into from
Jun 14, 2013

Conversation

TomMalbran
Copy link
Contributor

I went back to the working set sort and managed to merge both events workingSetReoder and workingSetSort into one workingSetSort and leaving almost the same functionality as before fixing #2076.

@TomMalbran
Copy link
Contributor Author

I added a few fixes here so that #3440 is still fixed after this request is merged.

@ghost ghost assigned redmunds Jun 7, 2013
@njx
Copy link
Contributor

njx commented Jun 7, 2013

Reassigned to @redmunds

@redmunds
Copy link
Contributor

@TomMalbran Sorry it's taken so long to get to this one. I started to review it, but there's a merge conflict. Can you merge the latest code? Thanks.

@TomMalbran
Copy link
Contributor Author

Sure, I'll fix the merge issue. Thanks for looking into this.

@TomMalbran
Copy link
Contributor Author

@redmunds Merged with master and fixed the conflict issue.

* Triggers a WorkingSet Sort event
*/
function triggerWorkingSetSort() {
$(exports).triggerHandler("workingSetSort");
Copy link
Contributor

Choose a reason for hiding this comment

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

The sortWorkingSet() function also calls $(exports).triggerHandler("workingSetSort") but the event does not seem to be handled anywhere. It should either be removed, or call triggerWorkingSetSort() directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is used on the WorkingSetView.js#L249. It was initially used to save the working set state into the preferences, which isn't required so is now mainly used to disable the automatic sort and have both sort methods trigger 1 event.

@redmunds
Copy link
Contributor

Done with initial review.

@TomMalbran
Copy link
Contributor Author

@redmunds Fixed the comment issues. Check on my replies about the event to see what we can do next. Thanks.

@redmunds
Copy link
Contributor

Done with second review.

@TomMalbran
Copy link
Contributor Author

I updated a bit the comment on the workingSetSort event and added a new workingSetDisableAutoSorting called every time 2 files are swapped when dragging and dropping them. This added a new event, but works better than before by not unnecessarily redrawing the working set after a drag/drop action. There might be a smarter way of figuring out when doing an automatic sort if it was previously resorted via a drag/drop action and avoid having the new event, but it is easier to do it like this.

@redmunds
Copy link
Contributor

Thanks! Looks good. Merging.

redmunds added a commit that referenced this pull request Jun 14, 2013
Fix #2076: Two indistinguishable events for different cases of working set reordering
@redmunds redmunds merged commit 358b264 into adobe:master Jun 14, 2013
@TomMalbran TomMalbran deleted the tom/fix-issue-2076 branch June 14, 2013 22:29
@peterflynn
Copy link
Member

Note: I've reopened #2076 for more discussion since this doesn't appear to address the main confusion/pitfall I was concerned about (and in some sense the event name change may have made it worse).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants