Skip to content

Conversation

@amish1188
Copy link
Contributor

Jeg oppretter geojsonItemToShowOnMap observable som skal inneholde geojson som skal vises i kart. Så lytter kart komponent på den og justerer bounds i forhold til det.

Jeg gjort om vis i kart lenke til en knapp fordi først og fremst bruker vi js for å navigere men også fordi høyreklikk på lenken og åpne lenken i en ny fane er ikke støttet (krever mer jobb med å justere urlen med valgte turen).

Dette var kjapt løsning. Sikkert kan gjøres bedre.

@amish1188 amish1188 changed the title change list view and add buttons to show tour on the map RO-3115:endre list med planer og vise plan i kart knappen Dec 19, 2025
@amish1188 amish1188 requested a review from Copilot December 19, 2025 12:59
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 refactors the plans list UI and adds functionality to display a selected plan directly on the map. The main changes include replacing the menu-based list with a custom list layout, converting a link to a button for map navigation, and implementing a signal-based system to communicate selected geojson items to the map component.

  • Adds a new observable geojsonItemToShowOnMap to communicate between the plans page and map component
  • Replaces the nve-menu component with a custom ul/li structure featuring action buttons for each plan
  • Migrates hadStartupMapView from a boolean property to a signal for better state management

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/assets/icon/visibility.svg Adds new visibility icon for the "view details" button
src/assets/i18n/nb.json Adds Norwegian translation for the "show plan on map" button aria-label
src/assets/i18n/en.json Adds English translation for the "show plan on map" button aria-label
src/app/pages/plans/plans.page.ts Adds methods to handle showing plans on map and updates geojson service reference
src/app/pages/plans/plans.page.html Replaces menu component with custom list layout including two action buttons per plan item
src/app/pages/plans/plans.page.css Adds styles for the new custom list layout and button group
src/app/pages/home/home.page.ts Updates to use the new signal-based hadStartupMapView
src/app/modules/map/services/map/map.service.ts Converts hadStartupMapView from boolean to signal
src/app/modules/map/components/map/map.component.ts Adds subscription to handle geojson bounds updates and new flyToBounds method
src/app/core/services/geojson/geojson.service.ts Adds signal and observable for tracking geojson items to show on map

@gruble gruble force-pushed the feature/RO-13-turplaner branch 2 times, most recently from e299446 to e878b4a Compare December 19, 2025 16:29
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.

4 participants