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

Preview/undoing of web editor changes #34

Open
lucko opened this issue Jan 8, 2018 · 7 comments
Open

Preview/undoing of web editor changes #34

lucko opened this issue Jan 8, 2018 · 7 comments
Labels
enhancement Suggestions to improve the application help wanted A good issue to start contributing

Comments

@lucko
Copy link
Member

lucko commented Jan 8, 2018

Taken from

LuckPerms/LuckPerms#655

@lucko lucko added the enhancement Suggestions to improve the application label Jan 8, 2018
@BrainStone
Copy link
Contributor

I suggest that we generate a diff similar to the one in the plugin and either display it when saving or add a button for it.

@lucko
Copy link
Member Author

lucko commented Jan 9, 2018

Yeah, I think doing both could work.

Maybe have it display over the top of the page (like the help menu) so it can be easily dismissed or closed.

@Turbotailz
Copy link
Member

Turbotailz commented Aug 17, 2018

In my opinion the best user experience would be to show a confirmation screen when the user clicks the save button and it displays all of their current updates (additions, deletions and changes). They can click a confirm button to send the data back to bytebin or cancel (maybe even remove changes).

I think we can solve this by changing up the JSON node data as follows:

  • add new: true to any new nodes (already added in my fork)
  • add changed: true to any updated nodes
    • add previous: {node} to store the unchanged state of the node (to show to the user later)
  • add deleted: true to any deleted nodes

This would allow us to loop through all the nodes and show the user which ones are new, changed and deleted. They can then confirm these are the changes they wanted and continue the save process (at this point the data would be sent to bytebin and a token returned).

I assume this change would break things LuckPerms side, as currently the deleted nodes are removed from the tabs.rows array which I guess you have some way of checking for that (my Java sucks so I wasn't able to make any sense of it 😛 ).

This is the only option I can think of, if you think it will work then I'm happy to do what I can on this side.

@BrainStone
Copy link
Contributor

BrainStone commented Aug 17, 2018

I dislike the idea of it slowing down the workflow.

I’d prefer to get the option to preview the changes with a button.

So maybe add a quick save button?
The save button would behave as you described and the quick save button behaves as before

@Turbotailz
Copy link
Member

Turbotailz commented Aug 17, 2018

Or Preview & Save buttons? Preview brings up a screen showing all the changes along with Save and Cancel buttons. Otherwise just click Save to save as normal.

This would still require a change in the object data.

@BrainStone
Copy link
Contributor

Sounds even better.

Though it should be fairly straight forward to implement the diff algorithm Luck uses in the plugin on the page. So no change in the data is needed, as you still have the original data.

@Turbotailz
Copy link
Member

Fair enough, if I could understand the algorithm better then I could probably do this myself.

@kynetp kynetp mentioned this issue Aug 25, 2019
21 tasks
@Turbotailz Turbotailz added help wanted A good issue to start contributing and removed target: web editor labels Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggestions to improve the application help wanted A good issue to start contributing
Projects
None yet
Development

No branches or pull requests

3 participants