Skip to content
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

REFACTOR: enable use of DomainSelector functions on LocalCache state (current DeploymentEntityState) #23

Open
miroir-framework opened this issue Apr 8, 2024 · 0 comments
Assignees
Labels
refactor refactoring stuff!
Milestone

Comments

@miroir-framework
Copy link
Owner

links: #21

The DomainSelector business-related functions, that allow the execution of MQL queries, are based on DomainState object deploymentUuid-indexed of object Section-indexed of object EntityUuid-indexed.

This prevents using these functions directly on the LocalCache Slice, which uses DeploymentEntityState:

[DeploymentUuidSectionEntityUuid: string]: ZEntityState

Furthermore, DomainSelector uses createSelector from reselect, and is thus redux-dependent.

Please remove this dependency and enable the use of business-related code on the localCache redux state, as well as the store (filesystem, indexedDb) internal states.

This shall enable the implementation of the cascade-deletion of objects, that has to be implemented at the level of one consistent store: localCache or persistent-store. It indeed requires reading the store during the update, thus mixing reads and side-effects. This in turn means that executing Miroir Action Script at local-cache or persistent-store level shall be relevant.

@miroir-framework miroir-framework added the refactor refactoring stuff! label Apr 8, 2024
@miroir-framework miroir-framework added this to the Miroir 0.5.0 milestone Apr 8, 2024
@miroir-framework miroir-framework self-assigned this Apr 8, 2024
miroir-framework added a commit that referenced this issue Apr 9, 2024
…ate (current DeploymentEntityState). Moved DeploymentEntityState to miroir-core, removed used of reselect library from miroir-core (createdSelector disappeared from DomainSelector). Created getMemoizedSelectorMap in DomainStateSelector in miroir-localcache-redux
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Renamings (approach phase)
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Replace useCurrentModelOld with useCurrentModel, which selectors are based on DeploymentEntityState
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Add DeploymentEntityStateQuerySelectors in miroir core, add corresponding hook (useDeploymentEntityStateQuerySelector) in miroir-standalone-app, replace useDomainStateQuerySelector by useDeploymentEntityStateQuerySelector in Sidebar.
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Replace useDomainStateQuerySelector by useDeploymentEntityStateQuerySelector in RootReportSectionView.
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Replace useDomainStateQuerySelector by useDeploymentEntityStateQuerySelector in ReportSectionListDisplay.
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Generalize types for useDeploymentEntityStateQuerySelector, by making the StateType (DeploymentEntityState) a parameter, so that selectors that do not depend on the state type can be used on different state types.
miroir-framework added a commit that referenced this issue Apr 10, 2024
…ate (current DeploymentEntityState). Generalize types for useDeploymentEntityStateQuerySelector, by making the StateType (DeploymentEntityState) a parameter, so that selectors that do not depend on the state type can be used on different state types STEP 2, remove old type uses.
miroir-framework added a commit that referenced this issue Apr 11, 2024
…ate (current DeploymentEntityState). Move TypeState-agnostic selectors to QuerySelectors.ts, remove use of useDomainStateJzodSchemaSelector from RootReportSectionView.
miroir-framework added a commit that referenced this issue Apr 11, 2024
…ate (current DeploymentEntityState). Replace selectors in DomainStateQuerySelectors that do not directly access the DomainState by corresponding selectors in QuerySelectors.ts. Remove uses of legacy types from DomainStateQuerySelectorInterface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor refactoring stuff!
Projects
None yet
Development

No branches or pull requests

1 participant