feat(attribute): Add HasInputmode trait and inputmode() method to manage inputmode attribute for HTML elements.#79
Conversation
… manage `inputmode` attribute for HTML elements.
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR adds support for the HTML inputmode attribute through a new HasInputMode trait, an InputMode enum with eight cases (decimal, email, none, numeric, search, tel, text, url), comprehensive unit tests with data providers, and changelog documentation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2026-01-09T16:05:15.502ZApplied to files:
📚 Learning: 2026-02-07T13:44:00.931ZApplied to files:
🧬 Code graph analysis (2)tests/Global/HasInputModeTest.php (4)
tests/Provider/Global/InputModeProvider.php (2)
🪛 PHPMD (2.15.0)tests/Global/HasInputModeTest.php[warning] 70-70: Avoid excessively long variable names like $expectedRenderAttribute. Keep variable name length under 20. (undefined) (LongVariable) [error] 87-87: Avoid using static access to class '\UIAwesome\Html\Helper\Attributes' in method 'testSetInputModeAttributeValue'. (undefined) (StaticAccess) [error] 104-104: Avoid using static access to class '\UIAwesome\Html\Helper\Enum' in method 'testThrowInvalidArgumentExceptionForSettingInputModeValue'. (undefined) (StaticAccess) [error] 104-104: Avoid using static access to class '\UIAwesome\Html\Attribute\Values\InputMode' in method 'testThrowInvalidArgumentExceptionForSettingInputModeValue'. (undefined) (StaticAccess) src/Global/HasInputMode.php[error] 43-43: Avoid using static access to class '\UIAwesome\Html\Helper\Validator' in method 'inputMode'. (undefined) (StaticAccess) [error] 43-43: Avoid using static access to class '\UIAwesome\Html\Attribute\Values\InputMode' in method 'inputMode'. (undefined) (StaticAccess) tests/Provider/Global/InputModeProvider.php[error] 26-26: Avoid using static access to class '\PHPForge\Support\EnumDataProvider' in method 'values'. (undefined) (StaticAccess) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (6)
✏️ Tip: You can disable this entire section by setting 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 |
Pull Request