-
Notifications
You must be signed in to change notification settings - Fork 17
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] Reference all function calls with ()
#218
Comments
I think this is a great idea—similar to the use to |
@samuelsycamore Should we add this to the style guide like https://www.notion.so/mui-org/Writing-style-guide-2a957a4168a54d47b14bae026d06a24b#25c93204591e4d3da592abea674515fa? Off topic
Historicaly, I think we were less on
So I guess to standardize on a single approach? If one is better, it's likely better regardless of the library. cc @vladmoroz in case Base UI has specific views on this. |
As I recall, the original motivation for introducing Still, there are times when we need to refer specifically to the React component, and that's when we use
You could make a case for just using backticks in both of these scenarios, but then I think it becomes less obvious for the engineers writing the docs to recognize when to use plain text vs backticks. The impulse is to wrap all references to component names in backticks, which we want to avoid. Component case makes it as obvious as possible to both the writer and the reader that you're referring to the React component specifically. (Consider: If you read " On a related note, I've also tried to standardize HTML tags as |
I would love to see the styles in this doc standardized with the same rules we (try to) enforce on the rest of the product docs. To adhere to our rules, |
@samuelsycamore @oliviertassinari I am redesigning and rewriting all component docs as we speak, so feel free to ignore any emergent patterns in the current Base UI docs, I'll be going over that all anyway. I agree with defaulting to proper nouns. At my previous gig, I went through tons content where every single thing that had a corresponding code concept was backticked, and it was impossible to make sense of a sentence like that. Glad we are on the same page here! In the case of Base UI, most components are compound, so we'd use proper names to refer to components anyway. For example, casing and formatting in a sentence like this would make sense to me:
Not so sure about the parts and the exact convention to use to refer to React components when needed. A sane amount of formatting makes a document much more readable, and no formatting is similar to too much formatting in the sense that the document can become incomprehensible. Check this out, a mock I created for comparison of the styles, using the upcoming design: My personal preference would be (3) (1) feels too dense; there's nothing for my eye to anchor on within the paragraph to scan it quickly. Also, MDN consistently use
Handy link to MDN: |
Cool, yeah it sounds like we're pretty much on the same page. (And I'm really glad to have someone else on the team to hash this out with in detail!) Ultimately I'd be happy with 3 or 4 out of the examples here, but if we go with 3 then we'll need to comb through the other product docs to apply it consistently without the self-closing slash. FWIW, I got into the habit of |
For the main topic of this issue https://www.notion.so/mui-org/Writing-style-guide-2a957a4168a54d47b14bae026d06a24b?pvs=4#128cbfe7b66080e4ad1fe0c0f359aa9e updated as it seems we will move forward with this. @samuelsycamore thanks for the extra context. Overall, it seems that we could move forward like this? It seems pragmatic and easy to remember, how does it feel?:
Why? We format it like in the code. It's also not as heavy as
It would be great to have space for Sam to leave early reviews, syncing on the content style to minimize potential rework in the case where either Sam put light on a pattern opportunity improvements in Base UI or the other way around (a need to fix the MUI style guide). |
@oliviertassinari these rules sound good to me 👍
Sure, agreed |
Steps to reproduce
On https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault, all function references have
()
, this seems to be clearer when reading the docs.For example:
https://deploy-preview-44139--material-ui.netlify.app/material-ui/customization/dark-mode/#styling-in-dark-mode
vs. it could be:
what if we were to do this change?
Search keywords:
The text was updated successfully, but these errors were encountered: