Skip to content

RO-3199: Flytt bildesøk til egen tab#990

Open
jorgkv wants to merge 1 commit into
developfrom
feature/RO-3199-images-tab
Open

RO-3199: Flytt bildesøk til egen tab#990
jorgkv wants to merge 1 commit into
developfrom
feature/RO-3199-images-tab

Conversation

@jorgkv

@jorgkv jorgkv commented May 11, 2026

Copy link
Copy Markdown
Contributor

Dette løser RO-3199 fordi Ionic/Angular nå husker tilstanden til listevisningen bedre.

Du kan nå gå inn på en observasjon, gå tilbake, hoppe mellom liste og bildevisning, og applikasjonen husker tilstanden din bedre.

Dette kan påvirke minnebruken, så vi burde kanskje teste det litt.

TODO

  • Noe feil med stylingen på mobil. Taben bør kanskje skjules helt på mobil, ikke bare native.

@jorgkv jorgkv force-pushed the feature/RO-3199-images-tab branch from 54f53bf to f22162b Compare May 11, 2026 07:33
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-990.westeurope.azurestaticapps.net

1 similar comment
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-990.westeurope.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 implements RO-3199 by separating the observation image view into its own tab/route, aiming to improve Ionic/Angular view-state retention when navigating between observation list, detail view, and back.

Changes:

  • Added a dedicated images tab (UI + routing) and new i18n label for it.
  • Refactored observation list and image list views to each include their own split-pane header/menu layout (removing the previous wrapper page).
  • Removed the list/image “view type” selector from list controls, since navigation is now tab-based.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/assets/i18n/nb.json Adds TABS.IMAGES translation (Norwegian).
src/assets/i18n/en.json Adds TABS.IMAGES translation (English).
src/app/pages/tabs/tabs.service.ts Updates tab IDs and tab-detection logic; adds IMAGES tab.
src/app/pages/tabs/tabs.routes.ts Reworks routing to separate list vs images into distinct routes; adds redirects for legacy routes.
src/app/pages/tabs/tabs.page.ts Registers the imagesOutline icon for the new tab icon.
src/app/pages/tabs/tabs.page.html Adds the “Images” tab button and updates list tab from searchlist.
src/app/pages/observation-list/observation-list/observation-list.component.ts Adds split-pane/menu/header imports to make the list view self-contained.
src/app/pages/observation-list/observation-list/observation-list.component.html Refactors the list view into a split-pane layout with header + filter menu + add menu.
src/app/pages/observation-list/observation-list/observation-list.component.css Uses display: contents for host to avoid extra wrapper layout effects.
src/app/pages/observation-list/list.page.ts Removes the old wrapper page that hosted split-pane + router-outlet.
src/app/pages/observation-list/list-controls/list-controls.component.ts Removes router-based view switching and the pageType input.
src/app/pages/observation-list/list-controls/list-controls.component.html Removes the list/images view selector UI.
src/app/pages/observation-list/image-list/image-list.component.ts Adds split-pane/menu/header imports to make the image view self-contained.
src/app/pages/observation-list/image-list/image-list.component.html Refactors the image view into a split-pane layout with header + filter menu + add menu.
src/app/pages/observation-list/image-list/image-list.component.css Uses display: contents for host to avoid extra wrapper layout effects.
src/app/components/observation/observation-image-carousel/observation-image-carousel.component.ts Updates URL detection for “image list view” to the new /images route.

Comment on lines 36 to 43
private parseTabFromPath(path: string): TABS | null {
const cleanPath = path.includes('?') ? path.slice(0, path.indexOf('?')) : path;
if (cleanPath.indexOf(TABS.OBSERVATION_LIST) > -1) {
return TABS.OBSERVATION_LIST;
} else if (cleanPath.indexOf(TABS.IMAGES) > -1) {
return TABS.IMAGES;
} else if (cleanPath.indexOf(TABS.WARNING_LIST) > -1) {
return TABS.WARNING_LIST;
Comment on lines +2 to +4
<ion-split-pane contentId="main-content-list-page">
<ion-menu side="start" menuId="list-filter" contentId="main-content-list-page" max-edge-start="0">
@defer {
Comment on lines +2 to +4
<ion-split-pane contentId="main-content-image-list">
<ion-menu side="start" menuId="list-filter" contentId="main-content-image-list" max-edge-start="0">
@defer {

<div class="list-header">
<p>{{ "OBSERVATION_LIST.IMAGES_DESCRIPTION" | translate }}</p>
<app-list-controls pageType="images"></app-list-controls>

@gruble gruble left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dette var en enkel og elegant løsning på problemet.
Hvorfor har vi ikke tenkt på dette før?

Er enig i at bildevisning funka dårlig på små skjermer, så sikkert lurt å skjule dette på mobil.

Så ut som copiloten hadde funnet noen ting vi bør se på. Vet ikke hvor lett det er å ha felles instans av menyen, men det ser jo ut som menyene er "i synk" uansett.

Hadde vært fint med felles kode for layout for de tre fanene kart, liste og bilder, så vi ikke må kopiere splitpane og header, men jeg vet ikke hvor enkelt dette er å få til? Det er uansett ikke noe du har funnet på i denne PR, det er jo et mønster vi arver fra tidligere.

@@ -1 +1 @@
<!-- Gjør det mulig å bytte fra liste- til bildevisning + endre sortering -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Husk å oppdatere denne kommentaren, siden denne komponenten har fått mindre ansvar

@jorgkv jorgkv force-pushed the feature/RO-3199-images-tab branch from f22162b to ef5ac4b Compare May 13, 2026 10:22
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-990.westeurope.azurestaticapps.net

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.

3 participants