-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
docs: make clear that type selectors are just examples #15
Conversation
@@ -231,7 +231,7 @@ Yields: | |||
``` | |||
|
|||
## Support | |||
|
|||
Note: `blockquote`, `paragraph` are just examples of type selectors, not the only types it can selects. See [this full list of node types](https://github.com/syntax-tree/mdast?tab=readme-ov-file#contents) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ooker777! 👋
There are some broader question that should probably be discussed before updating the docs.
- How familiar are you with CSS? Are more links to general CSS docs needed?
- How familiar are you with the different unified syntax trees? (https://unifiedjs.com/learn/) This project works across all of them, not just one.
There is probably room to improve the documentation, it would be good in a way that is general enough to represent a variety of use cases, not one very specific use case.
A few thoughts on the example here.
- This package implements CSS selectors, CSS is an entire language, it feels off trying to explain what selectors are here.
unist-util-select
works on anyunist
compatible tree, includingmdast
,hast
,nlcst
dotast
,xast
,ntast
, and more. It feels off referencing only one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Just for my background, I have made 2 small scale webapp with Deno Fresh. In CSS I have experience in Tailwind and have implement an UI component lib. But I don't have much experience working on vanilla CSS
- I am new with the syntax trees, and while I have read the docs and get some basic concepts, I don't think I have had a good mental model on how the whole project works
More are provided in the comment below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think this is needed. This project defers to CSS. If you want to use CSS, you can use this.
This is a table of which CSS things work here too.
It contains examples, and then the names.
The latter name is enough to know that the former is an example
The change, to focus soleley on mdast, is also not good; we do not only support mdast here.
Thanks. I am new to this project, and didn't expect that my PR get the attention of two members. I think I had wasted your time, so sorry about that. You can choose to close this. I just think that someone may need an extra explanation that you can use any node type on that. Because I think it's not actual CSS, so there is a chance that individual type has to be supported. So if it's not in the list it's likely to not be supported yet |
Don’t worry about getting attention from us! ;) I don’t really see it. The next lines talk about combinators. Showing And, the words The list here is not to be taken literally. And also not just all possible examples. It’s pseudo-code in-between. Which I believe is right. A correct mix between knowledge levels. There will always be people who don’t understand a sentence, for one reason or another. We can’t explain every term. Or: we could, but then the resources get too verbose for folks that have more knowledge. Thank you, for sharing what’s complex for you. Even if this doesn’t land now, it helps us understand what people struggle with! |
Initial checklist
Description of changes
See https://github.com/orgs/syntax-tree/discussions/131