-
Notifications
You must be signed in to change notification settings - Fork 63
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
final design decisions before v1.0 #43
Comments
Due to many complicated bits, like the player and detail page, we're most likely elm-ing it.
Example API: // TODO all those will have to take a type arg for Env....
#[derive(StremioModel)]
pub struct StremioModel {
pub discover: CatalogFiltered,
pub board: CatalogGrouped,
pub player: Player<PlayerImpl>
}
let mut stremio = StremioModel::new();
let ctx = Ctx::new();
stremio.update(&ctx); // will return a Vec of futures that have to be handled
// or more sophisticated
// TODO: figure out a better name for this
let (tx, rx) = App::with_managed_context::<Env>();
// send actions to tx
//rx.for_each() // do something with the new &model NOTE: the models might have to take |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in light of using this in stremio-web, stremio-example-seed, stremio-example-sauron, stremio-example-ui and stremio-ng-example,
there are a few more design decisions to make before finalizing:
CatalogMuxer
, implement a#[derive]
macro that will allow the user to fill a struct with fields that implementContainer
; that is much more ergonomic; however, this struct should not have interior mutability, and mutability will need to be handled by the user (implementation-specific) - DOING ITupdate
function - GOING FOR ELM STYLEupdate
problem: many things are dependent on the user ctx, so we will have to somehow retrieve it before determining what tasks to issue; if we do a promise of the stylewith_ctx
, then it's kinda ugly (adding async logic toupdate
)update(&mut Model, &Ctx) -> Effects
RecommendedXXX
(as a result toOpen
) to load should lead to a page that will trigger this Loadaddon_aggr_req
; and in general, a mechanisms for Containers to define thier own Load parameters and effects; could be a trait associated type that we use in Actions - not neededfn effects(ctx: Ctx) -> Vec<EnvFuture<Action>>
- not neededupdate
function mutate the struct or return a new struct? - mutateStandardStremio
- a struct with all containers a usual stremio app has - not needed, derive macro handles this great/detail/movie/tt213
to/detail/movie/tt213/tt213
), but for now there's no point of doing this cause (1) the reducer will keep the old response and (2) the browser has a cache - not a problem with elm architectureAddonRequest
/AddonResponse
) - not a problem with elm architectureMetaItem
,MetaPreview
andLibItem
? - a common trait between LibItem/MetaPreview/MetaItem #53LibItemPreview
? - noupdate
function should focus on how they mutate, and do as little processing as possible; they will do sorting and filtering (e.g. Search) thoughEnvironment
trait?see also: #28
The text was updated successfully, but these errors were encountered: