Simplify Ignite by eliminating BlockHTML
#463
Open
+112
−505
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While revisiting the nuts and bolts of Ignite during the recent testing initiative, I noticed that
BlockHTML
is put to use substantively in only two places:contents
closure ofItem
uses@BlockHTMLBuilder
to set an accordion item’s body.render()
method ofGrid
, we cast toBlockHTML
to extract thecolumnWidth
information.But here’s the thing:
HTML
variant checking inGrid
is faulty. CustomHTML
elements are wrapped in<div>
, but because they only conform toHTML
, notBlockHTML
, they aren’t handled correctly. What’s more, inline elements should not be ignored in the rendering process—as they currently are. Instead, they should be treated the same way as block elements.Before CSS controlled an HTML element’s display value, elements fell into two main categories—those with a block default, and those with an inline default.
We can eliminate all of the above problems by axing
BlockHTML
, movingcolumnWidth
toCoreAttributes
, and treatingHTML
elements as block elements by default—withInlineHTML
working to restrict/specialize that default behavior.This also allows us to eliminate a bunch of repetitive modifier extensions from the codebase.
This may also allow us to simplify #297.