Skip to content

Comments

fix(element): Update last modified from ui-awesome/html-attribute in related classes.#73

Merged
terabytesoftw merged 1 commit intomainfrom
fix_mini_42
Feb 16, 2026
Merged

fix(element): Update last modified from ui-awesome/html-attribute in related classes.#73
terabytesoftw merged 1 commit intomainfrom
fix_mini_42

Conversation

@terabytesoftw
Copy link
Contributor

Pull Request

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 798a785 and daf898c.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/Element/BaseInput.php
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-01-09T21:17:35.421Z
Learnt from: terabytesoftw
Repo: ui-awesome/html-core PR: 48
File: composer.json:14-14
Timestamp: 2026-01-09T21:17:35.421Z
Learning: In the ui-awesome/html-core repository, during active development phases, the maintainer (terabytesoftw) intentionally uses dev version constraints (e.g., "^0.6dev") for dependencies, and this is acceptable until development stabilizes.

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-12-17T12:23:55.375Z
Learnt from: terabytesoftw
Repo: ui-awesome/html-core PR: 5
File: src/Attribute/CanBeAutofocus.php:53-59
Timestamp: 2025-12-17T12:23:55.375Z
Learning: In the ui-awesome/html-core project, boolean HTML attributes (like `autofocus`, `hidden`, etc.) can be stored as `false` in the attributes array. The BaseAttributes::render() method from the html-helper package automatically filters out boolean attributes with `false` values during rendering, so they don't appear in the final HTML output. This means traits like CanBeAutofocus don't need to unset the attribute when the value is false.

Applied to files:

  • src/Element/BaseInput.php
⏰ 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). (14)
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.5-windows-2022
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: easy-coding-standard / PHP 8.5-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: linter / Super Linter
🔇 Additional comments (2)
CHANGELOG.md (1)

21-21: LGTM!

Changelog entry follows the established format and accurately describes the trait rename.

src/Element/BaseInput.php (1)

8-8: ⚠️ Potential issue | 🔴 Critical

The import statement references a non-existent trait that will cause a runtime fatal error.

The code imports CanBeDisabled from UIAwesome\Html\Attribute, but the ui-awesome/html-attribute package (version 0.5.2, the latest released version) uses Has* naming conventions (e.g., HasAlt, HasSrc), not CanBe*. The CanBeDisabled trait does not exist in documented releases of the ui-awesome/html-attribute package. This import will fail with a class-not-found fatal error at runtime.

Verify that CanBeDisabled exists in the development version (0.6@dev) of ui-awesome/html-attribute before merging, or revert the import to the correct trait name (likely HasDisabled or another existing trait from the package).

⛔ Skipped due to learnings
Learnt from: terabytesoftw
Repo: ui-awesome/html-core PR: 5
File: src/Attribute/CanBeAutofocus.php:53-59
Timestamp: 2025-12-17T12:23:55.375Z
Learning: In the ui-awesome/html-core project, boolean HTML attributes (like `autofocus`, `hidden`, etc.) can be stored as `false` in the attributes array. The BaseAttributes::render() method from the html-helper package automatically filters out boolean attributes with `false` values during rendering, so they don't appear in the final HTML output. This means traits like CanBeAutofocus don't need to unset the attribute when the value is false.
Learnt from: terabytesoftw
Repo: ui-awesome/html-core PR: 37
File: tests/Attribute/HasLangTest.php:15-15
Timestamp: 2025-12-26T20:01:37.722Z
Learning: In the ui-awesome/html-core repository, the Message enum was moved to UIAwesome\Html\Helper\Exception\Message namespace. Validation-related enum cases like VALUE_NOT_IN_LIST, VALUE_CANNOT_BE_EMPTY, and VALUE_SHOULD_BE_ARRAY_SCALAR_NULL_ENUM are maintained in the helper package's Message enum, not in the core package.
Learnt from: terabytesoftw
Repo: ui-awesome/html-core PR: 20
File: src/Attribute/HasDraggable.php:45-45
Timestamp: 2025-12-20T20:28:58.552Z
Learning: In the `src/Attribute/HasDraggable.php` file, the `draggable()` method accepts `UnitEnum` to allow custom enums with MDN-compliant values ("true", "false", "auto"), while runtime validation via `Validator::oneOf($value, Draggable::cases(), 'draggable')` ensures only valid values are accepted to prevent browser errors.
Learnt from: terabytesoftw
Repo: ui-awesome/html-core PR: 48
File: composer.json:14-14
Timestamp: 2026-01-09T21:17:35.421Z
Learning: In the ui-awesome/html-core repository, during active development phases, the maintainer (terabytesoftw) intentionally uses dev version constraints (e.g., "^0.6dev") for dependencies, and this is acceptable until development stabilizes.

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated CHANGELOG with entry for Bug #73.
    • Refactored internal handling of disabled state without affecting public API.

Walkthrough

The PR updates the trait composition in the BaseInput class by replacing the HasDisabled trait with CanBeDisabled, and adds a corresponding changelog entry documenting this change for bug #73.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Adds changelog entry for bug #73 regarding last modified update from ui-awesome/html-attribute.
Trait Refactoring
src/Element/BaseInput.php
Replaces HasDisabled trait with CanBeDisabled trait; updates import statements to reflect the new trait dependency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

bug

Poem

🐰 A trait swap, so clean and bright,
From HasDisabled to CanBeDisabled—just right!
Changelog notes the change we've made,
The disabled state, now better displayed. ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the main change: updating references from ui-awesome/html-attribute in related classes, which matches the CHANGELOG entry and trait replacement in BaseInput.php.
Description check ✅ Passed The PR description is a standard bugfix template that correctly identifies this as a bugfix with no breaking changes, matching the PR objectives and changeset content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_mini_42

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (798a785) to head (daf898c).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #73   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        65        65           
===========================================
  Files             10        10           
  Lines            172       172           
===========================================
  Hits             172       172           

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

@coderabbitai coderabbitai bot added the bug Something isn't working label Feb 16, 2026
@terabytesoftw terabytesoftw merged commit 0a44bf6 into main Feb 16, 2026
49 checks passed
@terabytesoftw terabytesoftw deleted the fix_mini_42 branch February 16, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant