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

Editorial: use Infra list syntax in mutations #762

Merged
merged 2 commits into from
May 21, 2019

Conversation

annevk
Copy link
Member

@annevk annevk commented May 17, 2019

As pointed out at #695 (review) it would be nice if this were more consistent.


Preview | Diff

As pointed out at #695 (review) it would be nice if this were more consistent.
<li><p>If <var>node</var> is {{DocumentFragment}} <a>node</a>, then set <var>addedNodes</var> to
<var>node</var>'s <a>children</a>.

<li><p>Otherwise, if <var>node</var> is non-null, set <var>addedNodes</var> to « <var>node</var> ».
Copy link
Member Author

Choose a reason for hiding this comment

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

@domenic this is the only change that felt a little weird here due to it getting so much longer, but it's probably better?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this matches the code better. Nested ternaries are not great in either English or code, IMO. You could also use dl class="switch".

dom.bs Outdated
a {{DocumentFragment}} <a>node</a>, and a
list containing solely <var>node</var> otherwise.
<li><p>Let <var>nodes</var> be <var>node</var>'s <a>children</a>, if <var>node</var> is a
{{DocumentFragment}} <a>node</a>, « <var>node</var> » otherwise.
Copy link
Member

Choose a reason for hiding this comment

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

This reads really wrong; I'm not happy with where we've landed if this is what happens. Commas just don't work that way. Semicolon could work, or using a conjunction (either "and" or "or").

Copy link
Member Author

@annevk annevk May 17, 2019

Choose a reason for hiding this comment

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

Same if otherwise comes first? I see now I put them wrong way around. I guess I can do some follow-up on Monday in that original thread on this.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see. If otherwise comes first it isn't as viscerally wrong, but I still have a slight preference for a conjunction or semicolon.

<li><p>If <var>node</var> is {{DocumentFragment}} <a>node</a>, then set <var>addedNodes</var> to
<var>node</var>'s <a>children</a>.

<li><p>Otherwise, if <var>node</var> is non-null, set <var>addedNodes</var> to « <var>node</var> ».
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this matches the code better. Nested ternaries are not great in either English or code, IMO. You could also use dl class="switch".

@annevk annevk merged commit e6b69e3 into master May 21, 2019
@annevk annevk deleted the annevk/be-more-consistent-with-lists branch May 21, 2019 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants