Allow paragraph.type to be extended (beyond checklists)
@EduardMe đang làm issue này rồi.
Từ ngày 7/11/2022.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Following a conversation in Discord, the salient points of which I'll repeat here.
DW: We need to find a better way for checklists.
JGC: I'll repeat my suggestion to @Eduard that if he would happy to make the paragraph.type field accept other types, then we could do some experimentation in plugin land on checklists, and then see what seems to work well. Unless, of course, you have ideas sooner or later to try out in the Labs?
JGC: [we need] Developer-extensible types. I.e. you deal with the ones you know and treat any others just as text. The developer can then experiment with others. So it really only means you won't reject any other types that might get set. I've no idea what might come of it, but it opens the door for some wider experimentation, particularly if they could get picked up in themes as well.
EM: I know we discussed this one, something like * [waiting] Task?
JGC: For example, allow more than 9 paragraph types that the API specifies. I can then try setting some
paragraph.types as 'checklist' or something, and the API will return that new type, so I can then do things with it. Or, as you say, like a 'waiting' type. With the HTMLView we have complete flexibility about what we could do with those, which again might make for quicker prototyping of ideas.
DW: I haven't thought a lot about this, but I like the idea of exensible types. Would allow for real "plug-in" functionality. Maybe down the road, we could have a JS template for all the commands that a type should respond to and let JS deal with it. So I could add a type "checklist", and when someone checks it, it sends onChecked or onUnchecked or whatever. In the mid-term, as @jgclark suggests, maybe you simply allow a paragraph to be any 'string' type. In the immediate-term, the idea of checklists comes up a lot, and I was thinking that having "checklist" types (e.g. "checked","unchecked") that behaves exactly like a task except doesn't get a @done and doesn't count as open tasks in the interface etc. would go a long way.
EM: I know what you mean with this use case, I sometimes create bullets and prepend a ✅ before the text. In fact, a checklist, which I don’t want to count towards open tasks. Maybe we should introduce this one as an official type. Like instead of a round box, have a square one and a little smaller or so?
EM: The only thing I’m missing is how should the custom types look like in the text? Its more challenging to introduce icons or something in the swift editor. It’s a different case though if we use the HTML as the preview and render things there
JGC: I suggest that you don't do anything about display -- yet -- but treat as 'text'. This is for us to prototype, particularly now we have the early stage of HTML views.
EM: Ok, thinking this further, types are at the moment detected by checking the markdown. For custom types to work we would have to add somehow a way to detect them. Means we need to define a pattern somewhere?
- Ngôn ngữ chính
- JavaScript
- Star
- 204
- Fork
- 82
- Merge trung bình
- 22 giờ 27 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NotePlan/plugins
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Dashboard: Task "Comment" Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Tidy: Issue with plugin.json Đang mởbug
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
Tất cả issue của NotePlan/plugins
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
babalae/bettergi-scripts-list#3674 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
githubnext/gh-aw-cao#13143 ·