fix: standardize rerender method name to lowercase#314
Merged
Conversation
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
2 tasks
|
There was a problem hiding this comment.
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
💡 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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Change Summary
Indicate the type of change being made.
Description
Provide a brief description of the change.
Fixes #313: bootstrapToggle("RENDERER") method name inconsistent with documented "rerender"
Changes:
RENDERERwithRERENDERusing value 'rerender'toLowerCase()ToggleMethodsenumThis 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.
Documentation Changes
Indicate whether any documentation has been 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:
The README.md documentation remains accurate as it documents 'rerender' (lowercase) as the method name.
Pull Request Checklist