-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autogenerate the customizer's variables form #11158
Conversation
pretty: true, | ||
data: function (dest, src) { | ||
/* | ||
Mini-language: |
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.
If you guys wanna tweak the syntax, I'm all ears.
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.
this whole piece of code is awesomeness! well done (Y)
After some testing, I'm now fairly confident about this from a technical standpoint, although the template definitely does need some styling love. |
Holy shit so much <3 for doing this. Will dive in after 3.0.1 ships. <3 |
return markdown.toHTML(markdownString.trim()).slice(3, -4); | ||
} | ||
function VarDocstring(markdownString) { | ||
// the slice removes the <p>...</p> wrapper output by Markdown processor |
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.
should move this comment into markdown2html()
@cvrebert This also removes unneeded Accordition section from Customizer. |
@@ -178,7 +353,7 @@ module.exports = function(grunt) { | |||
grunt.registerTask('validate-html', ['jekyll', 'validation']); | |||
|
|||
// Test task. | |||
var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html']; | |||
var testSubtasks = ['dist-css', 'jshint', 'qunit', 'build-customizer-vars-form', 'validate-html']; |
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.
build-customizer-vars
is much better (and shorter) name for task than build-customizer-vars-form
.
@cvrebert Could you rewrite these things to be just in Jekyll? Jekyll 1.3.0 datafiles now can replace Jade. ;) |
@zdroid Meh. |
@cvrebert Or give me a chance to do that thing (just wait some time to GitHub update the Jekyll)? :D |
@zdroid I think the idea of this pull request was to generate the page from the Or what did you have in mind for the YAML data files? |
@ssorallen Well, you could generate YAML from the LESS, which Jekyll could then template into HTML. It'd be another level of indirection/complexity though. |
I suggested Jekyll to avoid importing Jade (and maybe Markdown?). 2013/11/7 Chris Rebert notifications@github.com
Zlatan Vasović - ZDroid |
@mdo Any feedback man? |
This all looks glorious. There are a few things that came to mind:
Everything else is looking pretty good at this point. What are our options for expanding this language to include more granularity with subheading and such? |
Also, I merged master and may have fucked something up 😁. |
@mdo drop these commits :O |
#9829 is good idea, should be done. |
@mdo Made the changes you requested. Also clobbered that merge with a proper rebase.
Just tell me what syntax/scheme you desire, and I'll implement it 😄 |
|
@cvrebert Can you, after a completing pull request, merge these commits into one? Commit history looks so bad. :D |
Yes, I definitely plan to do some squashing before the final merge. |
As part of this, or a follow up, can you generate the list of Glyphicons on the Components page? Would be most useful for adding Flash-based click-to-copy. |
And auto-generate component list (I may do it, when autogenerating variables is finished)! :) |
@cvrebert Cool, fine by me. Where do we stand on this then? I know I have to finish up the code comments revamp from the variables file, but anything else still open? Let's put together a quick check list if there's a few things. |
I need to add support for another level of sectioning like you asked for, and I'd like to squash this PR into way fewer commits. |
@@ -206,6 +206,182 @@ module.exports = function (grunt) { | |||
docs: {} | |||
}, | |||
|
|||
jade: { |
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 feel like it's pretty gnarly this thing has to exist here… is it possible to make this script a node package, require it and execute it?
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.
Yes, agreed.
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.
Fixed.
TODO:
|
@mdo Okay, this now supports the h3 syntax you requested. Can we merge this bad boy? |
@cvrebert Did you merge master? It has /docs/ now. Also, squash these commits if possible. :) |
@zdroid Squashing commits would make the most sense once we know there's nothing left to be done, don't you think? :) |
@juthilo Yup, that's why I said it as the last. :) |
It's already been squashed as much as I'm gonna squash it. |
kk 2014/1/8 Chris Rebert notifications@github.com
Zlatan Vasović - ZDroid |
The variable docstrings might perhaps need further tweaking and more h3 subsections probably need to be added, but those are minor tweaks to the text rather than the parser code and can be done separately later. |
Autogenerate the customizer's variables form
Thanks for getting this done @cvrebert <3. Everything looks great! |
Implements #11095 (or the main part of it anyway). This could use a lot of testing and review.
/cc @twbs/team
This doesn't address the issue of JS plugin or LESS file interdependencies, and it doesn't generate the checkbox sections at the top of the customizer page.