webxdc/checklist
15
2
Fork
You've already forked checklist
3

Allow exporting / Importing checklist items #3

Closed
opened 2023年07月20日 11:10:36 +02:00 by hpk · 10 comments
Owner
Copy link

I find myself preparing checklists and then want to share them in a group chat after some preparation time. For this, it would be great to have export/import functionality to ease this process. I guess a simple "checklist.txt" file with one line per checklist-item and maybe a "[ ]" at the beginning, a bit like markdown would be enough -- but i'd be fine with just the checklist items without their "done" state being exported/imported. The latter is easy enough to click.

I find myself preparing checklists and then want to share them in a group chat after some preparation time. For this, it would be great to have export/import functionality to ease this process. I guess a simple "checklist.txt" file with one line per checklist-item and maybe a "[ ]" at the beginning, a bit like markdown would be enough -- but i'd be fine with just the checklist items without their "done" state being exported/imported. The latter is easy enough to click.
Owner
Copy link

i suggest to target/rethink that once #4, #5, #6 are done

i suggest to target/rethink that once #4, #5, #6 are done

this would be nice, just copy to clipboard and import from clipboard would be good enough already

this would be nice, just copy to clipboard and import from clipboard would be good enough already
Owner
Copy link

talking with @hpk, now, that we have an import, an explict "import" would be nice as well :)

(can be a simple button as for "export", once we have the kebab menu from #28, it will be integrated there - or, maybe #28 is there before :)

talking with @hpk, now, that we have an import, an explict "import" would be nice as well :) (can be a simple button as for "export", once we have the kebab menu from #28, it will be integrated there - or, maybe #28 is there before :)

How about "edit/copy as text" instead? I think "import from file" is too clunky for such a simple thing. This allows copy-pasting someone's message and converting it into a checklist.

How about "edit/copy as text" instead? I think "import from file" is too clunky for such a simple thing. This allows copy-pasting someone's message and converting it into a checklist.
Owner
Copy link

How about "edit/copy as text" instead?

you mean "paste from clipboard?"

why not have both? i think, the hard part is parsing the content and create the checkboxes.

an explicit "import from file" is nice as it demonstrates again the usage of the new api - and there is also and "export to file", so that makes sense, esp. if it is a cheap function if "paste" is already implemented.

but it is fine to start with "paste"

> How about "edit/copy as text" instead? you mean "paste from clipboard?" why not have both? i think, the hard part is parsing the content and create the checkboxes. an explicit "import from file" is nice as it demonstrates again the usage of the new api - and there is also and "export to file", so that makes sense, esp. if it is a cheap function if "paste" is already implemented. but it is fine to start with "paste"

you mean "paste from clipboard?"

I mean "edit as text", kind of like WYSIWYG vs Markdown modes. Hmmm, however I just realized that this is problematic because of conflicts. So I guess adding (and not editing) items as text would make sense initially.

Ok, how about this. We make the current text field such that you can paste text with newlines there, and if this is what happened, we parse it as several lines.
Then, if we want to also showcase the "import" thing, we paste the contents of the file to the textarea as well, such that it can be edited prior to the sumbission.

> you mean "paste from clipboard?" I mean "edit as text", kind of like WYSIWYG vs Markdown modes. Hmmm, however I just realized that this is problematic because of conflicts. So I guess adding (and not editing) items as text would make sense initially. Ok, how about this. We make the current text field such that you can paste text with newlines there, and if this is what happened, we parse it as several lines. Then, if we want to also showcase the "import" thing, we paste the contents of the file to the textarea as well, such that it can be edited prior to the sumbission.
Owner
Copy link

we make the current text field such that you can paste text with newlines there, and if this is what happened, we parse it as several lines.
Then, if we want to also showcase the "import" thing, we paste the contents of the file to the textarea as well, such that it can be edited prior to the sumbission.

hm, that looks a bit like a hack. also, it would not allow importing just exported text and it would not allow to prepare a text with some items checked (or, eg. allow copying them from github)

i would prefer a "proper" import function that takes a text where (roughly):

  • each non-empty line becomes a checklist item
  • initial - and [ ] and [X] are remove from checklist item texts
  • [X] will be used to mark an item as being checked

this would be the format that we export as well as the format used widely for markdown.

the import would not remove existing items but the items would just be appended (but maybe we can have a "clear" in the menu of #28)

to use this import, we can offer "paste from clipboard" as well as "import from file"

> we make the current text field such that you can paste text with newlines there, and if this is what happened, we parse it as several lines. > Then, if we want to also showcase the "import" thing, we paste the contents of the file to the textarea as well, such that it can be edited prior to the sumbission. hm, that looks a bit like a hack. also, it would not allow importing just exported text and it would not allow to prepare a text with some items checked (or, eg. allow copying them from github) i would prefer a "proper" import function that takes a text where (roughly): - each non-empty line becomes a checklist item - initial `-` and `[ ]` and `[X]` are remove from checklist item texts - `[X]` will be used to mark an item as being checked this would be the format that we export as well as the format used widely for markdown. the import would not remove existing items but the items would just be appended (but maybe we can have a "clear" in the menu of #28) to use this import, we can offer "paste from clipboard" as well as "import from file"

hm, that looks a bit like a hack. also, it would not allow importing just exported text and it would not allow to prepare a text with some items checked (or, eg. allow copying them from github)

No, it's not what I meant, I said you can edit the text the way you like. When you click "submit", several items will be created (given that there are several lines in the text field).

> hm, that looks a bit like a hack. also, it would not allow importing just exported text and it would not allow to prepare a text with some items checked (or, eg. allow copying them from github) No, it's not what I meant, I said you can edit the text the way you like. When you click "submit", several items will be created (given that there are several lines in the text field).
Owner
Copy link

i understood that part. but how can you then import a just exported checklist, that includes [ ] and [X]? would that be recognised while editing an item? this is what i meant with feeling hacky and not so easy to discover - editing a single item and then adding several lines startging with - [ ] and - [X] - in an single-line input field.

we can ignore prechecking on import, however, it would still need some parsing.

also, user would just expect ENTER to finish editing (or to add an item), see recent request in M3 chat (issue will probably follow)

assuming that parsing will be just the same - what is wrong with the suggestion from above? via "paste from clipboard" or via "import from file"? that seems to be the easiest part of all.

we can still additionally allow pasting multiple lines to the "add field", but i would not see that as a replacement, as hard to discover and being async to "export"

i understood that part. but how can you then import a just exported checklist, that includes `[ ]` and `[X]`? would that be recognised while editing an item? this is what i meant with feeling hacky and not so easy to discover - editing a single item and then adding several lines startging with `- [ ]` and `- [X]` - in an single-line input field. we can ignore prechecking on import, however, it would still need some parsing. also, user would just expect ENTER to finish editing (or to add an item), see recent request in M3 chat (issue will probably follow) assuming that parsing will be just the same - what is wrong with the suggestion from above? via "paste from clipboard" or via "import from file"? that seems to be the easiest part of all. we can still additionally allow pasting multiple lines to the "add field", but i would not see that as a replacement, as hard to discover and being async to "export"
Owner
Copy link

to move forward on that:

maybe start with the parser as described above, that is needed anyways. and a function to add the parsed items to the existing items

to move forward on that: maybe start with the parser as described above, that is needed anyways. and a function to add the parsed items to the existing items
Sign in to join this conversation.
No Branch/Tag specified
master
all-updates
fix-init-override
adb/issue-8
update-webxdc-js
tweak-layout
add-menu
fix-title-linebreaks
positive-icon
update-icon
adb/use-vite
pages
v0.0.3
v0.0.4
v0.0.2
0.0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webxdc/checklist#3
Reference in a new issue
webxdc/checklist
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?