Skip to content

fix: standardize rerender method name to lowercase#314

Merged
palcarazm merged 1 commit into
develop/5.3.1from
fix/313
Apr 9, 2026
Merged

fix: standardize rerender method name to lowercase#314
palcarazm merged 1 commit into
develop/5.3.1from
fix/313

Conversation

@palcarazm
Copy link
Copy Markdown
Owner

@palcarazm palcarazm commented Apr 9, 2026

Change Summary

Indicate the type of change being made.

  • New Feature
  • Bug Fix
  • Refactor
  • Documentation

Description

Provide a brief description of the change.

Fixes #313: bootstrapToggle("RENDERER") method name inconsistent with documented "rerender"

Changes:

  • Replace inconsistent enum RENDERER with RERENDER using value 'rerender'
  • Add case-insensitive method name matching via toLowerCase()
  • Remove duplicate case variants (uppercase/lowercase) from ToggleMethods enum

This ensures the documented method name 'rerender' works consistently while maintaining backward compatibility for uppercase usage through case-insensitive matching.

Test Coverage

Indicate whether you have added, modified, fixed, or removed tests.

  • Added tests
  • Modified tests
  • Fixed tests
  • Removed tests (please explain why in additional notes)

Documentation Changes

Indicate whether any documentation has been updated.

  • Documentation updated

Additional Notes

Provide any additional information or context.

No tests were added or modified in this change. The existing test suite passes, but case-insensitive method invocation is not explicitly covered. A follow-up PR may add test coverage for:

  • Mixed-case method names (e.g., 'ReReNdEr')
  • The specific 'RERENDER' enum value
  • Backward compatibility with legacy uppercase usage

The README.md documentation remains accurate as it documents 'rerender' (lowercase) as the method name.


Pull Request Checklist

  • Code adheres to the project's coding style guide.
  • All tests are passing.
  • The pull request description is complete.
  • Documentation is updated if needed.

Replace inconsistent enum RENDERER with RERENDER using value 'rerender'
Add case-insensitive method name matching via toLowerCase()
Remove duplicate case variants (uppercase/lowercase) from ToggleMethods enum

Fixes #313
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 9, 2026

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 95.703%. remained the same — fix/313 into develop/5.3.1

Copy link
Copy Markdown

@llamapreview llamapreview Bot left a comment

Choose a reason for hiding this comment

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

AI Code Review by LlamaPReview

🎯 TL;DR & Recommendation

Recommendation: Request Changes

This PR standardizes the rerender method name but introduces a breaking change for direct enum usage, which could cause compilation and runtime failures for consumers.

🌟 Strengths

  • Successfully aligns the enum with documented method names, improving API clarity.
Priority File Category Impact Summary Anchors
P1 src/main/ts/types/ToggleMethods.ts Architecture Breaks direct enum usage, causing failures path:src/main/js/index.jquery.js
P2 src/main/js/index.jquery.js Testing Missing test coverage for case-insensitive matching path:src/main/ts/index.ecmas.ts
P2 src/main/ts/types/ToggleMethods.ts Maintainability Opportunity for cleaner normalization logic

📈 Risk Diagram

This diagram illustrates the breaking change risk for TypeScript consumers using deprecated enum keys.

sequenceDiagram
    participant C as TypeScript Consumer
    participant E as ToggleMethods Enum
    participant B as bootstrapToggle Function

    C->>E: Access ToggleMethods.rerender
    E-->>C: Error: Property not found
    note over C,E: R1(P1): Breaking change removes lowercase enum keys, causing compilation failures
Loading

💡 Have feedback? We'd love to hear it in our GitHub Discussions.
✨ This review was generated by LlamaPReview Advanced, which is free for all open-source projects. Learn more.

Comment thread src/main/ts/types/ToggleMethods.ts
Comment thread src/main/js/index.jquery.js
Comment thread src/main/ts/types/ToggleMethods.ts
@palcarazm palcarazm merged commit 37e3e53 into develop/5.3.1 Apr 9, 2026
12 checks passed
@palcarazm palcarazm deleted the fix/313 branch April 9, 2026 16:18
@github-project-automation github-project-automation Bot moved this from To do to Done in Pull Request Apr 9, 2026
palcarazm added a commit that referenced this pull request Apr 9, 2026
* fix: standardize rerender method name to lowercase (#314)

Replace inconsistent enum RENDERER with RERENDER using value 'rerender'
Add case-insensitive method name matching via toLowerCase()
Remove duplicate case variants (uppercase/lowercase) from ToggleMethods enum

Fixes #313

* refactor: migrate type system to isolated declaration files

Extracted global augmentation interfaces from BootstrapToggle.d.ts into
separate BootstrapToggleElement.ts to allow named exports of
HTMLInputElement event map types.

Added proper type exports in index.ts for BootstrapToggleElement and
BootstrapToggleElementEventMap. Updated Jest and Sonar coverage
exclusions to correctly ignore all entry point files (index*.ts).
Configured build pipeline to clean dist directory before compilation.

This change improves type safety for consumers by providing explicit
type exports without requiring global augmentation side effects. Build
order is enforced via Grunt task sequence ensuring tsc runs before
rollup.

* 5.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bootstrapToggle("RENDERER") method name inconsistent with documented "rerender"

2 participants