Skip to content

PB-1828: Fix description always shown.#1379

Merged
ismailsunni merged 1 commit intodevelopfrom
fix-pb-1828-description-always-displayed
Jul 10, 2025
Merged

PB-1828: Fix description always shown.#1379
ismailsunni merged 1 commit intodevelopfrom
fix-pb-1828-description-always-displayed

Conversation

@ismailsunni
Copy link
Contributor

@ismailsunni ismailsunni commented Jul 10, 2025

@ismailsunni ismailsunni requested a review from Copilot July 10, 2025 08:01
@github-actions github-actions bot added the bug label Jul 10, 2025
Copy link
Contributor

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.

Pull Request Overview

This PR fixes an issue where the feature description was always shown by correctly parsing the showDescriptionOnMap property and updating the store mutation to accept the new flag.

  • Parse KML string property showDescriptionOnMap into a boolean in kmlUtils.js
  • Extend changeFeatureDescription mutation to optionally update showDescriptionOnMap in the Vuex store

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/mapviewer/src/utils/kmlUtils.js Convert showDescriptionOnMap from string to boolean
packages/mapviewer/src/store/modules/features.store.js Allow changeFeatureDescription to take and apply the new flag
Comments suppressed due to low confidence (1)

packages/mapviewer/src/store/modules/features.store.js:733

  • Add or update unit tests to cover the new showDescriptionOnMap behavior in this mutation to prevent regressions.
        changeFeatureDescription(state, { feature, description, showDescriptionOnMap }) {

@ismailsunni ismailsunni force-pushed the fix-pb-1828-description-always-displayed branch from 144e264 to 3683a3d Compare July 10, 2025 08:03
@ismailsunni ismailsunni requested a review from pakb July 10, 2025 08:04
@cypress
Copy link

cypress bot commented Jul 10, 2025

web-mapviewer    Run #5522

Run Properties:  status check passed Passed #5522  •  git commit 3683a3d5ab: PB-1828: Fix description always shown.
Project web-mapviewer
Branch Review fix-pb-1828-description-always-displayed
Run status status check passed Passed #5522
Run duration 05m 46s
Commit git commit 3683a3d5ab: PB-1828: Fix description always shown.
Committer Ismail Sunni
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 20
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 254
View all changes introduced in this branch ↗︎

const showDescriptionOnMap = kmlFeature.get('showDescriptionOnMap') ?? false
// Convert string to boolean - KML properties are parsed as strings
const showDescriptionOnMapValue = kmlFeature.get('showDescriptionOnMap')
const showDescriptionOnMap = showDescriptionOnMapValue === 'true' || showDescriptionOnMapValue === true
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be easier to read, I let you choose 😉

Suggested change
const showDescriptionOnMap = showDescriptionOnMapValue === 'true' || showDescriptionOnMapValue === true
const showDescriptionOnMap = String(showDescriptionOnMapValue).toLowerCase() === 'true'

@ismailsunni ismailsunni merged commit 2c54a25 into develop Jul 10, 2025
6 checks passed
@ismailsunni ismailsunni deleted the fix-pb-1828-description-always-displayed branch July 10, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants