kachick / times_kachick

`#times_kachick channel in chat` as a public repository. Personal Note and TODOs
https://github.com/kachick/times_kachick/issues?q=is%3Aissue+is%3Aclosed
6 stars 0 forks source link

2023-01-12 - TypeScript & React から Elm への移行時、HTML5 の Drag and Drop API で引っかかった #203

Closed kachick closed 5 months ago

kachick commented 1 year ago

Extracted from https://github.com/kachick/times_kachick/issues/53

https://github.com/mobu-of-the-world/mobu に色々書いた機能を Elm へ移行させていたら、割とすんなり出来て気持ちが良かった。 localStorage、notification、sound 再生辺りは port を使わざるを得なかったんだけど、まぁ出来たし TypeScript のコード比率を大分減らせたので特に苦にならなかった。

一点詰まってるのが Drag and Drop 機能。https://github.com/mobu-of-the-world/emobu/pull/216 で無理やり実装はしたけれど、この方法だとモバイルで機能しない。大体 Elm でスクラッチからDrag and Drop 作りました〜みたいな記事見に行っても同じ感じのようで、解消するには on でイベントハンドラ作るとか port だけでどうこうなる話じゃなさそうで保留してる。 https://github.com/mobu-of-the-world/emobu/pull/217

カスタムエレメンツとportだけでこの辺解消できるのかがよくわかってないんだよなー。たまにとはいえレールから外れたときにすごい苦労するとなるとうーむなんだけど、そもそも知識・経験不足なだけなのかもだからまだなんとも。

kachick commented 1 year ago

子(ChatGPT)曰く

cg0 cg1 cg2

急に饒舌になるやん と思ったら https://github.com/elm-community/elm-drag-drop 等無かった・・・

kachick commented 5 months ago

最近触れてないし進捗もない