LuckPerms

LuckPerms

41.4k Downloads

Preview/undoing of web editor changes

Phoenix616 opened this issue ยท 5 comments

commented

When running the /lp applyedits command it will instantly apply the changes. It would be nice to have a way to preview which changes where made so that you can catch errors (That can happen faster with a GUI than with commands). Another solution could be to have a quick way of undoing these applied edits.

commented

This is definitely possible to add, however, I'm not sure how it should be done.

It could be done via:

  1. A separate command - something like /lp previewedits ..., however, most people just copy/paste the command anyway.
  2. An extra confirmation in-game - so, show the change diff, then provide a message the user has to click to "confirm" - however, this adds an extra step, which could get annoying for people who don't want to check.

I'm not massively keen on either of those.

Would perhaps being able to see a diff view in the editor work as an alternative?

commented

Hm, I see what you mean. Maybe a quick way to undo the changes could help? And a preview in the editor would probably also help. (maybe when the save button is clicked?)

commented

I've thought about undo's before (more generally for all commands), but ultimately decided against it - it ends up getting kinda complicated and messy to handle.

I think the best place for a diff preview is in the editor itself. If you have the option to preview changes, it should remove the need for an undo command in-game.

commented

perhaps another option would be to apply the changes as we do currently, but relaunch the editor showing which rows were updated and how (add/remove/modify). A bonus feature would be an undo or revert to previous setting?

I tend to use copy paste a lot after doing a /lp user xxxx editor and then run all the changes on the console. I've spotted a couple typos after re-opening the editor and had to manually update them (once I found them of course). :-)

commented

I've moved this issue to the Web Editor repo.

I like the suggestion, hopefully I'll get a chance to work on it soon.