-
Notifications
You must be signed in to change notification settings - Fork 7
RO-3115:endre list med planer og vise plan i kart knappen #905
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
base: feature/RO-13-turplaner
Are you sure you want to change the base?
Conversation
Co-authored-by: Øystein Myhre <71138449+gruble@users.noreply.github.com>
Co-authored-by: marcin <martin.joodd@gmail.com>
Co-authored-by: marcin <martin.joodd@gmail.com>
Co-authored-by: Øystein Myhre <71138449+gruble@users.noreply.github.com> Co-authored-by: Jørgen Loe Kvalberg <jolokv@nve.no>
There was a problem hiding this 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
geojsonItemToShowOnMapto communicate between the plans page and map component - Replaces the
nve-menucomponent with a customul/listructure featuring action buttons for each plan - Migrates
hadStartupMapViewfrom 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 |
e299446 to
e878b4a
Compare
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.