finos / waltz

Enterprise Information Service
https://waltz.finos.org
Apache License 2.0
174 stars 128 forks source link

Add global store for common data #6999

Open davidwatkins73 opened 4 months ago

davidwatkins73 commented 4 months ago

Description

A recent issue (#6997) has highlighted that the approach to passing common data between pages and component is not consistent. This issue should remedy this by creating a set of global stores that all pages/components can include.
Candidate stores would include:

Resourcing

We intend to contribute this feature

davidwatkins73 commented 4 months ago

We already have a page-navigation-store::pageInfo store which is populated by the angular router or can be written to if a page transition is required.

image

The isNotification attribute differentiates between the notifications and the pushes.

davidwatkins73 commented 4 months ago

Would need to do this for all the view pages:


These views I don't think would be required:

davidwatkins73 commented 4 months ago

This could be a large task.

We need to think about sections/components which can be used in different contexts on the same page (or at least differ from the parent page). This would require us to have an override mechanism, perhaps something like:

import {pageRef} from "../../../svelte-stores/globals";

export let parentEntityRef;  // passed in via param
let ref = coalseceWithStores(parentEntityRef, getContext("inheritedPageRef"), pageRef)