-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add print.enableCheckBoxes config option #962
base: master
Are you sure you want to change the base?
Conversation
This option enables the checkboxes in the outputted HTML, useful for making to-do lists
Auto-update on TOC removed the KBD tags from the title for some reason
Many thanks 👍. Looks good to me. cc @Lemmingh |
Overall, neat. Well, I believe it would be best to always keep the preview and exporting consistent, so linked #774 above. Then, 2 concerns come:
|
Thanks.
I thought it was okay to disable the checkboxes as we really cannot check a to-do item within the preview pane (it won't change the source file). Now I was wondering whether we should enable it by default. I don't think there are many use cases that require the checkboxes to be disabled. And then we don't have to introduce this option at all. |
You mean #925? Right. We cannot as long as the preview is provided by VS Code.
I prefer to keep checkboxes disabled by default. The output of a Markdown document is usually considered static. Few people expect it to be interactive. Interestingly, those who would like an interactive output usually heavily take advantage of raw HTML and client-side script, and they can of course control the I now don't feel the story (useful for making to-do lists) convincing. |
Agree. It can be kind of confusing to see an enabled checkbox which is in fact not working as one may expect. @niekschoemaker Could you tell us more details about your use case? |
I'm using it to stay organized when doing certain tasks. |
Thanks. I also use checklists from time to time. However, I always make changes to the Markdown source file, as it can be saved for later. Just FYI, the keybinding Alt+C can be used to check/uncheck task list item(s). As for this PR, let's also apply this option here vscode-markdown/src/extension.ts Line 39 in f560819
Then I think we can use the name |
I was thinking of a schema like: /**
* GitHub Flavored Markdown task list.
* @see {@link https://github.github.com/gfm/#task-list-items-extension-}
*/
interface taskList {
/**
* Enable GFM task list.
* @defaultValue `true`
*/
enabled: boolean;
/**
* Control the editing experience.
*/
editing: {
/**
* Allow the `markdown.extension.checkTaskList` command to turn a normal list item to a task list item.
* @defaultValue `false`
*/
aggressiveToggle: boolean;
};
/**
* Control the rendering.
*/
output: {
/**
* Render as clickable checkbox elements.
* @defaultValue `false`
*/
clickable: boolean;
};
} |
Well, I'm not a fan of |
We ought to reserve sufficient extensibility, even if we decide never to do something. Our product can focus on a small field, but our architecture cannot.
Thus, it's necessary to build a friendly schema that allows modifying things with minimal effort. Looks like we pay different attention to user experience. In #897 (comment), for instance, I asked about
I didn't mean to implement those in our code, but as stated above, we really need to take them into consideration when designing. And I don't agree with your idea. Coupling with
|
I see the difference. You care more about developers' experience (i.e. the design) 😂, while I mainly follow my preference (of features), user voice, and then others.
I was just thinking it would lift our burden if these basic features are implemented by the VS Code team (which is full-time). Then we don't have to spend our time repeating it. That is the original motivation. I wasn't that ambitious (as it may not be worth it, IMO). But at least I shouldn't refuse a suggestion that makes this work better. Back to this PR, what do we do with the |
If we can produce a reusable pattern here, we'll have a nice template when designing new parts of the configuration and refreshing existing hard-to-discover parts. The draft schema above demonstrates a hierarchy:
Notes:
|
whst happened here? |
Fix #774
This option enables the checkboxes in the outputted HTML, useful for making to-do lists