Skip to content

feat(autofix): Fix UI5 Bootstrap Parameters in HTML#779

Merged
maxreichmann merged 33 commits into
mainfrom
feat-autofix-bootstrap-parameters
Aug 19, 2025
Merged

feat(autofix): Fix UI5 Bootstrap Parameters in HTML#779
maxreichmann merged 33 commits into
mainfrom
feat-autofix-bootstrap-parameters

Conversation

@matz3

@matz3 matz3 commented Jul 16, 2025

Copy link
Copy Markdown
Member

JIRA: CPOUI5FOUNDATION-1063

Open tasks:

  • Removal of binding syntax attribute if compat-version=edge is currently handled in addition to the existing check. This should be streamlined and tested properly.
  • Removal of duplicate attributes (identical names) + tests
  • Remove Attributes: Adjust logic to remove entire line (no whitespace)
  • Check existing fixtures and snapshots for correctness
  • Identify missing scenarios and add test cases
    • Missing test case for removal of binding syntax attribute if compat-version=edge
    • Maybe also some more missing cases
  • Implement parsing error checks (currently commented out in src/autofix/autofix.ts). This needs some investigation to find a good solution:
    • HTML is not strictly valid XML, so we can't reuse the approach for XML files
    • A separate HTML parser might be required to check for issues
    • We might use the existing XML parser approach and only check for error differences of the file before and after the autofix
    • Unit test for error handling could be done in a similar way as for XML changes:
      class TestFix extends XmlEnabledFix {
    • Discussion on July 28: Agreed upon to omit a special HTML syntax validation since it's too vague and not very suitable for our cases -> Instead try to validate by covering as many edge cases in the tests as possible
  • Check code coverage and add unit tests where applicable (e.g. for AnimationModeFix.getAnimationModeValue)
  • Add test cases for unquoted attribute values (e.g. data-sap-ui-compatVersion=edge). Modifications should not fail or create invalid HTML, but it would be also fine to ignore such cases as it is unusual and rarely appears in real world projects
    • Add tests to ensure autofix doesn't break anything for these cases
  • Add note to README.md
  • Handle removal of duplicate attributes WITHOUT values
  • Handle attributes which only have one character (e.g. a="xyz" or a)
    • Removal
    • Renaming
  • Add unit tests for RemoveAttributeFix, RenameAttributeFix & AnimationModeFix
  • Check Linter Diff

@maxreichmann
maxreichmann force-pushed the feat-autofix-bootstrap-parameters branch from f7fff57 to 05414bd Compare July 25, 2025 08:18
@flovogt flovogt mentioned this pull request Aug 1, 2025
10 tasks
@maxreichmann
maxreichmann force-pushed the feat-autofix-bootstrap-parameters branch 2 times, most recently from d32cde0 to 89e10d0 Compare August 7, 2025 07:56
@maxreichmann
maxreichmann marked this pull request as ready for review August 8, 2025 14:19
@maxreichmann
maxreichmann requested review from a team and removed request for a team August 8, 2025 14:19
@maxreichmann
maxreichmann marked this pull request as draft August 11, 2025 08:25
@maxreichmann
maxreichmann force-pushed the feat-autofix-bootstrap-parameters branch 2 times, most recently from 117c32a to 7ced835 Compare August 13, 2025 08:01
@maxreichmann
maxreichmann force-pushed the feat-autofix-bootstrap-parameters branch from 21f1449 to 4c772f1 Compare August 15, 2025 07:05
@maxreichmann
maxreichmann marked this pull request as ready for review August 19, 2025 08:15
Comment thread src/linter/html/fix/RemoveAttributeFix.ts Outdated
Comment thread src/linter/html/fix/RemoveAttributeFix.ts Outdated
d3xter666
d3xter666 previously approved these changes Aug 19, 2025

@d3xter666 d3xter666 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread src/linter/html/HtmlReporter.ts Outdated

@matz3 matz3 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM

@maxreichmann
maxreichmann merged commit ee05a3a into main Aug 19, 2025
19 checks passed
@maxreichmann
maxreichmann deleted the feat-autofix-bootstrap-parameters branch August 19, 2025 13:35
@openui5bot openui5bot mentioned this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants