Skip to content
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

Made some initial changes to test new styles #522

Merged
merged 7 commits into from Nov 20, 2015
Merged

Made some initial changes to test new styles #522

merged 7 commits into from Nov 20, 2015

Conversation

halindrome
Copy link
Contributor

Simple changes to load the new stylesheets and
implement some basic changes that make them work.

To enable in your respec document, set

useExperimentalStyles: true,

in your Respec Configuration area.

In response to issue #520

Simple changes to load the new stylesheets and
implement some basic changes that make them work.

To enable in your respec document, set

    useExperimentalStyles: true,

in your Respec Configuration area.

In response to issue #520.
I had mistakenly had it default to 'div'.
Noticed that PR #499 changed the role to navigation.  This
PR changes the wrapper for TOCs to nav when using the new
experimental style sheets.  Added code to support both of these.
However, note that when using an nav element, the role of
navigation may be superfluous.  Opinion @stevefaulkner ?
This is to mirror changes in the experimental
stylesheet, and is only present with the useExperimentalStyles
configuration parameter is true.
If using useExperimentalStyles, then set the class
of def on idl containers so that new styles are brought in.
@@ -97,13 +97,19 @@ define(
if (!conf.noTOC) {
var $ul = makeTOCAtLevel($("body", doc), doc, [0], 1, conf);
if (!$ul) return;
var $sec = $("<section id='toc'/>").append("<h2 class='introductory'>" + conf.l10n.toc + "</h2>")
var w = ( conf.useExperimentalStyles ? "nav" : "section" );
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just:

var w = conf.useExperimentalStyles ? "nav" : "section";

Copy link
Member

Choose a reason for hiding this comment

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

(updated code above)

@marcoscaceres
Copy link
Member

Some nits, LGTM tho.

Better support for new styles in notes, examples, and webidl

Fixed some code style issues as per @marcoscaceres

WebIDL integration with styles is not yet ideal, but will give a decent
idea of what it might look like.
@plehegar
Copy link
Member

We can't merge due to conflicts:

js/w3c/aria.js:

[[
                    var toc = conf.useExperimentalStyles ? $('nav#toc', doc) : $('section#toc', doc);
                    toc.attr('role', 'navigation') ;
=======
                    var toc = $('section#toc', doc).find("ul:first");
                    toc.attr('role', 'directory') ;
]]

tests/spec/core/structure-spec.js

[[
            expect($toc.attr('role')).toEqual('navigation');
=======
            expect($toc.find("ul:first").attr('role')).toEqual('directory');
]]

@halindrome any chance you can resolve them and merge?

@halindrome
Copy link
Contributor Author

Sure. I will look when I get home.
On Nov 20, 2015 9:43 AM, "Philippe Le Hegaret" notifications@github.com
wrote:

We can't merge due to conflicts:

js/w3c/aria.js:
<<<<<<< HEAD
var toc = conf.useExperimentalStyles ? $('nav#toc', doc) :
$('section#toc', doc);
toc.attr('role', 'navigation') ;

            var toc = $('section#toc', doc).find("ul:first");
            toc.attr('role', 'directory') ;

develop

tests/spec/core/structure-spec.js
<<<<<<< HEAD
expect($toc.attr('role')).toEqual('navigation');

    expect($toc.find("ul:first").attr('role')).toEqual('directory');

develop

@halindrome https://github.com/halindrome any chance you can resolve
them and merge?


Reply to this email directly or view it on GitHub
#522 (comment).

@halindrome halindrome merged commit c280e33 into develop Nov 20, 2015
@halindrome
Copy link
Contributor Author

This is taken care of and I pushed a new version. I am going to open a new
issue and tag you with an idea I havea.

On Fri, Nov 20, 2015 at 2:16 PM, Shane McCarron halindrome@gmail.com
wrote:

Sure. I will look when I get home.
On Nov 20, 2015 9:43 AM, "Philippe Le Hegaret" notifications@github.com
wrote:

We can't merge due to conflicts:

js/w3c/aria.js:
<<<<<<< HEAD
var toc = conf.useExperimentalStyles ? $('nav#toc', doc) :
$('section#toc', doc);
toc.attr('role', 'navigation') ;

            var toc = $('section#toc', doc).find("ul:first");
            toc.attr('role', 'directory') ;

develop

tests/spec/core/structure-spec.js
<<<<<<< HEAD
expect($toc.attr('role')).toEqual('navigation');

    expect($toc.find("ul:first").attr('role')).toEqual('directory');

develop

@halindrome https://github.com/halindrome any chance you can resolve
them and merge?


Reply to this email directly or view it on GitHub
#522 (comment).

Shane McCarron
halindrome@gmail.com

@@ -40,6 +40,9 @@ define(
.appendTo($("head"))
;
}
else if (conf.useExperimentalStyles) {
css = "http://fantasai.inkedblade.net/style/design/w3c-restyle/2016/W3C-" + statStyle;
Copy link
Member

Choose a reason for hiding this comment

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

D'oh. Can't believe I didn't see this :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well - that's where the stylesheets are. Should we have done something
else?

On Wed, Nov 25, 2015 at 7:55 PM, Marcos Caceres notifications@github.com
wrote:

In js/w3c/style.js
#522 (comment):

@@ -40,6 +40,9 @@ define(
.appendTo($("head"))
;
}

  •            else if (conf.useExperimentalStyles) {
    
  •                css = "http://fantasai.inkedblade.net/style/design/w3c-restyle/2016/W3C-" + statStyle;
    

D'oh. Can't believe I didn't see this :(


Reply to this email directly or view it on GitHub
https://github.com/w3c/respec/pull/522/files#r45938038.

Shane McCarron
halindrome@gmail.com

Copy link
Member

Choose a reason for hiding this comment

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

On 27 Nov 2015, at 3:14 AM, Shane McCarron notifications@github.com wrote:

In js/w3c/style.js:

@@ -40,6 +40,9 @@ define(
.appendTo($("head"))
;
}

  •            else if (conf.useExperimentalStyles) {
    
  •                css = "http://fantasai.inkedblade.net/style/design/w3c-restyle/2016/W3C-" + statStyle;
    
    Well - that's where the stylesheets are. Should we have done something else?

Yeah, we should have stopped and complained that http is unacceptable in 2015. We should make that a rule going forward.

The project is hosted on Github, so we could ask @fantasai to just serve it from gh-pages (it probably already is, but too lazy to check from my phone:))



Reply to this email directly or view it on GitHub.

@plehegar
Copy link
Member

plehegar commented Dec 4, 2015

Can we close this one now?

@plehegar
Copy link
Member

plehegar commented Dec 4, 2015

oops nevermind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants