Implement PoC (proof of concept) of the State Management that increase performance

Aperta
#231 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@korel-san ci sta già lavorando.

Dal 14/2/2023.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Inizia analizzando elf, effector e ng-state in base ai criteri indicati di leggerezza, semplicità, routing-subscription e session storage. Poi esamina il parsing esistente di routing-state e l’utilizzo di StringHelpers.encodeObjToUrlString prima di creare src/state/actual-route-state.repository.ts. Il lavoro è completato quando un actual route state unificato è disponibile tramite un repository esclusivamente locale e non esiste alcuna istanza in production.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Tech debt

The main goal of the task: create State Service that contains the parsed actual route state.

More details:
The routing state depends on the page and functionality of the page. Now many components trying to parse it, which increased code duplication and worked not properly in some cases. So, for the unification of the actual routing state, we consider separating functionality in service, which would handle the actual route state, and every component would be asked from its real data for their purposes.
We don't want to use current state management ngrx due to the high level of tied dependency of the current implementation, so not to add extra naming and have a more lightweight solution, we want to use another tool for this PoC will allow us to not affect the current performance.

Actual implementation plan:

  1. investigate 2-3 state management packages: elf, effector, ng-state
    Points on which we need to focus
  • it should be lightweight
  • it should be pretty simple
  • package should allow to manipulate of routing (subscription, session storage)
  1. create a state folder in the src and add there actual-route-state.repository.ts. In this file, we need to create a repository that would manage the routing state. Please, take into account, that this state management should work only for the local environment. On prod env, this instance should not exist.
  2. In some cases probably you will need to create Adapters that would convert the current routing state to a meaningful one. For example for pages where we have protected query parameters via the encoding of StringHelpers.encodeObjToUrlString. So after this implementation, every developer should be allowed to see the state of this service on every page of the project.
Lingua principale
TypeScript
Stelle
12
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AbsaOSS/spline-ui

Tutte le issue di AbsaOSS/spline-ui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.