bolero: use Elmish View Component for YouTube thumbs
BryanWilhite opened this issue Β· comments
attempt to translate @songhay/player-video-you-tube
[ GitHub ] into an Elmish View Component for Bolero [ π docs ]
this issue has taken priority over #79
- translate selected models from Angular library models
- add
Songhay.Player.YouTube.Tests
project to add integration tests for YouTube data - translate
you-tube-channel-set-data.store.spec.ts
- translate
you-tube-channel-data.store.spec.ts
- add
- translate
you-tube-thumbs
toElmishComponent<>
- translate
you-tube-thumbs-set
toElmishComponent<>
- add
div
to containYtSet
, showing and hiding with CSS animation - add
YtSet
Bulma header and Bulma dropdown with Elmish eventing/commanding
- add
The higher-order function RemoteHandlerUtility.toHandlerOutputAsync
is my new general-purpose error-handling strategy for Result<HttpResponseMessage,exn>
where HttpResponseMessage
is expected to contain JSON which will be converted into domain data by the domain-specific dataGetter
passed as a parameter.
added songhay
JavaScript [ GitHub] helpers:
the following CodePen will be used to develop interactivity: https://codepen.io/rasx/pen/mdpdqwW
Bolero: IJSRuntime.InvokeAsync<HtmlRef>
is probably an anti-pattern
Returning HtmlRef
for the sake of JavaScript interop is probably never useful which means the following is likely not useful:
let getChildHtmlElementByQueryAsync (htmlRef: HtmlRef) (query: string) (jsRuntime: IJSRuntime) =
let elementRef = htmlRef |> tryGetElementReference |> Result.valueOr raise
jsRuntime.InvokeAsync<HtmlRef>($"{rx}.{DomUtility}.getChildHtmlElementByQuery", elementRef, query).AsTask()
let getChildHtmlElementsByQueryAsync (htmlRef: HtmlRef) (query: string) (jsRuntime: IJSRuntime) =
let elementRef = htmlRef |> tryGetElementReference |> Result.valueOr raise
jsRuntime.InvokeAsync<HtmlRef>($"{rx}.{DomUtility}.getChildHtmlElementsByQuery", elementRef, query).AsTask()
let getClosestHtmlElementByQueryAsync (htmlRef: HtmlRef) (query: string) (jsRuntime: IJSRuntime) =
let elementRef = htmlRef |> tryGetElementReference |> Result.valueOr raise
jsRuntime.InvokeAsync<HtmlRef>($"{rx}.{DomUtility}.getClosestHtmlElementByQuery", elementRef, query).AsTask()
let getElementByQueryAsync (query: string) (jsRuntime: IJSRuntime) =
jsRuntime.InvokeAsync<HtmlRef>("document.querySelector", query).AsTask()
I thought I needed functions like these because I erroneously thought only one HtmlRef
was recognized per component.
final moves for this ridiculously-lengthy issue:
- move overlay y-scroll to
.set
block - change overlay hide/show animation based on observations of how Android apps open on my Lenovo tablet
- move CSS animation jump-starter dictionary (state bag) to the component to pass this bag up into the module functions
this last item on the list is there for reasons that deserve more explanation but no time for that now β