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

prepare for storification #5

Open
dskvr opened this issue Apr 12, 2024 · 0 comments
Open

prepare for storification #5

dskvr opened this issue Apr 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dskvr
Copy link
Contributor

dskvr commented Apr 12, 2024

rationale

  • svelte patterns
  • performance
  • maintenance
  • lower bar for contribution

why not do this from the start
I like strong separation of concerns during alpha, and specifically when the alpha is a proof of concept. This particular alpha was proving specific concepts that that nothing to do with UI/UX or svelte. Removing svelte from the equation significantly reduced lead time for (in)validation. Now that the concept is validated, beta is on the roadmap, which means this is necessary. I kept this particular issue in mind during development, so this issue should take 1, maybe 2 days to complete.

new stores

  • ControlFlowStore
  • ConfigStore: stores site config

migrated stores/contexts

  • $MRP.$.ndk - :context Ndk
  • $MRP.$.signal -> :context Signal ... Signal (emitter) will remain for control-flow concerns and editor reactivity, everything else will rely on svelte state management as it should.
  • $MRP.nostr.relay -> RelayStore
  • $MRP.nostr.owner -> OperatorStore
  • $MRP.nostr.owner.feed && MRPFeed instances -> FeedStore
  • NoteStore
  • $MRP.nostr.user -> CurrentUserStore
  • $MRP.nostr.user.profile &* $MRP.nostr.owner.profile && $MRP.nostr.user.follows[*].profile -> ProfileStore

component level

  • MRPFeed: class store moved to component level writable (no context keys), class becomes utility that extends fetchers for filter generation, filter/event validation and sanitization.
  • MRPUser: ^^^

remains core class for utility

  • MRPFeed: fetchers remain
  • MRPUser: fetchers remain
  • MRPData: extendable class that wraps emitter for stage/status tracking (unchanged)

new generics

  • MRPFetchers: extendable fetcher generic.

removed classes

  • MRPEditor: data

controlflow

  • MRP, MRP.nostr and MRP.nostr.relay control flow logic coalesced into singleton and persisted in ControlFlow store.
@dskvr dskvr added the enhancement New feature or request label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant