[00:02:41] Ah, OK. [01:27:19] (03CR) 10Krinkle: [C: 04-1] "Not sure why Jenkins marked SUCCESS, the build actually failed with:" [extensions/TemplateData] - 10https://gerrit.wikimedia.org/r/134928 (https://bugzilla.wikimedia.org/66920) (owner: 10Mooeypoo) [04:09:51] (03CR) 10Mooeypoo: "I have qunit locally, but I thought I removed it from the Gruntfile since it failed. It appears I didn't remove it properly." [extensions/TemplateData] - 10https://gerrit.wikimedia.org/r/134928 (https://bugzilla.wikimedia.org/66920) (owner: 10Mooeypoo) [08:24:34] (03PS2) 10Esanders: Defer building of MWReferenceSearchWidget index [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148070 [08:26:53] James_F|Away|Awa: https://bugzilla.wikimedia.org/show_bug.cgi?id=52061#c48 [08:42:15] (03PS21) 10Jagori79: WIP: [BrowserTest] Adding step definition and page object for external link scenario [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/122400 (https://bugzilla.wikimedia.org/63104) [10:53:22] (03CR) 10Esanders: [C: 04-1] "The dialog opens with an empty list on a page with lots of references, and resizes vertically to ~100px." [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (owner: 10Jforrester) [11:15:24] (03PS1) 10Esanders: Special case for measuring clippableContainer == body [oojs/ui] - 10https://gerrit.wikimedia.org/r/148357 (https://bugzilla.wikimedia.org/68370) [11:15:28] 3OOjs UI: OOjs UI: ClippableElements should clip to the viewport, not the body - 10https://bugzilla.wikimedia.org/68370 (10Ed Sanders) 3NEW p:3Unprio s:3normal a:3Ed Sanders When clipping to the body, assume we have the viewport to render in. Observed: http://i.imgur.com/PM4Uywk.png Expected: http://... [13:24:53] (03PS1) 10Vikassy: [BrowserTest] Language screenshots are uploaded every 5 seconds [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148368 [13:36:21] (03CR) 10Zfilipin: [C: 04-1] [BrowserTest] Language screenshots are uploaded every 5 seconds (031 comment) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148368 (owner: 10Vikassy) [13:39:17] (03PS2) 10Vikassy: [BrowserTest] Language screenshots are uploaded every 5 seconds [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148368 [13:46:11] (03PS1) 10Vikassy: [BrowserTest] Client logins only once to upload all screenshots [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148373 [13:48:50] (03CR) 10Zfilipin: [C: 032] [BrowserTest] Language screenshots are uploaded every 5 seconds [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148368 (owner: 10Vikassy) [13:50:36] (03Merged) 10jenkins-bot: [BrowserTest] Language screenshots are uploaded every 5 seconds [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148368 (owner: 10Vikassy) [14:46:36] (03PS1) 10Esanders: Unified demo page [oojs/ui] - 10https://gerrit.wikimedia.org/r/148385 [15:05:09] 3VisualEditor: Cannot switch to VE mode in betalabs - 10https://bugzilla.wikimedia.org/68383 (10Ritu Swain) 3UNCO p:3Unprio s:3major a:3None Environment- Betalabs Steps to Reproduce- For Chrome- 1> Logged in and trying to switch to VE interface by clicking on "Edit beta" tab shows the spinner for a w... [15:36:27] (03CR) 10Jforrester: "> The dialog opens with an empty list on a page with lots of references," [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (owner: 10Jforrester) [16:03:02] (03CR) 10Catrope: "FIXME: Is document.activeElement the right thing to use here? What if the ce.Surface is in an iframe?" [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/145346 (https://bugzilla.wikimedia.org/67432) (owner: 10Esanders) [16:06:53] (03CR) 10Esanders: "> Is that https://bugzilla.wikimedia.org/show_bug.cgi?id=68079 perhaps?" [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (owner: 10Jforrester) [16:08:09] (03CR) 10Esanders: [C: 032] Fix heights of Reference, ReferenceList and Template dialogs [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147710 (https://bugzilla.wikimedia.org/68226) (owner: 10Jforrester) [16:11:40] (03Merged) 10jenkins-bot: Fix heights of Reference, ReferenceList and Template dialogs [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147710 (https://bugzilla.wikimedia.org/68226) (owner: 10Jforrester) [16:12:55] 3VisualEditor / 3Editing Tools: VisualEditor: The size of References List dialog is appearing a bit small in Firefox making the text field almost overlap with the edge of the dialog - 10https://bugzilla.wikimedia.org/68226 (10James Forrester) 5PATC>3RESO/FIX p:5Unprio>3Normal a:3James Forrester [16:13:22] 3VisualEditor / 3Editing Tools: VisualEditor: Use existing reference dialog gets squished upon resizing the window down and does not retain back its UI upon making window size normal - 10https://bugzilla.wikimedia.org/68232 (10James Forrester) 5PATC>3RESO/FIX [16:22:37] hey James_F [16:22:59] James_F: can you comment on https://gerrit.wikimedia.org/r/#/c/87649/ in the view of https://bugzilla.wikimedia.org/show_bug.cgi?id=51154#c18 ? :D [16:23:35] i want more opinion before i merge that and we get stuck with another weird interface for years ;) [16:45:52] 3VisualEditor: Cannot switch to VE mode in betalabs - 10https://bugzilla.wikimedia.org/68383#c1 (10Andre Klapper) Where exactly is "in betalabs"? All instances there or which one(s)? [16:56:35] 3VisualEditor: Cannot switch to VE mode in betalabs - 10https://bugzilla.wikimedia.org/68383#c2 (10Alex Monk) I think they mean that they can't open VE on any *.beta.wmflabs.org wiki. Those are part of the deployment-prep project in labs. The database there are read-only at the moment: no edits can be made. [16:57:05] 3VisualEditor: Cannot switch to VE mode in betalabs - 10https://bugzilla.wikimedia.org/68383 (10Alex Monk) [16:58:27] Hello, is there a documentation anywhere on how to utilize VisualEditor in custom theme? [16:59:14] Editor loads alright, although cannot see the toolbar and save button :p [17:00:11] hi Kulttuuri [17:00:18] hi there :) [17:00:34] Kulttuuri: probably this is the closest thing? https://www.mediawiki.org/wiki/VisualEditor/Skin_requirements [17:01:04] oh, nice [17:01:34] very advanced material though [17:02:16] using a custom version of this theme at the moment: https://github.com/OSAS/strapping-mediawiki [17:12:47] Hi, I noticed a problem with ve.init.mw.ViewPageTarget.prototype.onBeforeUnload in which that method is called infinitely if the VE was closed and re-opened again. [17:13:56] fallbackResult in that function ends up being set to onBeforeUnload() when it's assumed to be a message on line 1716 [17:19:45] (03CR) 10Esanders: "This makes the cite dialog usable on pages with lots of references, as in takes < 1s instead of 10s." [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148069 (owner: 10Esanders) [17:22:38] oh man, figured out why it did not work with this theme [17:23:06] creator of this theme actually made the whole page be inside div id="bodyContent" instead of just making the damn content area to be id bodyContent... [17:24:01] no wonder why I was hitting my head against the wall as when I pressed the Edit button it loaded the whole editor into full screen :p [17:33:06] (03PS1) 10Esanders: Use the current document when evaluating activeElement [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/148415 [17:33:39] (03CR) 10Esanders: "Fixed here I859edf8d" [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/145346 (https://bugzilla.wikimedia.org/67432) (owner: 10Esanders) [17:35:47] (03CR) 10Esanders: "On pages with 10+ images this makes transaction emitting events (anything non-trvial such as undo/redo/deleting complex selections/copy/pa" [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/147914 (owner: 10Esanders) [17:37:00] (03CR) 10Esanders: "Wastes about 50ms per list node when transacting, adds up when deleting / moving a whole list." [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/147985 (owner: 10Esanders) [17:37:12] (03CR) 10Catrope: [C: 032] CommandHelpDialog: Make closing action 'safe' not 'primary' for consistency [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/148239 (owner: 10Jforrester) [17:37:43] RoanKattouw_away, so I was looking at onSplice and teardown events [17:38:17] I notice that we very meticulously tear down CE nodes, in some cases (FocusableNode) removing classes, properties, listeners [17:38:27] then in onSplice using detach instead of remove [17:38:29] (03Merged) 10jenkins-bot: CommandHelpDialog: Make closing action 'safe' not 'primary' for consistency [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/148239 (owner: 10Jforrester) [17:38:53] but I can't find the example where a node is reattached [17:41:03] Hmm [17:41:22] It probably never happens in /practice/ [17:43:02] I wonder if we should support theoretical cases where that mighthappen in the future [17:43:54] given it sounds like quite and edge case [17:44:11] should we optimise for the more common case of destroying a node [17:44:22] Yeah we should probably just .remove() [17:44:23] and just ... destroy it [17:44:31] Currently there's no reason why that would break, I don't think [17:44:37] get rid of teardown events completely [17:44:52] Oh, I see what you're saying [17:45:01] *for ce nodes [17:45:03] No teardown events, just destructors [17:45:26] Do keep generated content nodes in mind though, they have some weird setup/teardown stuff going on when rerendering [17:46:24] so just garbage collection? [17:47:07] Well, we probably need to call .destroy() on the node [17:47:24] RoanKattouw, I'm dealing with some offline stuff here (flights and parental unit) so I'll be out for a bit, but I'll be back a bit later to work on whatever comments on my commits. The live events are probably the most straight forward, and the "Make the image model work without a node" is likely the most urgent before tomorrow's deployment (it fixes a bunch of regression bugs) -- if it's possible to review that today it'll be aweso [17:47:24] me. Trevor and I discussed the strategy before he was overcome by his man-flu. [17:47:29] There are probably cases where standard GC plus $element.remove() isn't good enough [17:47:37] right [17:47:42] mooeypoo: OK [17:48:03] and if there's anything urgent, I'm in hangouts [17:48:11] Like, when you have a node that listens to events on the surface or some other object that's not $element oir descendants thereof [17:48:39] all generated content nodes do is connect teardown to 'abortGenerating' [17:48:48] could do that in destroy [17:48:56] RoanKattouw, right [17:49:47] if we start with the assumption that a torn down node is never set up again, we can just delete some code for now though? [17:50:07] Yeah probably [17:50:09] 3VisualEditor: VisualEditor: Select text, type = garbled, repeated text + snowman on el.wp - 10https://bugzilla.wikimedia.org/68124#c2 (10paa2004) I found another, smaller, text that manifests this bug https://el.wikipedia.org/w/index.php?title=%CE%A7%CF%81%CE%AE%CF%83%CF%84%CE%B7%CF%82:P.a.a/%CF%80%CF%81%CF%8... [17:50:17] (+ use remove instead of detach) [17:55:13] Yeah sounds good [18:08:20] 3VisualEditor / 3Mobile: VisualEditor Mobile: [Regression pre-wmf15] Pressing backspace to delete the link target inside link inspector closes the inspector - 10https://bugzilla.wikimedia.org/68195 (10James Forrester) 5NEW>3ASSI p:5Unprio>3High [18:10:05] 3VisualEditor / 3Mobile: VisualEditor Mobile: In iOS, while opening the link inspector for the second time, the inspector gets zoomed making the inspector title overlapped with the browser tab - 10https://bugzilla.wikimedia.org/68197 (10James Forrester) 5NEW>3ASSI p:5Unprio>3Normal [18:12:51] 3VisualEditor: Cannot switch to VE mode in betalabs - 10https://bugzilla.wikimedia.org/68383#c3 (10Alex Monk) By the way, bug 68349 is tracking the issue which has turned on read-only mode. This bug can be used to look into how VE is handling it poorly and/or inconsistently. [18:13:51] 3VisualEditor / 3Mobile: VisualEditor Mobile: [Regression pre-wmf15] The highlights of the nodes are appearing over the toolbar menu - 10https://bugzilla.wikimedia.org/68198 (10James Forrester) 5NEW>3ASSI p:5Unprio>3Normal [18:15:21] 3VisualEditor / 3Mobile: VisualEditor Mobile: In android, while trying to apply a link on a selected text , strips off the first letter of the text in the link inspector - 10https://bugzilla.wikimedia.org/68244 (10James Forrester) 5NEW>3ASSI p:5Unprio>3Normal [18:23:36] 3VisualEditor / 3MediaWiki integration: VisualEditor: Consider changing behaviour on launch when the database is locked - 10https://bugzilla.wikimedia.org/68383 (10James Forrester) 5UNCO>3ASSI p:5Unprio>3Low s:5major>3enhanc [18:28:03] (03PS6) 10Jforrester: Put "re-use reference" in the toolbar "Cite" menu, and give it an icon [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 [18:50:22] 3VisualEditor / 3Mobile: VisualEditor Mobile: The "Go back" button in use existing reference dialog in mobile takes to Basic Reference dialog - 10https://bugzilla.wikimedia.org/68201 (10James Forrester) a:3James Forrester [18:52:57] (03PS7) 10Jforrester: Put "re-use reference" in the toolbar "Cite" menu, and give it an icon [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (https://bugzilla.wikimedia.org/68201) [19:19:46] (03CR) 10Esanders: "Even with the parent fix the list generation takes 500ms" [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148070 (owner: 10Esanders) [19:22:59] (03CR) 10Esanders: [BREAKING CHANGE] Show comments inline to the user (031 comment) [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/140773 (https://bugzilla.wikimedia.org/49603) (owner: 10Jforrester) [19:56:13] Hey Krinkle. [20:05:04] (03CR) 10Catrope: [C: 04-1] Make the image model work without a node (039 comments) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147219 (https://bugzilla.wikimedia.org/68242) (owner: 10Mooeypoo) [20:05:49] (03PS1) 10Jforrester: Update VE core submodule to master (244bf0e) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148448 [20:06:19] RoanKattouw: https://gerrit.wikimedia.org/r/144058 [20:07:22] (03CR) 10Catrope: [C: 032] Update VE core submodule to master (244bf0e) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148448 (owner: 10Jforrester) [20:09:11] (03Merged) 10jenkins-bot: Update VE core submodule to master (244bf0e) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148448 (owner: 10Jforrester) [20:10:13] (03PS8) 10Jforrester: Put "re-use reference" in the toolbar "Cite" menu, and give it an icon [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (https://bugzilla.wikimedia.org/68201) [20:16:33] (03PS3) 10JGonera: Handle touch events in toolbars and toolgroups [oojs/ui] - 10https://gerrit.wikimedia.org/r/146640 [20:18:11] 3VisualEditor / 3Editing Tools: VisualEditor: PopupToolGroup item not 'ticked' after changing - 10https://bugzilla.wikimedia.org/68170#c2 (10James Forrester) 5NEW>3RESO/FIX p:5Unprio>3High a:3Trevor Parscal Fixed in gerrit 4b874d42206e988844367eccacb9503fe6c3ddb5. [20:19:00] So putting a comment between table cells will render a wrapper paragraph inside the tr [20:19:11] Ouch [20:19:21] which is invalid html, and in chrome at least messes up the table cell alignment [20:19:22] Yeah I was saying, we probably wanna hybrid-ize comment nodes the way alien nodes are done [20:19:37] I think
s in tables are tolerated in rendering [20:19:41] Although they're probably not great [20:19:44] no [20:20:10] anything that isn't in a canContainContent node should be meta-fied [20:21:28] Hmm yeah that'll work [20:21:31] until we can do something smart, like annotating the next element [20:21:39] That'll take care of the restricted parentage problems too [20:21:40] Is it easy for DM nodes to know that they're in a canContainContent node? [20:21:47] I'm not sure offhand [20:22:35] Oh, yes you can [20:22:38] Using the contextStack "feature" [20:22:42] *coughhackcough* [20:22:45] :-) [20:22:53] edsanders: Do you want to do that/ [20:34:43] hey guys, we have a VisualEditor question: how do we replace the document of an already-initialized VisualEditor with totally new HTML? [20:35:10] jicksta: Inside a MediaWiki instace? [20:35:11] e.g. something like: $(".visual-editor-body").data('visualEditor').setup(ve.createDocumentFromHtml("

OHAI

")) [20:35:22] James_F: Inside a standalone instance [20:35:24] jicksta: Is there a reason you don't want to just destroy the editor and create a new one? [20:35:32] Right. [20:35:50] RoanKattouw: Yes, this is during a Selenium test where we're creating a method which simulates the user filling in WYSIWYG content [20:36:08] Ahm [20:36:27] jicksta: I guess you could replace the content editable value directly in the DOM instead of informing VE directly. [20:36:33] Well in that case ... yeah what Krinkle said [20:36:39] I"m not sure what it is you're testing though. [20:36:41] Just change the contents of the surface, and wait 200ms [20:36:55] Krinkle: But that wouldn't keep the VisualEditor's own virtual DOM up-to-date, right? [20:37:21] jicksta: It will be interpreted as the user having done select-all, delete, and paste that content from another html documet. [20:37:50] there's no method anywhere like replaceDocument? [20:38:04] jicksta: It will if you wait 200ms, because we poll for changes [20:38:14] $surfacel.html("

OHAI

") [20:38:23] That's all you'll have to do [20:38:35] Oh, hold on [20:38:41] If you're replacing structure, it won't work [20:38:49] Polling checks for text changes only [20:39:00] yeah that's what I thought Roan [20:39:00] So what Krinkle said will not actually work [20:39:16] jicksta: So what are you trying to test exactly? [20:39:19] Saving? [20:40:00] We have a Selenium test that opens an editable thing, simulates the user entering some content as WYSIWYG HTML, then saves and exits the visual editor mode [20:45:58] is there anyway to maybe replace an entire surface for a document? [20:46:06] err, for a target [20:47:13] If you wrote your own target (which I'm guessing you probably did?) that should be doable [20:49:26] @RoanKattouw This is how we setup our visual editor at the moment: https://gist.github.com/jicksta/601513b7b574d315aa72 [20:51:18] how would we replace the surface for a ve.init.sa.Target? [20:51:22] * RoanKattouw squints and tries to read what he assumes is CoffeeScript [20:51:30] yes it's Coffeescript [20:51:46] Waait [20:51:52] Are you using ve.init.sa.Target at all? [20:51:59] the juicy stuff is in setupVisualEditor and updateVisualEditor [20:52:10] Oh yes you are [20:52:14] yeah line 26 [20:53:10] So, what we did for MediaWiki is we wrote a subclass of ve.init.Target that encapsulates all this stuff [20:53:26] ve.init.sa.Target is pretty basic, you could duplicate most of the code, or if you really want you could subclass it [20:53:49] But like, all the logic for initializing and saving, almost all of that is in ve.init.mw.ViewPageTarget for us [20:53:56] (which is huge, you shouldn't necessarily take it as a good example) [20:54:36] 3VisualEditor / 3Editing Tools: VisualEditor: Transclusion dialog should prevent adding identically-named parameters (and aliases) - 10https://bugzilla.wikimedia.org/51406#c2 (10James Forrester) 5ASSI>3RESO/FIX I'm going to assume "yes" given testing. [20:54:47] Because it's a terrible example. :-) [20:54:50] Yes :) [20:54:54] Ahm, so, OK [20:55:04] Replacing the HTML isn't really a use case we've ever dealt with [20:55:14] But you could probably do it pretty easily by throwing away the editor and starting from scratch [20:55:37] Unfortunately it doesn't look like surfaces like their contents to be replaced, and targets don't like their surfaces to be replaced either [20:56:02] Alternatively alternatively, your Selenium test could make a simple edit that is easy to simulate in Selenium [20:56:32] Or make a test-only change from JS and let our polling code pick that up [20:56:34] *text-only [20:57:08] Or trigger an insert? [20:57:31] https://www.mediawiki.org/wiki/VisualEditor_gadgets#Adding_a_table for instance. [20:57:47] Right [20:57:58] That doesn't exactly let you insert arbitrary HTML because you have to work in terms of linear model data [20:58:06] But you could insert things that way [20:58:09] And remove things too [20:58:24] It's presumably a more realistic test? [20:58:42] More realistic than what? Just changing text? [20:59:04] Than an HTML document landing from out of the sky. :-) [20:59:20] Sure [20:59:54] is there a way we can create that linear data model from HTML? [21:00:01] e.g. a converter [21:00:17] Yes [21:00:21] In fact, it's called ve.dm.converter [21:00:22] or maybe from the document we get from ve.createDocumentFromHTML [21:00:33] yeah we're the converter now [21:00:36] we're using* [21:00:38] Hmmm, I guess what you could do... [21:00:54] There is this function called newFromDocumentInsertion [21:00:59] which you could abuse for this purpose [21:01:49] Basically, what you'd do is you'd blank the editor, create a new linear model document via the converter, then insert that into the editor [21:02:06] I... kind of recommend not doing this [21:02:15] Hmm, why not? [21:02:22] Well it doesn't really test anything [21:02:34] and it would be unnecessarily complicated [21:02:42] All you'd really end up testing is that VE round-trips content correctly [21:02:51] we're less concerned with testing Visual Editor per se than testing user flows that include doing some editing here and there [21:02:53] i.e. if you load HTML in VE, don't modify it, then save it again, you get the same HTML back [21:02:56] Right, OK [21:03:03] So why not just do text edits then? [21:03:12] what do you mean? [21:04:11] Well, if you want to test the workflow where the user makes a few edits [21:04:44] Why wouldn't you just change some text here and there with direct DOM manipulation, wait a little bit so VE figures out what you've done, then save? [21:05:21] The whole "modify DOM directly then wait a little" sounds evil but it's exactly how e.g. spellcheck works right now [21:05:35] RoanKattouw As we understood it that wouldn't work because manipulating the DOM directly subverts VE's own internal state [21:05:55] Well, yes and no [21:06:03] If you change the /structure/ of the DOM, then that subverts VE [21:06:10] If you only change text, though, VE will notice and adapt [21:06:36] yeah. but we couldn't do things like insert an H2, H3, etc right? [21:06:43] that's going to be an important test for us soon [21:06:48] This is because things like the browser's spell checker used not to emit useful events (and for the time being we can't listen to the ones they do emit) when they changed stuff [21:06:53] Right, yeah, you wouldn't be able to do that [21:07:11] we have some business rules based on the headers users have entered into the visualeditor [21:07:22] so we definitely want good coverage of those rules using selenium [21:07:25] For that, you could try using the controls directly, or the keyboard shortcuts (Ctrl+2 for h2) if Selenium lets you [21:07:48] synthetic keyboard events aren't very easy for us to do unfortunately [21:07:58] Or if you're willing to get down and dirty you could use a variant of what James linked to to insert linear model data directly [21:08:07] But, this business logic you're talking about, where does that live? [21:08:20] It kind of sounds like maybe you should have unit tests for it instead / as well [21:08:25] it happens on the server [21:09:13] yes there will be unit tests for sure but we'll need selenium tests that enter "sections" with headers, go to preview the page, and it shows the header elements in an auto-generated table of contents type system [21:10:21] Right, OK [21:10:25] i am trying to create a proof of concept of what you guys suggested earlier... [21:10:41] You mean James's example with tables? [21:10:51] creating a document with ve.createDocumentFromHTML, then simulating an insertion of virtual DOM nodes from that data model using newFromDocumentInsertion [21:11:05] Hmm, right [21:11:07] Yeah that could work [21:11:09] triggering an insert, yeah [21:11:19] If your test cases are simple you might as well write out the linear model data directly [21:11:22] It's not very complicated [21:11:52] A heading would just be [ { 'type': 'heading', 'attributes': { 'level': 2 } }, 'H', 'e', 'l', 'l', 'o', { 'type': '/heading' } ] [21:12:19] Although if you anticipate having to do more or less arbitrary HTML, then yes, the newFromDocumentInsertion way would be better [21:12:28] could we get that data structure by doing something like ve.createDocumentFromHTML("

Hello

").getModel() ? [21:12:28] In any case, let me tell you how that would work so you can play with it :) [21:12:48] (getModel is just a random method I thought of, it probably doesn't do what I'm asking) [21:12:55] Not directly but kind of [21:12:59] Let me write up a quick example [21:13:04] that'd be great [21:14:23] 3VisualEditor / 3Data Model: VisualEditor: Re-use an existing reference shouldn't require a reference list to be or have been on the page to work - 10https://bugzilla.wikimedia.org/68079 (10James Forrester) [21:17:27] 3VisualEditor / 3Editing Tools: VisualEditor: Dialogs should have a "cancel" button next to "Apply changes" - 10https://bugzilla.wikimedia.org/52462#c6 (10James Forrester) 5ASSI>3RESO/FIX a:3Trevor Parscal This was done as part of the window redesign work. [21:18:04] jicksta: https://gist.github.com/catrope/dfe1daa1d586efa431ed [21:18:10] (untested) [21:18:37] That should insert the HTML string on line 1 at the beginning of the document [21:19:10] The way the current target is accessed is through the global ve.init.target variable on line 4, if you already have the target or the surface or something handy you could substitute that there instead [21:19:35] @RoanKattouw Cool, yeah we have this.visualEditor in that class [21:19:50] we'll give that a try right now [21:23:26] RoanKattouw: Hmm, what do we use for newDmDoc in your gist? [21:23:40] derp, nevermind [21:23:42] Oh just what it says there [21:23:48] It's generated from the html string [21:26:09] awesome, it appears to work RoanKattouw [21:26:32] Sweet [21:26:34] is there any easy way to clear the contents of the document before we do the insert? (is a nice-to-have for us) [21:28:45] (03CR) 10Catrope: [C: 032] Put "re-use reference" in the toolbar "Cite" menu, and give it an icon [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (https://bugzilla.wikimedia.org/68201) (owner: 10Jforrester) [21:28:54] jicksta: Yes, hold on [21:30:35] (03Merged) 10jenkins-bot: Put "re-use reference" in the toolbar "Cite" menu, and give it an icon [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144058 (https://bugzilla.wikimedia.org/68201) (owner: 10Jforrester) [21:33:06] RoanKattouw: https://gerrit.wikimedia.org/r/#/c/146640/ [21:33:20] 3VisualEditor / 3Mobile: VisualEditor Mobile: The "Go back" button in use existing reference dialog in mobile takes to Basic Reference dialog - 10https://bugzilla.wikimedia.org/68201 (10James Forrester) 5PATC>3RESO/FIX [21:34:25] (03CR) 10Catrope: [C: 04-1] Handle touch events in toolbars and toolgroups (031 comment) [oojs/ui] - 10https://gerrit.wikimedia.org/r/146640 (owner: 10JGonera) [21:40:07] btw, how would link hrefs be a problem with ve.dm.converter.getModelFromDom(htmlDoc) as your comment suggested? [21:40:22] (03CR) 10Catrope: [C: 032] Special case for measuring clippableContainer == body [oojs/ui] - 10https://gerrit.wikimedia.org/r/148357 (https://bugzilla.wikimedia.org/68370) (owner: 10Esanders) [21:40:56] (03Merged) 10jenkins-bot: Special case for measuring clippableContainer == body [oojs/ui] - 10https://gerrit.wikimedia.org/r/148357 (https://bugzilla.wikimedia.org/68370) (owner: 10Esanders) [21:45:51] 3OOjs UI: OOjs UI: ClippableElements should clip to the viewport, not the body - 10https://bugzilla.wikimedia.org/68370 (10James Forrester) 5PATC>3RESO/FIX p:5Unprio>3Normal [21:47:28] (03CR) 10Catrope: [C: 032] Use native focus [oojs/ui] - 10https://gerrit.wikimedia.org/r/148061 (owner: 10Esanders) [21:47:56] (03CR) 10Catrope: [C: 032] Add role attribute to a few widgets [oojs/ui] - 10https://gerrit.wikimedia.org/r/148253 (https://bugzilla.wikimedia.org/50203) (owner: 10Alex Monk) [21:48:05] (03Merged) 10jenkins-bot: Use native focus [oojs/ui] - 10https://gerrit.wikimedia.org/r/148061 (owner: 10Esanders) [21:49:20] (03Merged) 10jenkins-bot: Add role attribute to a few widgets [oojs/ui] - 10https://gerrit.wikimedia.org/r/148253 (https://bugzilla.wikimedia.org/50203) (owner: 10Alex Monk) [21:51:31] RoanKattouw, James_F, I found the newFromReplacement (as an alternative to newFromDocumentInsertion) and we're trying to give it a range that includes the entire document [21:52:08] jicksta: Sorry I got distracted [21:52:15] newFromReplacement won't work directly [21:52:20] I guess we can't do something like ve.Range(0, -1) to signify from start to end of the text? [21:52:25] But there's a pretty easy removeContent() function in SurfaceFragment [21:52:30] No, that doesn't work [21:52:44] However, you can call .getLength() on the dmDocument I think [21:53:30] Ugh, no it's dmDocument.data.getLength(), because of course ^-^ [21:54:41] jicksta: So, a slightly easier way to remove things is surface.getModel().getFragment( range ).removeContent() [21:55:01] Where range is something like new ve.Range( 0, surface.getModel().getDocument().data.getLength() ) [21:55:04] cool, and the range we create with ve.Range(0, something.getLength()) ? [21:55:24] ok, we'll give that a shot [21:55:35] (03PS1) 10Jforrester: Update OOjs UI to v0.1.0-pre (9cd400e3d5) [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/148521 [21:57:20] 3VisualEditor / 3Technical Debt: VisualEditor: Add "role" attributes to UI elements where appropriate - 10https://bugzilla.wikimedia.org/50203#c4 (10Alex Monk) 5PATC>3ASSI Anything left to do here, Timo/James? [21:59:53] RoanKattouw: Hmm, we got this error after it cleared the editor: Error: Offset could not be translated to a DOM element and offset: 2 [22:00:41] Hah [22:01:04] Yeah clear-all has bugs in some cases [22:01:13] And what you're doing might be removing too much [22:01:26] Could you pastebin the code you're using? [22:02:04] sure https://gist.github.com/jicksta/2b4cc5ce48b223a4ef59 RoanKattouw [22:02:13] James_F: https://gerrit.wikimedia.org/r/#/c/148525/1 [22:02:37] RoanKattouw: Merge https://gerrit.wikimedia.org/r/148521 and I'll do the same for your fix? [22:03:13] James_F: https://gerrit.wikimedia.org/r/#/c/148526/ [22:03:26] (same change-id) [22:03:32] (03CR) 10Catrope: [C: 032] Update OOjs UI to v0.1.0-pre (9cd400e3d5) [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/148521 (owner: 10Jforrester) [22:04:03] RoanKattouw: Also see https://gerrit.wikimedia.org/r/#/c/119432/ and my comments. [22:04:30] RoanKattouw It looks like an empty visual editor always has a length of 2: http://monosnap.com/image/rZkhwYVIDejKgafbbnG7V0oFxf7LKa [22:04:40] (03CR) 10Catrope: "This doesn't seem to be needed any more, not because of Timo's change but because Chrome was fixed." [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/119432 (owner: 10Catrope) [22:04:44] (03Abandoned) 10Catrope: [WIP] Followup 1b9c077: debounce toolbar's onSurfaceViewKeyup [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/119432 (owner: 10Catrope) [22:04:55] jicksta: Yes, there's an empty internalList node in there [22:05:04] Which I was hoping the removal code would be smart enough to not remove [22:05:10] But maybe it's not [22:05:29] RoanKattouw: Tsk, they shouldn't have been the same change-id – different semantic changes (97dbb50137 -> 9cd400e3d5 vs. 5ab041a801 -> 9cd400e3d5). [22:05:48] James_F: Yes, I know, sorry, got confused about what was going on in what repo and thought I was replacing your change rather than mimicking it [22:06:13] * James_F tsks. :-) [22:07:42] (03Merged) 10jenkins-bot: Update OOjs UI to v0.1.0-pre (9cd400e3d5) [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/148521 (owner: 10Jforrester) [22:07:50] (03PS2) 10Catrope: Deprecate 'live' event in favor of 'setup' and 'teardown' [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/144586 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [22:12:04] (03PS4) 10Jforrester: Tests: Move …/test/… to …/tests/… to be the same as other repos [oojs/ui] - 10https://gerrit.wikimedia.org/r/144607 [22:16:06] RoanKattouw: ^^^ Rebased off Timo's change. [22:17:27] RoanKattouw: This is our awesome Selenium / Capybara helper that can fill in a visual editor with arbitrary HTML :) https://gist.github.com/jicksta/91f30c993eaa3b2e7719 [22:18:22] James_F, I'm wondering what kind of format we want for https://bugzilla.wikimedia.org/show_bug.cgi?id=62860 [22:18:44] Krenair: I didn't have any particular thoughts. [22:18:51] Krenair: It sort-of depends on the scale. [22:19:09] Krenair: If there are > 100 hits an hour, it needs to be a summary. [22:19:29] Krenair: If there are only 3–5 a day, maybe it could ping here. [22:19:32] I found one edit today.. [22:19:36] (Individually.) [22:19:39] Not sure if it's right :) [22:19:42] * James_F grins. [22:19:47] For enwiki or all wikis? [22:20:13] all wikis, of course. [22:20:17] hi :D [22:20:37] all wikis [22:20:54] enwiki had one in the past week: https://en.wikipedia.org/w/index.php?title=Propaganda&curid=23203&diff=617222897&oldid=617127357 [22:22:37] (03PS1) 10Catrope: Followup 3dd1a996: don't try to switch to source mode when surface is torn down [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148531 [22:23:37] Krenair: In that case, individual pings to this channel seems fine. [22:23:55] [14:40] jicksta btw, how would link hrefs be a problem with ve.dm.converter.getModelFromDom(htmlDoc) as your comment suggested? [22:23:57] Sorry, missed that before [22:24:21] Krenair: Maybe "Corruption alert: visualeditor-needcheck on : " or something? [22:24:31] Krenair: What would you find useful? [22:24:41] jicksta: In the vanishingly rare case that you had loaded a document with a that's different from the base of the page on which you're viewing it, and the replacement HTML had an with a relative href, it might render wrong [22:24:52] In practice, this is unlikely to be a problem unless you're us :) [22:25:00] RoanKattouw: Yeah we're going to have to create a custom link widget at some point that opens up a tool to select from a list of internal pages [22:25:19] James_F, sounds good to be.. [22:25:21] to me* [22:25:22] jicksta: Do steal ours :) [22:25:29] Krenair: Kk. [22:25:40] Although I guess ours is fairly complicated :) but when you start working on this, ping us, we did this so we can help [22:25:44] Oh yeah? you've something like that already? [22:26:11] ok will do. we have some pretty detailed wireframes for ours. it's also pretty complicated [22:29:24] btw RoanKattouw, one more quick question then I think we're done... how do we get a ref to the object that has the .focus() method on it to focus the visualeditor? [22:29:58] James_F, Corruption alert: visualeditor-needcheck on ruwiki: https://ru.wikipedia.org?diff=prev&oldid=64370540 [22:30:23] Krenair: That works. Maybe report the user name in case it's user-specific? [22:30:34] Krenair: E.g. if we see five in a row from one user it's probably them not us. :-) [22:30:34] uh [22:30:48] I'm not sure. [22:31:16] I don't think that would be very useful.. [22:31:39] OK. :-) [22:31:54] Also, you can shorten that URL to "https://ru.wikipedia.org/w/?diff=64370540" [22:32:23] 3VisualEditor / 3Editing Tools: VisualEditor: The highlight that appears after adding a template while selecting an image is not proper - 10https://bugzilla.wikimedia.org/68411 (10Rummana Yasmeen) 3NEW p:3Unprio s:3normal a:3None Created attachment 16006 --> https://bugzilla.wikimedia.org/attachmen... [22:33:26] https://ru.wikipedia.org?diff=64370540 works [22:34:14] Corruption alert: visualeditor-needcheck on ruwiki: https://ru.wikipedia.org?diff=64370540 [22:34:36] * MatmaRex pokes James_F with https://bugzilla.wikimedia.org/show_bug.cgi?id=51154#c18 [22:36:38] James_F, I guess now I need to figure out the tool labs way of running something hourly [22:38:11] jicksta: ve.init.target.getSurface() I think [22:38:41] RoanKattouw: We *just* figured it out I think. it's target.getSurface.view.focus() [22:38:54] it has to be the ce.Surface [22:39:40] jicksta: Yeah we have a link inspector. VE core has a simple one just for URLs, but our MediaWiki integration has a complex one for both URLs and internal pages. See e.g. http://en.wikipedia.org/wiki/Malaysia_Airlines_Flight_17?veaction=edit [22:39:46] Oh, yes, .getSurface().getView(), of course [22:39:55] Krenair: Cron? [22:40:40] jicksta: ...and look at, say, the words "Amsterdam" and "Kuala Lumpur" on the first line [22:41:00] probably. To be honest I've only ever messed with tools to run quick scripts (from tools-login) or to query the DB replicas [22:41:46] Krenair: Yay for learning. :-) [22:43:30] RoanKattouw: Nice. Our linking system is basically a modal that pops up and has a table of pages that can be sorted / filtered etc and each row can be expanded to show the headers within it [22:47:54] (03CR) 10Catrope: [C: 04-1] Deprecate 'live' event in favor of 'setup' and 'teardown' (031 comment) [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/144586 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [22:48:24] (03CR) 10Catrope: "Looks fine, but there's a comment that's now nonsensical and should be removed (see inline comment)" [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/144586 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:10:06] (03PS3) 10Mooeypoo: Deprecate 'live' event in favor of 'setup' and 'teardown' [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/144586 (https://bugzilla.wikimedia.org/55505) [23:21:56] James_F, ugh, I'm supposed to put some kind of license on this aren't I [23:25:28] I guess the simplest thing to do would be to copy in VE's license file [23:26:57] Except "This software consists of voluntary contributions made by many individuals (AUTHORS.txt) For exact contribution history, see the revision history and logs, available at https://gerrit.wikimedia.org", sigh [23:28:08] Maybe I can just leave that line out? [23:29:27] I doubt '# (C) WMF, license: MIT' will do [23:31:48] (03CR) 10JGonera: Handle touch events in toolbars and toolgroups (031 comment) [oojs/ui] - 10https://gerrit.wikimedia.org/r/146640 (owner: 10JGonera) [23:31:51] (03CR) 10Mooeypoo: Make the image model work without a node (039 comments) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147219 (https://bugzilla.wikimedia.org/68242) (owner: 10Mooeypoo) [23:32:04] (03PS4) 10JGonera: Handle touch events in toolbars and toolgroups [oojs/ui] - 10https://gerrit.wikimedia.org/r/146640 [23:33:14] (03CR) 10Catrope: [C: 032] Handle touch events in toolbars and toolgroups [oojs/ui] - 10https://gerrit.wikimedia.org/r/146640 (owner: 10JGonera) [23:33:21] (03CR) 10Catrope: [C: 032] Deprecate 'live' event in favor of 'setup' and 'teardown' [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/144586 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:33:47] (03Merged) 10jenkins-bot: Handle touch events in toolbars and toolgroups [oojs/ui] - 10https://gerrit.wikimedia.org/r/146640 (owner: 10JGonera) [23:34:19] (03CR) 10Catrope: [C: 032] "Doesn't actually depend on the core change; the core change depends on this instead." [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144634 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:34:32] (03PS3) 10Catrope: Deprecate 'live' event in favor of 'setup' and 'teardown' in MW [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144634 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:34:36] (03CR) 10Catrope: [C: 032] Deprecate 'live' event in favor of 'setup' and 'teardown' in MW [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144634 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:34:45] (03CR) 10Catrope: [C: 032] Auto-open "Add parameter" part of template dialog when tabbed to or opening with no required/suggested params [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148233 (https://bugzilla.wikimedia.org/55925) (owner: 10Alex Monk) [23:34:48] (03Merged) 10jenkins-bot: Deprecate 'live' event in favor of 'setup' and 'teardown' [VisualEditor/VisualEditor] - 10https://gerrit.wikimedia.org/r/144586 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:36:40] (03Merged) 10jenkins-bot: Deprecate 'live' event in favor of 'setup' and 'teardown' in MW [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/144634 (https://bugzilla.wikimedia.org/55505) (owner: 10Mooeypoo) [23:36:49] woot [23:37:22] 3VisualEditor / 3Editing Tools: VisualEditor: When adding a new template, auto-open the "add parameter" section and put the cursor in the search dialog's input when we tab to it - 10https://bugzilla.wikimedia.org/55925#c3 (10Alex Monk) 5PATC>3RESO/FIX Should be done now. WhatamIdoing, feel free to reopen... [23:37:42] (03Merged) 10jenkins-bot: Auto-open "Add parameter" part of template dialog when tabbed to or opening with no required/suggested params [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148233 (https://bugzilla.wikimedia.org/55925) (owner: 10Alex Monk) [23:39:01] (03CR) 10Catrope: Make the image model work without a node (033 comments) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147219 (https://bugzilla.wikimedia.org/68242) (owner: 10Mooeypoo) [23:39:55] 3VisualEditor / 3Mobile: VisualEditor Mobile: The "Go back" button in use existing reference dialog in mobile takes to Basic Reference dialog - 10https://bugzilla.wikimedia.org/68201#c4 (10Rummana Yasmeen) This issue got resolved with replacing "Go Back" button with "Cancel" button in Use Existing Reference... [23:41:19] (03CR) 10Catrope: [C: 04-2] "Needs to be changed in Resources.php in MW core instead" [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148120 (https://bugzilla.wikimedia.org/68327) (owner: 10Jforrester) [23:41:29] (03PS2) 10Catrope: Mention at the top of the MW-specific ve.ce.Surface.test file what it is [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148121 (owner: 10Jforrester) [23:41:35] (03CR) 10Catrope: [C: 032] Mention at the top of the MW-specific ve.ce.Surface.test file what it is [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148121 (owner: 10Jforrester) [23:43:31] (03Merged) 10jenkins-bot: Mention at the top of the MW-specific ve.ce.Surface.test file what it is [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148121 (owner: 10Jforrester) [23:45:52] 3VisualEditor / 3Editing Tools: VisualEditor: Use existing reference dialog gets squished upon resizing the window down and does not retain back its UI upon making window size normal - 10https://bugzilla.wikimedia.org/68232#c3 (10Rummana Yasmeen) 5RESO/FIX>3REOP Still happening but in a slightly differen... [23:46:59] (03CR) 10Mooeypoo: Make the image model work without a node (031 comment) [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147219 (https://bugzilla.wikimedia.org/68242) (owner: 10Mooeypoo) [23:48:24] 3VisualEditor / 3Editing Tools: VisualEditor: Use existing reference dialog gets squished upon resizing the window down and does not retain back its UI upon making window size normal - 10https://bugzilla.wikimedia.org/68232#c4 (10Rummana Yasmeen) Created attachment 16010 --> https://bugzilla.wikimedia.org/... [23:50:07] (03PS1) 10Catrope: Stop conditionally registering oojs and oojs-ui [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148549 [23:51:15] (03Abandoned) 10Catrope: Declare dependency on ooui-dialog-* messages as they're needed [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/148120 (https://bugzilla.wikimedia.org/68327) (owner: 10Jforrester) [23:51:26] James_F|Away: https://gerrit.wikimedia.org/r/#/c/148550/ [23:58:49] (03CR) 10Catrope: [C: 031] "Code is OK to merge" [extensions/VisualEditor] - 10https://gerrit.wikimedia.org/r/147751 (owner: 10Jforrester)