refactor: convert custom JS components to Bootstrap-style classes#2587
Open
refactor: convert custom JS components to Bootstrap-style classes#2587
Conversation
…ality and documentation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…al methods, and update documentation for usage
…rage configuration
…mports to use 'bootstrap' directly
…ion and importing theme directly
…d enhanced functionality
…rface responsiveness
…ts and tests for consistency
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.
This pull request makes significant improvements to the JavaScript codebase by refactoring several UI utility modules into class-based, modular implementations with better initialization, instance management, and extensibility. It also updates GitHub Actions workflows for build and test, and simplifies Bootstrap component imports for more consistent usage.
Refactoring and Modularization of UI Utilities:
autosize.ts,clipboard.ts,countup.ts, andinput-mask.tsto class-based implementations, encapsulating their logic, supporting instance management, and providing clear APIs for initialization, updating, and disposal. These changes improve maintainability and extensibility of these modules. [1] [2] [3] [4] [5]WeakMapfor all above modules, enabling safe retrieval and management of instances associated with DOM elements. [1] [2] [3] [4]Bootstrap Integration and Component Initialization:
Dropdown,Popover) from local wrappers to direct imports from thebootstrappackage, ensuring up-to-date and consistent usage. [1] [2]collapse.ts,modal.ts,offcanvas.ts) directly on elements with appropriate data attributes, supporting more declarative UI behavior. [1] [2] [3]Workflow and Build Improvements:
.github/workflows/build.ymlto automate build steps on pull requests, including caching, dependency installation, and building the project..github/workflows/test.ymlto clarify the job name, and changed the workflow to run tests instead of building, aligning with best CI practices. [1] [2]Cleanup and Simplification:
bootstrap.tsre-export file, favoring direct imports for clarity and to reduce indirection.Summary of Most Important Changes:
1. Refactoring and Modularization
autosize.ts,clipboard.ts,countup.ts, andinput-mask.tsinto class-based modules with instance management, improving extensibility and maintainability. [1] [2] [3] [4] [5]2. Bootstrap Component Initialization
collapse,modal,offcanvas,dropdown,popover) using direct imports and data attributes for declarative UI. [1] [2] Fd30be4R1, [3] [4]3. GitHub Actions Workflows
4. Cleanup
bootstrap.tsfile and its re-exports, simplifying Bootstrap usage across the codebase.