takker-workflow@0.0.1/next-action-viewer
https://gyazo.com/f42d8c846026061565afbbf4e5aef34e
バグ
mobileでボタンを押しても表示されないことがある
for-any-project#62517ee21280f000007c439eで起きてる
何なんだろう?
open()の依存配列にinitializedを入れてたせいか?
外してみた
テストは後ほどやる
外してもだめだった
フラグの状態をデバッグしてみるしかないな
実装したいこと
読み込んだタスク数から、完了したタスクと無効にしたタスクを除く
タスク数の表示が右肩上がりになってしまっていて、意味がない
takker-workflow@0.0.1/next-action-viewerの開発ログ兼作業ログ
setup()を使って設定する
controller内でPageMenuに取り付けるなど、自由に設定する
keyboard shortcutにしてもいい
例
https://scrapbox-bundler.vercel.app?url=https://scrapbox.io/api/code/takker/takker-workflow@0.0.1%252Fnext-action-viewer/main.ts&bundle&minify&run&reload
code:main.ts
import { setup } from "./mod.tsx";
const { toggle } = await setup("takker", "takker-memex");
scrapbox.PageMenu.addItem({
title: "Next actions",
onClick: toggle,
});
スタイルの設定
ここを押してminifyしたCSSをviewer.tsxで使う
code:style.css
@import "./font.css";
.modal {
position:fixed;
inset:0;
z-index:1050;
background-color:#000c;
display: flex;
flex-direction: column;
align-items: center;
row-gap: 10px;
padding: 10px;
}
.closed {
display: none;
}
.modal > * {
color: var(--page-text-color, #4a4a4a);
background-color: var(--dropdown-menu-bg, #fff);
border: 1px solid rgba(0,0,0,.2);
border-radius: 6px;
}
@media (min-width: 768px) {
.modal {
padding: 30px 0;
--item-width: 600px;
}
}
.result {
padding: 15px;
width: calc(var(--item-width, 100%) - 30px);
overflow-y: scroll;
}
進捗表示バー
code:style.css
.controller {
padding: 5px;
width: calc(var(--item-width, 100%) - 10px);
display: flex;
flex-direction: row-reverse;
gap: 0.2em;
}
.progress {
width: 100%;
}
.progress > *{
padding: 0 2px;
}
リンク
code:style.css
a {
text-decoration: none;
color: var(--page-link-color, #5e8af7);
}
a:hover {
color: var(--page-link-hover-color, #2d67f5);
}
コピーボタン
code:style.css
.copy {
font-family: "Font Awesome 5 Free";
cursor: pointer;
/* <button>のdefault styleを消す */
background: unset;
color: unset;
border: unset;
}
hooksとか
useTaskCrawler
指定されたprojectsからタスクリンク (takker-workflow@0.0.1)を収集するhooks
takker-workflow@0.0.1/listで収集してtakker-workflow@0.0.1/classifyで分類分けまでしておく
元の実装ではasync-libを使っていたが、仕組みを見る限り不要だったので外した
CSS
ほとんどscrapboxのCSSと同じ
code:font.css
/* derived from Font Awesome 5 */
.fa {
font-weight: 900;
font-family: "Font Awesome 5 Free";
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
}
.fa-spinner {
animation: spin 2s infinite linear;
}
@keyframes spin {
from {
transform:rotate(0deg)
}
to {
transform:rotate(359deg)
}
}
.fa-spinner::before {
content: "\f110";
}
.kamon::before {
font-family: "AppIcons";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-style: normal;
font-variant: normal;
font-weight: normal;
text-decoration: none;
text-transform: none;
}
.kamon-check-circle::before {
content: "\E018";
}
code:mod.tsx
export * from "../takker99%2Ftakker-scheduler/viewer.tsx";
#2023-08-17 14:15:19
#2022-10-21 06:26:43
#2022-09-12 04:35:11
#2022-09-06 13:20:15
#2022-08-29 02:18:35
#2022-07-19 14:58:51
#2022-07-09 18:51:00
#2022-07-08 05:21:37
#2022-06-05 06:41:44
#2022-06-01 09:56:46
#2022-05-16 14:56:44
#2022-05-12 05:17:00
#2022-04-12 22:36:53
#2022-04-09 22:25:38
#2022-04-08 23:09:00