X Tutup
The Wayback Machine - https://web.archive.org/web/20201001120032/https://github.com/cloudflare/unsee/issues/204
Skip to content
This repository has been archived by the owner. It is now read-only.

Support undo/redo actions for query editing #204

Open
ferringb opened this issue Dec 20, 2017 · 1 comment
Open

Support undo/redo actions for query editing #204

ferringb opened this issue Dec 20, 2017 · 1 comment
Labels
Milestone

Comments

@ferringb
Copy link

@ferringb ferringb commented Dec 20, 2017

This is a fairly minor request, but when manually editing the query field- say to add alertname=My_Stupid_Alert, due to the JS manipulations that occur undo/redo logic isn't possible. Specifically since the text is converted to a different object, the browser cannot 'undo' that action.

When one screws up and removes long parts of the query, this is a bit annoying.

I only have a surface understanding of the DOM/events involved in this, but http://mattjmattj.github.io/simple-undo/ is an example that can likely be examined for which hooks we'd need to file. From there something like https://github.com/ArthurClemens/Javascript-Undo-Manager/blob/master/lib/undomanager.js gives an object approach for managing the queue of changes, and providing a 'history' that the undo/redo can act upon.

@prymitive
Copy link
Contributor

@prymitive prymitive commented Jan 11, 2018

Should be doable after #208, current code doesn't make it easy

@prymitive prymitive self-assigned this Jan 11, 2018
@prymitive prymitive added this to the v0.11 milestone Jan 24, 2018
@prymitive prymitive removed their assignment May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup