-
Notifications
You must be signed in to change notification settings - Fork 263
feat: Replace Vanilla JS with TypeScript + Vite #496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
- Add Vite build system with TypeScript support * package.json with pnpm * vite.config.ts for build configuration * tsconfig.json for TypeScript settings - Migrate translation.js from AngularJS to TypeScript * Modular architecture: types, utils, API client * Type-safe codebase with full TypeScript checking - Update Twig templates to load Vite assets * Support for dev server (HMR) and production builds - Remove legacy AngularJS code This modernization improves maintainability, type safety, and developer experience while maintaining all existing functionality. BREAKING CHANGE: Frontend assets now require build step: pnpm install && pnpm run build Refs: #XXX
Collaborator
|
@HecFranco We don't have Angular in master anymore, we have the pure JS implementation, or did I miss something? |
Contributor
Author
|
That’s right, it’s vanilla JavaScript. |
…ate composer.lock - Added "symfony/var-exporter" with version constraints "^6.4|^7.0" to the require section of composer.json. - Generated composer.lock file to lock dependencies and ensure consistent installations. This update ensures compatibility with the new Symfony components while maintaining existing functionality.
- Updated the content-hash to reflect changes in dependencies. - This ensures the lock file is in sync with the current state of the project.
- Added an empty "platform" section in composer.json. - Updated various Symfony package versions in composer.lock to 7.4.4, ensuring compatibility with PHP 8.2. - Adjusted dependency requirements for several packages to align with the new Symfony versioning. This update enhances compatibility with Symfony 7.x while maintaining support for existing functionality.
- Removed the empty "platform" section from composer.json to streamline configuration. - Maintained existing "sort-packages" setting for dependency management. This change simplifies the composer.json file without affecting functionality.
…bility - Added an empty "platform" section in composer.json to support PHP 8.4. - Updated various Symfony package versions in composer.lock to 8.0.4, ensuring compatibility with PHP 8.4. - Adjusted dependency requirements for several packages to align with the new Symfony versioning. This update enhances compatibility with Symfony 8.x while maintaining support for existing functionality.
Collaborator
|
@HecFranco Would you like to share the reason you closed it? |
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.
🎯 Purpose
This PR replaces the legacy Js Vanilla frontend with a modern TypeScript + Vite build system, improving maintainability, type safety, and developer experience.
🔧 Changes
Build System
package.json: Configured for pnpm with Vite, TypeScript, and Stimulusvite.config.ts: Build configuration with HMR supporttsconfig.json: TypeScript compiler settings.npmrc: pnpm configurationResources/public/dist/with hashed filenamesTypeScript Migration
translation.js(Vanilla JS) to TypeScriptassets/translation.ts: Main entry pointassets/types/config.ts: Type definitions for configurationassets/utils/api.ts: API client with fetchassets/utils/message.ts: Message display utilitiesassets/utils/html.ts: HTML manipulation utilitiesassets/utils/grid.ts: Grid-specific utilitiesTwig Templates
grid.html.twig: Loads Vite dev server or built assets_grid.html.twig: Updated for new frontendoverview.html.twig: Updated asset loadingwindow.lexikTranslationConfigLegacy Code Removal
translation.js(replaced by TypeScript)✅ Testing
📝 Breaking Changes
BREAKING CHANGE: Frontend assets now require a build step:
Development requires either:
pnpm run dev)pnpm run build)🔗 Related Issues
Replaces legacy VAnilla JS with modern TypeScript + Vite.
📚 Documentation
assets/README.mdwith setup instructions.gitignorefor frontend build artifacts