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

normative-optional reprentation #96

Closed
caridy opened this issue Jun 9, 2016 · 14 comments
Closed

normative-optional reprentation #96

caridy opened this issue Jun 9, 2016 · 14 comments

Comments

@caridy
Copy link

caridy commented Jun 9, 2016

At TC39, there was consensus that normative-optional can be denoted by putting a box around the optional parts, rather than out-of-line as in Annex B, as long a the denotation of normative-optional was the same.

@bterlson what's the recommendation for such construction? should we add something to ecmarkup?

@caridy
Copy link
Author

caridy commented Jun 9, 2016

backpointer tc39/ecma402#84 (comment)

@caridy
Copy link
Author

caridy commented Jul 26, 2016

@bterlson this is the issue that I mentioned today. The initial proposal is to introduce <emu-clause normative-optional>.

@littledan
Copy link
Member

How is this work going? I'm currently blocking tc39/ecma402#84 on it. It would be really nice to get this in relatively soon. I could rephrase the patch with "old style" Annex B if needed, but it's unfortunate to keep the 402 spec in a web-incompatible state as it is now.

@bterlson
Copy link
Member

@littledan sorry I missed your ping. I didn't realize this was blocking work :(

Currently we have emu-annex which is non-normative by default and optionally normative using a normative attribute. I suppose we can allow a range of values for this attribute: "" is default, "true" is normative, "false" is non-normative, and "optional" is normative-optional.

Next question is how to display it. I would propose that we display either "non-normative" or "normative-optional" under the section headers (normative would be assumed otherwise). Thoughts?

We should also probably describe what these concepts mean in a separate clause in 262...

@bterlson
Copy link
Member

Also ecmarkup being a superset of html means you can roll your own solution any time. If an emu-clause begins with the text "this clause is optionally normative" then that's probably good enough for now.

@littledan
Copy link
Member

In the case of this ECMA402 change, the normative optional text is a couple steps within an algorithm, rather than an emu-clause.

@bterlson
Copy link
Member

Hmmmm... so what are you thinking then? A new block element for switching normativity of prose? Something like <emu-normativity optional/non-normative>?

@littledan
Copy link
Member

Yeah, something like that. Maybe we could even render this with a colored line on the side when viewing it on the web, like many web specs do (e.g. generated from Bikeshed)

@bterlson
Copy link
Member

bterlson commented Aug 26, 2016

Have a link to Bikeshed's presentation of normative-optional (or optional) handy?

@littledan
Copy link
Member

We're the only ones who are into this normative-optional stuff as far as I know :) Here's an example: in the W3C permissions spec draft, you can see WebIDL in blue, and an example in yellow. There are also issues in red, and notes in green, in the same document. Would it be possible to style an algorithm step something like that? We could insert text for the printed version like NORMATIVE OPTIONAL: at the beginning of the line.

@spectranaut
Copy link

Between 2017 and 2018, we lost the block for "normative-optional" steps in an ECMA-402 algorithm:

@bterlson can we add a <emu-normative-optional> feature, styled like the 2017 spec? Was there one once that was lost?

@spectranaut
Copy link

nevermind, somehow I missed that this has been fixed in 2019. you can close this issue :)

@littledan
Copy link
Member

Wow, good catch @spectranaut ! I do hope we can get this feature upstream in ecmarkup, so we can avoid using the HTML hacks I put into ECMA-402, as well as address accessibility issues with those hacks that @bterlson raised but I lack the expertise to address properly.

@bakkot
Copy link
Contributor

bakkot commented Sep 12, 2021

Fixed by #292, which introduces a new normative-optional attribute which can be applied to clauses (and only clauses). Feel free to open a new issue if there's more needed.

@bakkot bakkot closed this as completed Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants