-
Notifications
You must be signed in to change notification settings - Fork 4
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
Check styling of package names for consistency #91
Comments
Yes, it's correct:
https://style.tidyverse.org/documentation.html In other words and from other discussions with the tidyverse team: package names are unformatted. |
Thanks @Bisaloo! Does that mean we want to drop the {package} style (with the curly braces) and rephrase to simply use the package title in a sentence - e.g. "using epiparameter you can"? Tidyverse doesn't say anything about the curly braces (and I had never seen this before the Epiverse slack) |
I'm personally in favour of using curly brackets without a monospace font. In 99% of cases the {} are redundant but in some cases it can make reference to a package unambiguous without requiring writing " the <pkg> package" everytime. Whichever style is chosen, it would be good to consistently use it across all Epiverse documentation. |
Yes, the tidyverse style doesn't add curly braces. This is a trend that started on twitter and has been used inconsistently in the R community. They have muddied the water a little bit with the downlit package though, as
Yes, I 100% agree. My initial intuition would be to use the tidyverse style but I could be convinced otherwise. The first step would probably to figure out the precise why the tidyverse team was never on board with the curly braces style. I seem to remember it is because of accessibility issues and screenreaders are confused by it. If that's indeed the case, then that's a good reason against the curly braces. If I'm remembering wrong and they don't have a specific reason, we can consider it. |
I will do a bit of digging and report back 👍 |
Some findings:
I'm running a poll on Mastodon right now; initial results indicate people prefer to write with the curly braces. Convention would suggest using curly braces, which is not accessible for screenreaders. Based on this information, I would propose sticking to tidyverse and optionally add bolding for the first mention of a package, as Hadley suggests. Does this affect your preferences? |
I'd never thought about the accessibility side of the curly braces (cheers for flagging). That seems like a very good reason to abandon their usage irrespective of poll results.
IMO - That or always bolding seems like a sensible approach. |
I'm happy to go with the tidyverse style to increase accessibility. Might be good to run the same poll on the Epiverse-TRACE slack internally to check with the teams preferences. |
Thanks all for looking into this. I think it's helpful for users of all levels if software names are distinguishable from regular text throughout a page. We'd also want to distinguish package names from function or class names. I think curly brackets work well where other formatting is unavailable as they are more obvious than backticks. I don't think the screen reader issue should hold us back from using them if they're a good option. Since our docs do have formatting available, I would recommend the P3 approach which is to italicise package names where possible. Other style guides such as Google's recommend capitalising names but that isn't an option for us. I also think that local contextual uniformity is more important than system wide uniformity. Most users will likely refer to the documentation of a single package at a time, or even only a single vignette - it doesn't really matter if different packages use different styles. |
Update on the poll I ran - it seems like curly braces does not necessarily win out after all. For the blueprints, we'll move to bolding on first use (at least). I will be making the relevant changes. EDIT: The poll results can be found in their original form on Mastodon |
A potential argument for using the As flagged above, this markup is recognized by downlit and will be formatted as plain text in pkgdown websites. |
We use the tidyverse style for package names, which does not do formatting. This issue is mentioned by @Bisaloo in #44.
I tried finding the exact rule in the tidyverse style guide before going through everything, but am unsure I found it. @Bisaloo, might you be able to point me at the original resource so I don't do double work?
The text was updated successfully, but these errors were encountered: