Skip to content

Use new selector in map and uses choicesjs instead of bootstrap select#57

Merged
jetelain merged 5 commits intomainfrom
map-new-selector
Mar 4, 2025
Merged

Use new selector in map and uses choicesjs instead of bootstrap select#57
jetelain merged 5 commits intomainfrom
map-new-selector

Conversation

@jetelain
Copy link
Owner

@jetelain jetelain commented Mar 4, 2025

No description provided.

@jetelain jetelain requested a review from Copilot March 4, 2025 08:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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" />

@jetelain jetelain marked this pull request as ready for review March 4, 2025 08:44
@jetelain jetelain merged commit 1d2ee65 into main Mar 4, 2025
1 check passed
@jetelain jetelain deleted the map-new-selector branch March 4, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants