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

feature request: easily move pattern from one proxy to the other #131

Open
nvalexander opened this issue Mar 28, 2024 · 3 comments
Open
Labels
snippet Code snippet

Comments

@nvalexander
Copy link

I think that it would be great if a dropdown would be added to each pattern row, allowing uses to move them to a different proxy. Its place should at the end of the row.
To make room for this dropdown, the Quick Add dropdown could be removed from the start of the column. As is, chosing something from the QuickAdd dropdown overwrites your well-thought pattern, without confirmation and with a counterintuitive ways to undo the change.

@erosman
Copy link
Collaborator

erosman commented Mar 28, 2024

I think that it would be great if a dropdown would be added to each pattern row, allowing uses to move them to a different proxy. Its place should at the end of the row.

Let's see if there is a popular demand for such a feature.
There is a pattern import/export feature but that applies to all patterns under a proxy.

something from the QuickAdd dropdown overwrites your well-thought pattern, without confirmation and with a counterintuitive ways to undo the change.

Confirmation can be annoying, if every action results in a modal popup asking "Are you sure you want to do that?", which then has to be clicked to continue.

Editing & importing are non-destructive. Save must be clicked to apply changes.

@erosman
Copy link
Collaborator

erosman commented Mar 31, 2024

For now, the following script can be used to move a pattern from one proxy to another.

(() => {
  // ----- move pattern from one proxy to another
  // user settings
  const fromProxy = 1;                                      // move from the 1st proxy
  const patternIndex = 1;                                   // move the 1st pattern
  const toProxy = 3;                                        // move to the 3rd proxy
  // end of user settings

  const pattern = document.querySelector(`details.proxy:nth-of-type(${fromProxy}) .pattern-row:nth-of-type(${patternIndex})`);
  if (!pattern) { return; }

  const target = document.querySelector(`details.proxy:nth-of-type(${toProxy}) .pattern-box`);
  if (!target) { return; }

  target.appendChild(pattern);
})();

@nvalexander
Copy link
Author

I am not terribly pressed by the number of patterns that need to be moved. I just find it counterintuitive to have tens of dropboxes that, at best, are useless, and in the worst case scenario may be destructive, by overwriting a pattern that I already picked.

@erosman erosman added the snippet Code snippet label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snippet Code snippet
Projects
None yet
Development

No branches or pull requests

2 participants