Skip to content
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

Use single-line syntax for private types comments #8420

Merged
merged 2 commits into from May 25, 2022
Merged

Use single-line syntax for private types comments #8420

merged 2 commits into from May 25, 2022

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented May 23, 2022

This prevents the comments from appearing in a user's editor.

Before

CleanShot 2022-05-23 at 20 38 44@2x

After

CleanShot 2022-05-23 at 20 43 15@2x

This prevents the comments from appearing in editors
@bradlc bradlc requested a review from RobinMalfait May 23, 2022
Copy link
Contributor

@RobinMalfait RobinMalfait left a comment

Looks good to me, just 2 questions

// Use the `media` query strategy.
| 'media'
/** Use the `class` stategy, which requires a `.dark` class on the `html`. */
// Use the `class` stategy, which requires a `.dark` class on the `html`.
| 'class'
/** Use the `class` stategy with a custom class instead of `.dark`. */
// Use the `class` stategy with a custom class instead of `.dark`.
Copy link
Contributor

@RobinMalfait RobinMalfait May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that for these it could still be useful to know what each type means. But maybe they don't show up at all 🤔

@@ -242,15 +242,15 @@ type ValueType =
| 'relative-size'
| 'shadow'
export interface PluginAPI {
/** for registering new static utility styles */
// for registering new static utility styles
Copy link
Contributor

@RobinMalfait RobinMalfait May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could also be useful to the user, or do you reckon that this is a bit redundant because the name addUtilities itself is self explanatory enough?

Copy link
Contributor Author

@bradlc bradlc May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we could write some documentation comments that are useful to users, but it seems like the comments in this file right now have not been written for that purpose, and it was not the intention for these to be visible to users. Consider comments like Utilities or Responsiveness for example. I propose that we hide everything for now and consider adding proper documentation comments in the future.

Copy link
Contributor

@RobinMalfait RobinMalfait May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep sounds good, let's merge it 💪

@bradlc bradlc merged commit 22f9dc8 into master May 25, 2022
11 checks passed
@bradlc bradlc deleted the types-comments branch May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants