Skip to content

Add dedicated classes for missing HTML tags (#268)#278

Open
Mister-42 wants to merge 5 commits into
yiisoft:masterfrom
va108:master
Open

Add dedicated classes for missing HTML tags (#268)#278
Mister-42 wants to merge 5 commits into
yiisoft:masterfrom
va108:master

Conversation

@Mister-42

Copy link
Copy Markdown
Contributor
Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Fixed issues #268

Testing local AI, this Issue seemed a perfect candidate. Close if improper.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9a710a2) to head (a5dc0d1).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##              master      #278    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity       837      1062   +225     
============================================
  Files             91       138    +47     
  Lines           2265      2757   +492     
============================================
+ Hits            2265      2757   +492     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds dedicated tag classes and Html helper factory methods for a set of previously-missing HTML elements (Issue #268), along with test coverage and documentation updates.

Changes:

  • Introduce new Yiisoft\Html\Tag\* classes for missing HTML tags (e.g. Abbr, Details, Dialog, Template, Time, etc.).
  • Extend Yiisoft\Html\Html with new static factory methods for these tags and add corresponding integration tests.
  • Update README tag/method listings and add a CHANGELOG entry for #268.

Reviewed changes

Copilot reviewed 88 out of 88 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Tag/VarTest.php Adds unit test for <var> tag class.
tests/Tag/UTest.php Adds unit test for <u> tag class.
tests/Tag/TimeTest.php Adds unit tests for <time> tag and datetime() attribute.
tests/Tag/TemplateTest.php Adds unit test for <template> tag class.
tests/Tag/SupTest.php Adds unit test for <sup> tag class.
tests/Tag/SummaryTest.php Adds unit test for <summary> tag class.
tests/Tag/SubTest.php Adds unit test for <sub> tag class.
tests/Tag/STest.php Adds unit test for <s> tag class.
tests/Tag/SlotTest.php Adds unit test for <slot> tag class.
tests/Tag/SearchTest.php Adds unit test for <search> tag class.
tests/Tag/SampTest.php Adds unit test for <samp> tag class.
tests/Tag/RubyTest.php Adds unit test for <ruby> tag class.
tests/Tag/RtTest.php Adds unit test for <rt> tag class.
tests/Tag/RpTest.php Adds unit test for <rp> tag class.
tests/Tag/QTest.php Adds unit tests for <q> tag and cite() attribute.
tests/Tag/ProgressTest.php Adds unit tests for <progress> and max() / value() attributes.
tests/Tag/OutputTest.php Adds unit test for <output> tag class.
tests/Tag/MeterTest.php Adds unit tests for <meter> and numeric attribute setters.
tests/Tag/MenuTest.php Adds unit test for <menu> list rendering.
tests/Tag/MarkTest.php Adds unit test for <mark> tag class.
tests/Tag/MapTest.php Adds unit test for <map> tag class.
tests/Tag/MainTest.php Adds unit test for <main> tag class.
tests/Tag/KbdTest.php Adds unit test for <kbd> tag class.
tests/Tag/InsTest.php Adds unit tests for <ins> and cite() / datetime() attributes.
tests/Tag/IframeTest.php Adds unit tests for <iframe> and src() attribute.
tests/Tag/HeadTest.php Adds unit test for <head> composition and encoding control.
tests/Tag/FigureTest.php Adds unit test for <figure> composition and encoding control.
tests/Tag/FigcaptionTest.php Adds unit test for <figcaption> tag class.
tests/Tag/DtTest.php Adds unit test for <dt> tag class.
tests/Tag/DlTest.php Adds unit test for <dl> composition and encoding control.
tests/Tag/DialogTest.php Adds unit test for <dialog> tag class.
tests/Tag/DfnTest.php Adds unit test for <dfn> tag class.
tests/Tag/DetailsTest.php Adds unit test for <details> composition and encoding control.
tests/Tag/DelTest.php Adds unit tests for <del> and cite() / datetime() attributes.
tests/Tag/DdTest.php Adds unit test for <dd> tag class.
tests/Tag/DataTest.php Adds unit tests for <data> and value() attribute.
tests/Tag/CiteTest.php Adds unit test for <cite> tag class.
tests/Tag/CanvasTest.php Adds unit test for <canvas> tag class.
tests/Tag/BlockquoteTest.php Adds unit tests for <blockquote> and cite() attribute.
tests/Tag/BdoTest.php Adds unit test for <bdo> tag class.
tests/Tag/BdiTest.php Adds unit test for <bdi> tag class.
tests/Tag/AbbrTest.php Adds unit test for <abbr> tag class.
tests/HtmlTest.php Extends Html helper integration tests for newly added tags.
src/Tag/Var_.php Adds <var> tag class implementation.
src/Tag/U.php Adds <u> tag class implementation.
src/Tag/Time.php Adds <time> tag class with datetime() attribute setter.
src/Tag/Template.php Adds <template> tag class implementation.
src/Tag/Sup.php Adds <sup> tag class implementation.
src/Tag/Summary.php Adds <summary> tag class implementation.
src/Tag/Sub.php Adds <sub> tag class implementation.
src/Tag/Slot.php Adds <slot> tag class implementation.
src/Tag/Search.php Adds <search> tag class implementation.
src/Tag/Samp.php Adds <samp> tag class implementation.
src/Tag/S.php Adds <s> tag class implementation.
src/Tag/Ruby.php Adds <ruby> tag class implementation.
src/Tag/Rt.php Adds <rt> tag class implementation.
src/Tag/Rp.php Adds <rp> tag class implementation.
src/Tag/Q.php Adds <q> tag class with cite() attribute setter.
src/Tag/Progress.php Adds <progress> tag class with numeric attribute setters.
src/Tag/Output.php Adds <output> tag class implementation.
src/Tag/Meter.php Adds <meter> tag class with numeric attribute setters.
src/Tag/Menu.php Adds <menu> tag class based on ListTag.
src/Tag/Mark.php Adds <mark> tag class implementation.
src/Tag/Map.php Adds <map> tag class implementation.
src/Tag/Main.php Adds <main> tag class implementation.
src/Tag/Kbd.php Adds <kbd> tag class implementation.
src/Tag/Ins.php Adds <ins> tag class with cite() / datetime() attribute setters.
src/Tag/Iframe.php Adds <iframe> tag class with src() attribute setter.
src/Tag/Head.php Adds <head> tag class implementation.
src/Tag/Figure.php Adds <figure> tag class implementation.
src/Tag/Figcaption.php Adds <figcaption> tag class implementation.
src/Tag/Dt.php Adds <dt> tag class implementation.
src/Tag/Dl.php Adds <dl> tag class implementation.
src/Tag/Dialog.php Adds <dialog> tag class implementation.
src/Tag/Dfn.php Adds <dfn> tag class implementation.
src/Tag/Details.php Adds <details> tag class implementation.
src/Tag/Del.php Adds <del> tag class with cite() / datetime() attribute setters.
src/Tag/Dd.php Adds <dd> tag class implementation.
src/Tag/Data.php Adds <data> tag class with value() attribute setter.
src/Tag/Cite.php Adds <cite> tag class implementation.
src/Tag/Canvas.php Adds <canvas> tag class implementation.
src/Tag/Blockquote.php Adds <blockquote> tag class with cite() attribute setter.
src/Tag/Bdo.php Adds <bdo> tag class implementation.
src/Tag/Bdi.php Adds <bdi> tag class implementation.
src/Tag/Abbr.php Adds <abbr> tag class implementation.
src/Html.php Adds new Html::tagName() factory methods and imports for the new tag classes.
README.md Updates documented tag classes and Html helper method groups.
CHANGELOG.md Adds release note entry for #268.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Html.php Outdated
Comment thread src/Tag/Area.php Outdated
Comment thread src/Tag/Iframe.php Outdated
Comment thread src/Tag/Menu.php
Comment thread src/Tag/Object_.php Outdated
Comment thread src/Tag/Var_.php Outdated
Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread tests/Tag/InsTest.php
- Remove media() from Area (not a valid HTML attribute)
- Rename Object_ to ObjectTag, Var_ to VarTag
- Remove TagContentTrait from Iframe (content model: Nothing)
- Change Html::iframe() signature to iframe(?string , array )
- Update ListTag phpdoc to mention menu
- Simplify README tag class list per suggestion
- Fix tag ordering in README and update renamed classes
- Add testImmutability() for all new tag classes with attribute methods
@vjik vjik requested a review from a team June 12, 2026 10:28
@vjik vjik added the status:code review The pull request needs review. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants