-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Release 4.8 breaks task list styling #749
Comments
We should add some test cases. I saw similar problems, for instance: #717 |
I guess you rely on the class? I think the changes was an improvement (but also a breaking change). The question is if it's worth tot add the code again in order to attach the class Instead of handle this as a breaking change. In future docsify should bump its major version for changes like this. @jhildenbiddle what do you think? |
Hi @timaschew, The change presents a few issues:
I think it's debatable whether disabling checkboxes is an improvement or not. It makes sense given that task lists do not maintain state, but it also significantly reduces the visibility of the checkboxes (which is really an issue with the default styling on certain browsers, not docsify). My preferred solution to all of this would be as follows:
I'd be happy to make these changes, but since I received no response from #603 it's been hard to prioritize docsify contributions. Finally, the version bump. I don't think this type of change necessitates a major version bump since it isn't really "breaking" if it is the intention of the docsify maintainers to render tasks lists differently. A minor version bump with a note in the CHANGELOG seems appropriate from an end-user perspective, but it does highlight the need to keep plugin/theme developers informed. This is why I filed an issue (#552) asking for these kinds of changes to be included in the CHANGELOG.md. Unfortunately, I haven't seen this happen even though the issue has been closed, so I'm forced to periodically check to see if a new versions of docsify has been released and then review both the docsify-themeable and docsify-tabs sites to see if anything has changed. To be honest, it's a less-than-ideal developer experience that should be easy to address. |
alright I see the use case for it. I was actually expecting to achieve it much more simpler by using a selector like this: Replacing the input with a SVG sounds a bit overkill to me to be honest. Can't you style the input as well, like this custom checkbox? Anyway, I would suggest to fix the styling first and then we can discuss about the SVG in a dedicated pull request. Providing a
It seems that he is really busy. But I would say let's just try. If he has no time we (the rest) need to agree at least ;) So IMHO you can go ahead to make a PR which solves these both issues:
In the meantime I will try to setup some tests, which will run on Travis CI.
Sure API-wise it's not a breaking change. But on the visual layer it's a breaking one IMHO. I totally agree with you to put changes like this (and actually everything into the CHANGELOG.md). |
I wonder if it makes more sense to extend the markdown parser instead of adding the logic to docsify: https://marked.js.org/#/USING_PRO.md
which probably means that marked is no longer used for parsing markdown? |
Thanks for the quick reply, @timaschew. The inline
An I agree that extending the markdown parser would be the right way to implement this. I haven't noodled with the docsify source enough to know how to implement this and still maintain the end-user's ability to extend the markdown parser as well. |
This PR restores the task list presentation removed in 4.8: - Add “task-list-item” class to task list `<li>` elms - Hide list bullets on unordered task lists `<li>` elms It also provides several improvements on the pre-4.8 presentation: - Add “task-list” class to task list `<ul>` elms - Display list numbers on ordered task lists `<li>` elms - Render accessible task list items by wrapping checkbox and text in `<label>` elm - Allow task lists to be nested within standard ordered/unordered lists Please makes sure these boxes are checked before submitting your PR, thank you! * [x] Make sure you are merging your commits to `master` branch. * [x] Add some descriptions and refer relative issues for you PR. * [x] DO NOT include files inside `lib` directory.
Notice the missing "task-list-item" class on the
<li>
elements.Markdown:
Docsify 4.7.x Output:
Docsify 4.8.x Output:
Necessary code was deleted here (lines 299-310): a39b214#diff-d73f215ac772d2673dd8c51f24976e4eL299
The text was updated successfully, but these errors were encountered: