Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Scrapped QuickDocs data for css and html from MDN to css.json and html.json #13268

Merged
merged 7 commits into from
Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="css-prop-defn" tabIndex="0"> <!-- tabIndex needed: otherwise click focuses CodeMirror scroller and Esc won't work -->
<div class="css-prop-defn {{#fullscreenSummary}}fullscreen-summary{{/fullscreenSummary}}" tabIndex="0"> <!-- tabIndex needed: otherwise click focuses CodeMirror scroller and Esc won't work -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: extra space

<div class="css-prop-summary">
<h1>{{propName}}</h1>
<div>{{{summary}}}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/**
* Inline widget to display WebPlatformDocs JSON data nicely formatted
* Inline widget to display MDNDocs JSON data nicely formatted
*/
define(function (require, exports, module) {
'use strict';
Expand All @@ -42,22 +42,23 @@ define(function (require, exports, module) {
var SCROLL_LINE_HEIGHT = 40;

// Load CSS
ExtensionUtils.loadStyleSheet(module, "WebPlatformDocs.less");
ExtensionUtils.loadStyleSheet(module, "MDNDocs.less");


/**
* @param {!string} cssPropName
* @param {!{SUMMARY:string, URL:string, VALUES:?Array.<{value:string, description:string}>}} cssPropDetails
*/
function InlineDocsViewer(cssPropName, cssPropDetails) {
function InlineDocsViewer(PropName, PropDetails) {
InlineWidget.call(this);

var templateVars = {
propName : cssPropName,
summary : cssPropDetails.SUMMARY,
propValues : cssPropDetails.VALUES || [],
url : cssPropDetails.URL,
Strings : Strings
propName : PropName,
summary : PropDetails.SUMMARY,
fullscreenSummary : !(PropDetails.VALUES && PropDetails.VALUES.length),
propValues : PropDetails.VALUES || [],
url : PropDetails.URL,
Strings : Strings
};

var html = Mustache.render(inlineEditorTemplate, templateVars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@
}
}

.fullscreen-summary {
.css-prop-summary {
width: 95%;
}

.css-prop-values, .divider-holder {
display: none;
}
}

.content-bottom {
// Used to pull bottom edge of .css-prop-defn down below its two floated children.
// Also prevents .more-info (after us in DOM order) from overlapping the float: right content.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Updating the Docs
Use the Node script [update-wpd-docs](https://github.com/MarcelGerber/update-wpd-docs) to update the `css.json` contents:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```
[sudo] node update-wpd-docs --exclude-vendor-prefixed --output <bracketsRepo>/src/extensions/default/WebPlatformDocs/css.json
[sudo] node update-wpd-docs --exclude-vendor-prefixed --output <bracketsRepo>/src/extensions/default/MDNDocs/css.json
```
8,322 changes: 8,322 additions & 0 deletions src/extensions/default/MDNDocs/css.json

Large diffs are not rendered by default.

550 changes: 550 additions & 0 deletions src/extensions/default/MDNDocs/html.json

Large diffs are not rendered by default.

186 changes: 186 additions & 0 deletions src/extensions/default/MDNDocs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading