-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
…arallel to Quick Edit; and Web Platform Docs provider for that extension point, based on original prototype at https://github.com/awgreenblatt/InlineWPD.
* origin/master: (28 commits) updated package validator based on comments in #3437 remove spurious IntelliJ files Updated by ALF automation. Another round of code review changes. Move HTML templates to htmlContent Tweaked dialog so it's centered a little better Renamed ExtensionMgr to ExtensionManager Code review fixes. Update comments to remove the Mustache note, since these can work with Handlebars too Make JSHint happy. Respond to review comments Initial extension manager dialog/view/model (with non-final layout) Move out hover preview menu item label to strings.js for localization. Remove unused variables and clean up some variable declarations. Merging Glenn's Hover Preview extension into core. Only allow leading numbers and letters (largely to prevent names like "..") import rewire to assist in testing Update Getting started screenshot for 'de' locale Fix DISALLOWED_WORDS placeholder in 'de' locale Updated by ALF automation. 'de' locale: Fix Travis build errors (duplicate strings), minor wording edits ...
Reviewing |
@@ -130,6 +130,8 @@ define(function (require, exports, module) { | |||
menu.addMenuItem(Commands.TOGGLE_QUICK_EDIT); | |||
menu.addMenuItem(Commands.QUICK_EDIT_PREV_MATCH); | |||
menu.addMenuItem(Commands.QUICK_EDIT_NEXT_MATCH); | |||
menu.addMenuDivider(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally we ask extensions to add menus within the extension and not in DefaultMenus right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but this isn't an extension Command, is a new Quick Docs Command handled by the Editor Manager and the extension just adds a new Quick Docs provider that uses this command, just like Quick Edit works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. Thanks for catching my mistake. :)
Initial review complete |
* Simplify InlineDocsViewer by not overriding load()
@jasonsanjose the final UI parts have landed if you'd like to get started reviewing the HTML/LESS while I finish making those changes from your JS feedback. |
* Update inline widget height when horizontal resizing causes word wrap to shift around * Show full URL on link tooltips * Remove unneeded timeout in onAdded() which was copied from InlineImageViewer (where it seems to just be a hack for image load timing) * Remove unneeded check for spaces in URLs * Fix missing 'return null'
@jasonsanjose fixes pushed. The two issues within the JSON file (uppercase properties and forward slash escaping) are still waiting on Adam, so would you mind spinning them off as a code cleanup bug to unblock the pull request? |
Sure, see #3471. Reviewing changes. |
return result.promise(); | ||
|
||
} else { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I was thinking more of a base case return null
outside of this if/else block, at the end of this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this way would help emphasize that the if
above doesn't have any fall-through cases...
Nested scrolling in an inline widget is just as bad as I remembered it. I think it's ok to take for now, but I think it warrants more discussion. |
|
||
// Set height initially, and again whenever width might have changed (word wrap) | ||
this._sizeEditorToContent(); | ||
$(window).on("resize", this._sizeEditorToContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should resize when the sidebar shows/hides too. We can file that separately if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this cleanup to #3471
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch. I'll assign the bug to myself.
<h1>{{propName}}</h1> | ||
<div>{{{summary}}}</div> | ||
</div> | ||
<div class="divider-holder"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually I'm not picky about non-semantic markup, but this jumped out at me. I assume this is tricky for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... see the comment on the LESS rule for it. Essentially, to get the line centered in the gap between columns we need its offset to be some percentage plus half the fixed-size gap. I suppose we could use calc()
for that but I've always been a little unsure how well non-IE browsers support that stuff...
Fwiw the .content-bottom
div is another thing we only need for layout, since it's impossible to put a margin/padding gap directly between floated content and an immediate sibling (e.g. see http://stackoverflow.com/questions/4198269/in-css-margin-top-is-not-working-with-clear-both).
@peterflynn done with round 2. I think the only thing blocking an immediate merge is the quiet-scrollbars issue. We can file everything else as cleanup. I would have made the change myself and merged, but in just in case, I want to give you the chance to make the call. |
Re the nested scrolling UX: yeah... I think we should do something to improve it a bit before sprint's end. What do you think of the three changes I proposed on email yesterday? (bottom shadow; make scrollbar visible while using arrow keys; don't let scrollwheel/trackpad "overrun" and start scrolling editor). For me the biggest pain point is the scrollwheel issue... but once the keyboard nav work is in maybe that will become more annoying for many people... hard to say. |
links; remove redundant bind() call
Pushed up another round of fixes |
re: nested scrolling
|
Merging |
Initial Quick Docs implementation
This introduces:
This doesn't include final XD layout/styles yet, so initial feedback should focus on the JS parts.