IRC log of undomanager on 2019-09-18
Timestamps are in UTC.
- 01:42:58 [RRSAgent]
- RRSAgent has joined #undomanager
- 01:42:58 [RRSAgent]
- logging to https://www.w3.org/2019/09/18-undomanager-irc
- 01:43:01 [koalie]
- RRSAgent, make logs public
- 01:43:11 [koalie]
- koalie has changed the topic to: https://w3c.github.io/tpac-breakouts/sessions.html
- 01:43:35 [koalie]
- koalie has left #undomanager
- 08:31:41 [RRSAgent]
- RRSAgent has joined #undomanager
- 08:31:41 [RRSAgent]
- logging to https://www.w3.org/2019/09/18-undomanager-irc
- 08:32:01 [drousso]
- Meeting: UndoManager API
- 08:32:13 [drousso]
- RSSAgent: Meeting: UndoManager API
- 08:32:25 [drousso]
- RRSAgent Meeting: UndoManager API
- 08:32:28 [heycam]
- heycam has joined #undomanager
- 08:32:36 [drousso]
- RRSAgent Scribe: Devin Rousso
- 08:32:43 [drousso]
- RRSAgent ScribeNick: drousso
- 08:33:08 [drousso]
- Meeting: UndoManager API
- 08:33:10 [drousso]
- Scribe: Devin Rousso
- 08:33:19 [drousso]
- ScribeNick: drousso
- 08:33:55 [drousso]
- RRSAgent create minutes
- 08:34:16 [drousso]
- megan: system apps dont have access to these functions
- 08:34:22 [drousso]
- megan: system apps have hidden contenteditable
- 08:34:27 [smaug]
- smaug has joined #undomanager
- 08:34:40 [drousso]
- (oops, I meant web apps, not system apps, for the last message)
- 08:35:00 [drousso]
- megan: platforms that have keyboards can do undo/redo with command/control Z/Y
- 08:35:09 [drousso]
- megan: without a keyboard, systems usually have gestures to allow for undo
- 08:35:26 [drousso]
- megan: but no way for web apps to know what these gestures are to enable undo/redo in content rich editors
- 08:35:36 [jyasskin]
- jyasskin has joined #undomanager
- 08:35:49 [Zakim]
- Zakim has joined #undomanager
- 08:35:52 [drousso]
- megan: on macOS, anything in Edit menu or triple-tap (examples) wouldn't notify the web content
- 08:36:48 [drousso]
- megan: API would allow interactive web applications to undo/redo more easily
- 08:36:56 [drousso]
- megan: proposal also allows for multiple undo/redo stacks
- 08:37:36 [drousso]
- megan: UndoItem has `undo`/`redo` functions and a `label` string for displaying (e.g. Edit menu) to inform user
- 08:38:19 [drousso]
- megan: UndoManager has a "stack" of items which can be accessed `item(n)`, as well as a current `position` and a total `length`
- 08:38:30 [drousso]
- megan: undo is "below" `position`, redo is "above"
- 08:38:54 [drousso]
- megan: UndoManager able to add items to the top and undo/redo the item at `posiiton`
- 08:39:20 [drousso]
- megan: extend element to create an `undoManager` per-element
- 08:40:11 [drousso]
- megan: `undoScope` defines the scope for `undoManager`, where items would crawl up the tree to find the closest `undoScope`
- 08:41:20 [drousso]
- megan: ability to coalesce/merge items in the stack, so that items can individually be put onto the undo stack, but can be done all at once during undo/redo
- 08:41:29 [drousso]
- megan: set via a `merge` flag on each item
- 08:42:29 [drousso]
- whsieh (prepares demo)
- 08:43:37 [sanketj]
- sanketj has joined #undomanager
- 08:44:11 [drousso]
- whsieh (demo of drawing text on an iPad, and explaining that each stroke is added to the undo manager, and undo/redo is coalesced for strokes in quick succession)
- 08:45:23 [drousso]
- whsieh (demo/explanation of how CodeMirror uses a hidden `contenteditable` to handle modifications, and how this doesn't work well with Edit > Undo/Redo)
- 08:46:23 [drousso]
- whsieh (continued demo showing how CodeMirror could take advantage of an UndoManager to let CodeMirror properly handle Edit > Undo/Redo, including setting the label)
- 08:46:44 [jyasskin]
- q+
- 08:46:46 [NavidZ_]
- NavidZ_ has joined #undomanager
- 08:46:49 [danclark]
- danclark has joined #undomanager
- 08:46:54 [smaug]
- q+
- 08:46:54 [heycam]
- q+
- 08:46:59 [NavidZ_]
- q+
- 08:47:02 [grisha_]
- grisha_ has joined #undomanager
- 08:47:04 [mustaq]
- mustaq has joined #undomanager
- 08:47:05 [birtles]
- birtles has joined #undomanager
- 08:47:14 [sanketj]
- q+
- 08:47:17 [whsieh]
- https://rniwa.github.io/undo-api/
- 08:47:21 [whsieh]
- https://whsieh.github.io/UndoManager/
- 08:47:25 [jyasskin]
- ack jyasskin
- 08:47:34 [danclark]
- q+
- 08:47:38 [takeru_]
- takeru_ has joined #undomanager
- 08:47:52 [drousso]
- jyasskin can the label match languages with the system?
- 08:47:57 [dmurph]
- dmurph has joined #undomanager
- 08:48:07 [drousso]
- whsieh seems like a similar problem to any other API vended from the DOM
- 08:48:13 [dmurph]
- queue+
- 08:48:19 [drousso]
- whsieh not a new problem to UndoManager
- 08:48:39 [drousso]
- rniwa would be weird for a chinese/japanese user to see a language that was in english
- 08:49:00 [drousso]
- whsieh cocoa platforms solved this by making the property names "localizedLabel" so it's obvious to the developer
- 08:49:08 [grisha_]
- queue
- 08:49:31 [jyasskin]
- ack smaug
- 08:49:32 [drousso]
- rniwa alternative approach that couldve been taken would be to have a limited list of labels that are hardcoded, but that wouldnt be extensible/flexble
- 08:49:47 [jyasskin]
- q+ persontomyright
- 08:49:57 [MasayaIkeo]
- MasayaIkeo has joined #undomanager
- 08:49:58 [drousso]
- smaug how does this integrate with existing undo manager? Firefox has internal undo manager. is this API on top of browser, or can user agent add items to undo stack?
- 08:50:20 [mustaq]
- queue+
- 08:50:26 [drousso]
- rniwa browser looks at currently active focusable area and walks up DOM tree to find first ancestor with `undoManager` and adds items to that
- 08:50:46 [jyasskin]
- ack heycam
- 08:50:48 [drousso]
- rniwa callbacks in that case are browser "functions"
- 08:50:49 [smaug]
- q-
- 08:51:06 [birtles]
- q+
- 08:51:15 [saschanaz]
- saschanaz has joined #undomanager
- 08:52:21 [drousso]
- heycam this is a bit different than other cases of page text being used in chrome, as it's possibly the first time it's used in conjunction with system text
- 08:52:30 [drousso]
- whsieh that is a bit odd
- 08:52:55 [drousso]
- heycam what's the advantage of merging being in the API vs having the developer doing it themselves?
- 08:53:00 [drousso]
- whsieh mainly for convenience
- 08:53:32 [drousso]
- rniwa browser could do its own things, so the only way to be able to merge with the browser is to have an API level merge since the browser created the item
- 08:53:55 [drousso]
- heycam so both system and user items are present in the list?
- 08:53:59 [drousso]
- whsieh rniwa yes
- 08:54:46 [drousso]
- rniwa right now, execCommand cant really be used because of how it affects the undo/redo stack, which isn't otherwise able to be affected by script (without this proposal)
- 08:55:15 [jyasskin]
- ack NavidZ_
- 08:55:20 [drousso]
- whsieh if you want to augment/override an existing execCommand, you might want to replace the default label
- 08:56:21 [drousso]
- NavidZ_ does the crawl up the ancestor keep going if the stack is empty?
- 08:56:40 [drousso]
- whsieh no, we want to stop if you reach an ancestor that has an undo manager but its stack is empty
- 08:56:51 [jyasskin]
- ack sanketj
- 08:56:57 [heycam]
- q+
- 08:56:58 [drousso]
- whsieh otherwise, if you kept undoing it would suddenly start undoing things elsewhere on the page
- 08:57:20 [drousso]
- sanketj is the label idea a concept that's from the mac?
- 08:57:21 [drousso]
- whsieh it exists on macos and ios
- 08:57:28 [drousso]
- sanketj other apps can customize that?
- 08:57:32 [drousso]
- whsieh yes, native apps can customize it
- 08:58:00 [drousso]
- rniwa this label is important for accessibility, like for cases where the user cant see what UI is on the screen
- 08:58:35 [drousso]
- sanketj what about pages that already have the concept of an undo manager?
- 08:58:46 [sidvishnoi]
- sidvishnoi has joined #undomanager
- 08:58:52 [drousso]
- rniwa ideally, those pages would sync with the undo manager
- 08:59:04 [drousso]
- sanketj you'd have to plug into using this UndoManager API in order to do this functionality?
- 08:59:14 [jyasskin]
- ack danclark
- 08:59:20 [drousso]
- rniwa yes, since the OS itself doesn't have such a primitive, so there needs to be an API
- 08:59:48 [drousso]
- danclark what's the fragility of this if the page has been modified since an undo function was created?
- 09:00:09 [drousso]
- danclark like if some scripted action modifies the state of the DOM after an undo item was added
- 09:00:24 [drousso]
- whsieh this a problem right now if you built your own undo stack system
- 09:01:20 [drousso]
- danclark old edge HTML would try to apply something reasonable to undo/redo items as a result of scripted actions
- 09:01:35 [drousso]
- rniwa that assumes that scripted actions are as a result of some interaction, which isn't the case here
- 09:02:32 [drousso]
- rniwa we could add something in the future that could do that sort of "house keeping"
- 09:02:40 [jyasskin]
- ack dmurph
- 09:03:30 [drousso]
- dmurph would be cool if undo state could be serialized/saved, so you could come back later and undo a bunch of stuff
- 09:03:44 [drousso]
- dmurph but it seems like that isn't completely possible due to the browser items
- 09:04:10 [drousso]
- whsieh we could probably serialize most regular text actions, but there are some actions that wouldn't be serializable
- 09:04:56 [drousso]
- rniwa you could use a MutationObserver to see what the browsers doing (at least for user commands), and serialize it yourself to save/restore
- 09:05:20 [drousso]
- dmurph potential abuse scenarios? something spamming the stack?
- 09:05:30 [drousso]
- whsieh probably want to gate this on some sort of user interaction/activation
- 09:05:52 [drousso]
- whsieh most actions are probably as a result of a user action
- 09:06:16 [heycam]
- q-
- 09:06:16 [drousso]
- whsieh might also want some maximum list of items in the list, as without that you may run into memory/performance issues
- 09:06:44 [drousso]
- dmurph there could be a conflict between serializing for save/restore and having a limit on the number of items
- 09:06:59 [christianliebel]
- christianliebel has joined #undomanager
- 09:07:10 [drousso]
- whsieh thats true, but it's a potential tradeoff that we'll have to make and we'll see if it's really requested
- 09:07:40 [drousso]
- grisha_ setting a restriction may have problems for huge documents with things like find and replace
- 09:07:45 [jyasskin]
- ack persontomyright
- 09:07:46 [drousso]
- whsieh you could merge them all together though
- 09:09:02 [heycam]
- q+
- 09:09:02 [drousso]
- johannas i feel like we'd likely only put one item on the undo stack, so we get the callbacks, but we'd still maintain our own stack
- 09:09:34 [drousso]
- johannas collaborative editing might cause the undo stack to grow or shrink from the other person
- 09:09:52 [christianliebel]
- q+
- 09:09:57 [drousso]
- johannas and using the undo stack may not work nicely with preserving the local undo stack between people who are collaborating
- 09:10:19 [jyasskin]
- q+ to talk about how abuse only hurts yourself
- 09:10:23 [drousso]
- johannas gating behind a user gesture may prevent collaborative editing undo/redo since they can happen whenever
- 09:10:29 [drousso]
- whsieh that is still being considered
- 09:11:40 [drousso]
- whsieh adding a new undo would remove all existing redo items
- 09:13:52 [drousso]
- sanketj it seems like what he really wants is a way of setting the undo/redo label independently of adding/removing items from the stack
- 09:14:02 [drousso]
- rniwa that would be harder to do at a native level
- 09:15:50 [jyasskin]
- ack mustaq
- 09:16:03 [drousso]
- johannas this proposal is nice because modals wouldn't be able to break/pollute the main undo stack since you can scope it to a node
- 09:16:38 [jyasskin]
- ack birtles
- 09:16:40 [drousso]
- mustaq (sorry i missed this)
- 09:16:49 [drousso]
- rniwa whatever the browser does right now, this wouldn't affect that
- 09:18:09 [drousso]
- birtles would cross origin navigation keeps the undo/redo stack?
- 09:18:22 [drousso]
- rniwa this hasn't been defined in the spec yet
- 09:18:44 [drousso]
- s/birtles/musaq (for last message)
- 09:18:53 [drousso]
- s/birtles/mustaq (for last message)
- 09:19:20 [drousso]
- birtles is there interop between browsers for what gets added by the browser to the undo/redo stack? is there a way to check?
- 09:19:44 [drousso]
- rniwa undo/redo behavior is really dependent on the platform, and probably can't be spec
- 09:19:57 [drousso]
- birtles can a web developer inspect and figure out what is getting added?
- 09:20:10 [drousso]
- rniwa you may be able to intercept various events and check the stack or the DOM
- 09:20:28 [drousso]
- birtles worried about adding a redundant item because the system already added it
- 09:20:47 [drousso]
- rniwa we could add an undo "change" event that would be fired (i missed the rest)
- 09:21:38 [drousso]
- birtles are values on the undo item preserved?
- 09:21:56 [jyasskin]
- ack heycam
- 09:22:04 [drousso]
- whsieh yes, but we should also probably add some sort of `data` that can be held by the item
- 09:22:49 [jyasskin]
- q+ johannes
- 09:23:21 [drousso]
- heycam on platforms where form control scoping isn't per-page, would form control items automatically create their own scope?
- 09:23:45 [drousso]
- rniwa the spec could be made to allow the platform to do different things
- 09:24:20 [drousso]
- whsieh is it difficult to add this functionality?
- 09:24:24 [drousso]
- heycam possibly not
- 09:24:44 [drousso]
- whsieh WebKit has the opposite problem, where everything is global, so WebKit has to do the work to split it up
- 09:24:58 [drousso]
- heycam the API should probably be flexible between platforms then
- 09:25:02 [drousso]
- rniwa yes, we agree
- 09:25:15 [jyasskin]
- ack christianliebel
- 09:25:18 [jyasskin]
- q- johannes
- 09:26:03 [drousso]
- christianliebel what happens if i use an english OS but the app is a different language? what would the label do then?
- 09:26:19 [drousso]
- christianliebel what's the "interaction" between the system, app, and page's languages?
- 09:26:38 [drousso]
- christianliebel what about if any of those are changed in the middle of editing?
- 09:26:50 [drousso]
- whsieh this may also be a problem on macOS right now too
- 09:27:03 [drousso]
- christianliebel having a set of predefined operations may be useful
- 09:27:31 [drousso]
- whsieh that would help the editor case, but we'd like this to be powerful enough to handle feasibly anything that would want to be undoable on the web
- 09:27:42 [drousso]
- rniwa labeling undo/redo doesn't appear to be a macOS only thing either
- 09:28:02 [jyasskin]
- ack jyasskin
- 09:28:02 [Zakim]
- jyasskin, you wanted to talk about how abuse only hurts yourself
- 09:29:04 [drousso]
- jyasskin limiting abuse seems like it only would hurt the page that's doing the abuse
- 09:29:16 [jyasskin]
- s/limiting abuse/abuse/
- 09:29:32 [drousso]
- whsieh that could potentially hurt other tabs too, like having a huge undo stack and switching between tabs
- 09:30:41 [heycam]
- present+
- 09:30:47 [drousso]
- present+
- 09:30:47 [sanketj]
- present+
- 09:31:00 [grisha_]
- present+
- 09:31:05 [mustaq]
- present+ Mustaq Ahmed
- 09:31:10 [drousso]
- present+ whsieh
- 09:31:13 [drousso]
- present+ rniwa
- 09:31:20 [drousso]
- present+ megan
- 09:31:20 [drousso]
- RRSAgent make logs public
- 09:33:21 [MasayaIk_]
- MasayaIk_ has joined #undomanager
- 10:06:29 [MasayaIkeo]
- MasayaIkeo has joined #undomanager
- 12:07:21 [christianliebel]
- christianliebel has joined #undomanager
- 13:19:06 [Zakim]
- Zakim has left #undomanager
- 16:24:46 [dom]
- dom has joined #undomanager
- 16:24:50 [dom]
- RRSAgent, draft minutes
- 16:24:50 [RRSAgent]
- I have made the request to generate https://www.w3.org/2019/09/18-undomanager-minutes.html dom
- 16:24:56 [dom]
- RRSAgent, make log public
- 16:26:34 [dom]
- dom has left #undomanager