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

Update boolean attributes in the view macro #440

Merged
merged 2 commits into from
Jun 26, 2022

Conversation

mc1098
Copy link
Contributor

@mc1098 mc1098 commented Jun 21, 2022

This adds some attributes but mostly removes attributes which are not
part of the standard.

I have gone through each attribute removed in this list just to make sure I'm
not removing something often used but not in the WHATWG standard for some
reason - this was never the case.

I can, if you like, explicitly list each removed attribute and link to some evidence
that it is either (1) not a boolean attribute (like contenteditable); (2) deprecated
(like scoped); or (3) is not going to be implemented (like sortable).

As is this PR would be in sync with the boolean attributes listed in the WHATWG
attributes table
.

This wouldn't prevent a user from using one of the removed attributes as a boolean
attribute in the case they are targeting some old version of a browser. They can
use the attribute name and set the value to either "" or to an empty
string but to remove it would probably need NodeRef and manually calling to
remove the attribute.

mc1098 added 2 commits June 21, 2022 19:00
This adds some attributes but mostly removes attributes which are not
part of the standard.
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #440 (ea9a85b) into master (1c06c9b) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
- Coverage   64.85%   64.81%   -0.04%     
==========================================
  Files          52       52              
  Lines        8328     8320       -8     
==========================================
- Hits         5401     5393       -8     
  Misses       2927     2927              
Impacted Files Coverage Δ
packages/sycamore-macro/src/view/ir.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c06c9b...ea9a85b. Read the comment docs.

@lukechu10
Copy link
Member

Awesome! I forgot where I got the original list of boolean attributes, but it seems like it was quite incomplete/outdated!

@lukechu10 lukechu10 merged commit 496eef3 into sycamore-rs:master Jun 26, 2022
@mc1098 mc1098 deleted the boolean-attr branch June 26, 2022 16:29
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

Successfully merging this pull request may close these issues.

2 participants