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] Moving items #378

Closed
JohnFawkes opened this issue Dec 22, 2021 · 3 comments
Closed

[FEATURE_REQUEST] Moving items #378

JohnFawkes opened this issue Dec 22, 2021 · 3 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change

Comments

@JohnFawkes
Copy link

Is your feature request related to a problem? If so, please describe.

Its not really a problem. more of a small improvement. moving items to another section.

Describe the solution you'd like

If there was a way you could implement a way in the interactive ui to move an item to a different section that would be a huge time saver. currently the only 2 ways to do it is to delete the item and retype everything into a new section or to ssh into the server and edit the config.

Priority

Low (Nice-to-have)

Is this something you would be keen to implement

No

@JohnFawkes JohnFawkes added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Dec 22, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Dec 22, 2021

Heya @JohnFawkes, thanks for your question.
When in edit mode, you can right-click on any item to copy, move, duplicate or delete it.

If you prefer the JSON editor, it's also possible to drag-to-rearrange objects there, as well as duplicate, insert, remove and edit items.


When in edit mode, and you hover over an item, there is a tooltip saying 'right-click for more options'. But do you think it's not obvious enough, or there would be a better way to indicate that there's a right-click menu?

I have got plans to support drag-and-drop to re-order items, which I think will be a lot quicker to use, but that's a task for another day.

Worth noting, that there's also an open issue (#366) preventing moving items within the same section. I'm aware of this, and will fix very soon.

@desrod
Copy link

desrod commented Mar 8, 2024

Circling back to this issue (and related/similar duplicates), there does not appear to be a way to move a section in the grouping, only items within the sections, if they don't have a pre-set ordering.

I tried editing the json via the tree config as well as the code editor, by slicing my section out from the bottom and moving it up. Both successfully 'edit' and 'save', but reloading the page results in the same order as before the edit.

I don't see any keys or values that would dictate a section order, so I'm not sure why my intended section keeps its place at the end of the list.

Is there another way that I'm not seeing, to move a section (with child items within it), higher in the page stack?


Edit: Looks like the changes only "stick" if I use the following process:

  1. Edit in code view (or cut and paste valid json from external editor into code view)
  2. Click 'Save Changes'
  3. Click 'Preview Changes' (this is the critical step)

If I edit in code view and save, but do not click 'Preview Changes', the changes are never persisted. Once I click 'Preview Changes', they seem to persist and my intended section move then works.

@Lissy93
Copy link
Owner

Lissy93 commented Mar 9, 2024

If I edit in code view and save, but do not click 'Preview Changes', the changes are never persisted. Once I click 'Preview Changes', they seem to persist and my intended section move then works.

Hmm, that's weird, I'll look into that

A better re-arrange option (preferable drag & drop) is on the roadmap, but I've got other higher priority tickets to work through first, and implementing this feature isn't super strait forward. Sorry, I know it's currently very cumbersome to rearrange items/sections.

If it helps, it should also work fine if you don't mind editing the raw YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change
Projects
None yet
Development

No branches or pull requests

3 participants