Use new selector in map and uses choicesjs instead of bootstrap select#57
Merged
Use new selector in map and uses choicesjs instead of bootstrap select#57
Conversation
There was a problem hiding this comment.
PR Overview
This PR updates the symbol selector implementation by replacing bootstrap-select with ChoicesJS and introduces a new pmad-symbol-selector component while removing legacy code. Key changes include:
- Updating CSS generation for game markers in HomeController.
- Migrating UI selectors in arma3TacMap.js and EditMap.cshtml to use ChoicesJS and the new symbol selector.
- Removing the unused milstdExtra.js file.
Reviewed Changes
| File | Description |
|---|---|
| Arma3TacMapWebApp/Controllers/HomeController.cs | Added CSS generation for game markers |
| Arma3TacMapWebApp/wwwroot/js/arma3TacMap.js | Replaced bootstrap-select with ChoicesJS and adjusted symbol-related logic |
| Arma3TacMapWebApp/Controllers/SymbolsController.cs | Added OutlineWidth configuration for symbol rendering |
| Arma3TacMapWebApp/wwwroot/js/milstdExtra.js | Removed deprecated milstdExtra.js code |
| Arma3TacMapWebApp/Views/Shared/_MapScripts.cshtml | Updated script references to use new components |
| Arma3TacMapWebApp/Views/Home/EditMap.cshtml | Replaced legacy selector markup with the new pmad-symbol-selector |
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
Arma3TacMapWebApp/wwwroot/js/arma3TacMap.js:15
- Switching getSymbol() to retrieve the symbol via PmadMilsymbolSelector bypasses the previous concatenation logic. Ensure that the selector instance is always initialized before this method is called to avoid unexpected results.
return PmadMilsymbolSelector.getInstance('sidc').getValue();
Arma3TacMapWebApp/Views/Home/EditMap.cshtml:154
- Ensure that the new pmad-symbol-selector component fully replicates the functionality and interactions of the previous bootstrap-select setup, including proper initialization and event handling.
<pmad-symbol-selector id="sidc" name="" layout="Extended" />
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.
No description provided.