refactor(attribute): Update documentation for various HTML attributes and their usage in elements.#53
Conversation
… and their usage in elements.
📝 WalkthroughWalkthroughThis PR updates documentation across HTML attribute enums to clarify element applicability and add MDN references. It also refactors test data providers, consolidating test case keys, adding UnitEnum imports, and removing backslash escaping from type annotations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/Support/Provider/TargetProvider.php`:
- Around line 50-56: The data provider entry keyed 'string' only exercises the
raw string '_self', leaving other raw-string paths untested; update the 'string'
array in tests/Support/Provider/TargetProvider.php (the provider that returns
raw-string cases) to include at least one non-'_self' raw value (e.g. '_blank'
or '_top') with its expected output (e.g. ' target="_blank"') so callers that
pass raw strings are covered; keep the same tuple shape as the existing entries
and add the case alongside the existing '_self' tuple.
🧹 Nitpick comments (1)
tests/Support/Provider/ImagesrcsetProvider.php (1)
46-58: Key renames look good; consider differentiating descriptions.The key standardization is consistent with the broader refactoring effort. However, both test cases now share the identical description "Should return the attribute value after setting it." which reduces diagnostic clarity if a test fails.
Consider making the 'string with multiple' description more specific:
💡 Optional: Differentiate the description
'string with multiple' => [ 'image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w', [], 'image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w', ' imagesrcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"', - 'Should return the attribute value after setting it.', + 'Should return the attribute value with multiple srcset entries after setting it.', ],
Pull Request
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.