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

New include tag parser #4688

Merged
merged 7 commits into from
Nov 27, 2023
Merged

New include tag parser #4688

merged 7 commits into from
Nov 27, 2023

Conversation

ssddanbrown
Copy link
Member

@ssddanbrown ssddanbrown commented Nov 22, 2023

Todo

  • Consider usage with details blocks (Maybe other acceptable top levels? Could be worth inverting to handle blocks that don't allow this.
    • This page has a list: html, head, body, p, dt, dd, li, ption, thead, th, tbody, tr, td, tfoot, colgroup.
    • In the end, I made this specific to p tags since that's the large case to target, otherwise most existing parents should be fine. Will be edge-cases (header in other headers etc...) but are much more likely to be user-driven and solvable, and harder to fall into.
  • Add multi-depth support (3 levels as per production)
  • Look to update/handle the logical theme system event somehow.
  • Handle duplicate IDs?
  • Expand test cases
    • Multiple tags in same elem.

Doc Updates

  • Note (potentially) breaking change of include behaviour as update advisory.
  • Note break/change in include event.
  • Maybe update page include docs with some technical info regarding it's behaviour?

Adds logic for locating and splitting text nodes.
Adds specific classes to offload tag/content specific logic.
Implements block promoting to body (including position choosing based
upon likely tag position within parent) and block splitting where we're
only a single depth down from the body child.
Expanded tests with many more cases, and added fixes for failed
scenarios.
Updated logic to specifically handling parent <p> tags, and now assume
compatibility with parent block types elswhere to allow use in a
variety of scenarios (td, details, blockquote etc...).
- Added mulit-level depth parsing.
- Updating usage of HTML doc in page content to be efficient.
- Removed now redundant PageContentTest cases.
- Made some include system fixes based upon testing.
Managed to do this in an API-compatible way although resuling output may
differ due to new dom handling in general, although user content is used
inline to remain as comptable as possible.
@ssddanbrown ssddanbrown merged commit 1011d61 into development Nov 27, 2023
20 of 21 checks passed
@ssddanbrown ssddanbrown deleted the include-parser branch November 27, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant