Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Alphabetical sorting of all plugin links under the portal details panel" #664

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

modos189
Copy link
Contributor

@modos189 modos189 commented Aug 7, 2023

This reverts commit 747f876 (PR #653)

There was a conflict with some of the plugins. Let's improve the implementation, add a possibility to disable and bring back this feature

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

🤖 Pull request artifacts

file commit
IITC_Mobile-test.apk fbaf9f9
test-0.36.0.20230807.111216.zip fbaf9f9

See build on website

@xscreach
Copy link
Contributor

xscreach commented Aug 7, 2023

Provide more information about the conflict. Which plugin, what didn't worked, etc.

@modos189 modos189 merged commit b99dea2 into IITC-CE:master Aug 7, 2023
2 checks passed
@modos189 modos189 deleted the revert-sort branch August 7, 2023 19:11
@MysticJay
Copy link
Contributor

Plugin is sorting in a different way, causing IITC and the plugin reordering the toolbox permanently. The user is no longer able to interact with IITC's UI.

@MysticJay
Copy link
Contributor

The plugin in question uses MutantObserver to rearrange (not only sort) the links in the toolbox. IITC does the same in the same way, so every time something changes that toolbox DIV, both routines get executed, causing the other routine to execute again, as there is a new change.

The assumption that the links are always unsorted is wrong.

Yet I have not found a way to identify that an other plugin has intentionally arranged the links to allow IITC to ignore the change.

IMHO MutantObserver is a nice idea but counter productive here. There is no constant flow of new plugins loading after initial setup. OTOH there are tools to rearrange the links in a way that the user prefers. It would be sufficient to arrange the links once and done.

Thus I see three options:

  1. remove the MutantObserver and run the sort once all plugins are loaded.
  2. expose the sort routine so that it can be removed from MutantObserver or replaced/hijacked
  3. the built-in routine needs a switch that allows to skip the sorting.

@MysticJay
Copy link
Contributor

he plugin in question uses MutantObserver to rearrange (not only sort) the links in the toolbox. IITC does the same in the same way, so every time something changes that toolbox DIV, both routines get executed, causing the other routine to execute again, as there is a new change.

The assumption that the links are always unsorted is wrong.

Yet I have not found a way to identify that an other plugin has intentionally arranged the links to allow IITC to ignore the change.

IMHO MutantObserver is a nice idea but counter productive here. There is no constant flow of new plugins loading after initial setup. OTOH there are tools to rearrange the links in a way that the user prefers. It would be sufficient to arrange the links once and done.

Thus I see three options:

  1. remove the MutantObserver and run the sort once all plugins are loaded.
  2. expose the sort routine so that it can be removed from MutantObserver or replaced/hijacked
  3. the built-in routine needs a switch that allows to skip the sorting.

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.

3 participants