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

Corrected documentation to be more gramatically correct #35141

Closed
wants to merge 1 commit into from
Closed

Corrected documentation to be more gramatically correct #35141

wants to merge 1 commit into from

Conversation

willsawyerrrr
Copy link
Contributor

@willsawyerrrr willsawyerrrr commented Oct 31, 2022

Summary

The documentation for useColorScheme() suggested that the user's preferred color scheme will be 'Dark Mode'. Instead suggesting 'Dark Mode' as an example of what the user's preferred color scheme could be is more correct.

Changelog

[INTERNAL] [FIXED] - Edited documentation for useColorScheme() hook
Edited

/**
 * A new useColorScheme hook is provided as the preferred way of accessing
 * the user's preferred color scheme (aka Dark Mode).
 */
export function useColorScheme(): ColorSchemeName;

to

/**
 * A new useColorScheme hook is provided as the preferred way of accessing
 * the user's preferred color scheme (e.g. Dark Mode).
 */
export function useColorScheme(): ColorSchemeName;

Test Plan

Documentation only - no testing required.

@willsawyerrrr willsawyerrrr deleted the ws/correct-documentation branch October 31, 2022 04:35
@willsawyerrrr willsawyerrrr restored the ws/correct-documentation branch October 31, 2022 04:35
@willsawyerrrr willsawyerrrr reopened this Oct 31, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,736,137 +732,787
android hermes armeabi-v7a 7,140,252 +760,557
android hermes x86 8,045,348 +629,162
android hermes x86_64 8,015,701 +735,608
android jsc arm64-v8a 9,596,918 +728,572
android jsc armeabi-v7a 8,363,229 +756,577
android jsc x86 9,541,151 +614,919
android jsc x86_64 10,133,547 +724,074

Base commit: 87c356d
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 87c356d
Branch: main

@react-native-bot react-native-bot added the No CLA Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2022
@react-native-bot react-native-bot removed the No CLA Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2022
@facebook-github-bot
Copy link
Contributor

@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi
Copy link
Contributor

/rebase

@facebook-github-bot
Copy link
Contributor

@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @willsawyerrrr in 74cb441.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 2, 2022
@Pranav-yadav
Copy link
Contributor

Hey @cipolleschi @rshest !
Was going through recent PRs.. If I'm correct this PR wasted 1h 38m 43s + 4m 57s of compute time and resources just for testing a DOC/Non Code change.
Which is completely/partly useless1 as, 1.5h are wasted on testing builds, etc.

I would suggest following things in order to stop the wastage of compute resources for NON CODE/DOC changes:

  • Create new label or a command (for fb-github-bot) which in turn triggers the DOC related tests.

    • like only trigger Spell-check and Formatting or Styles related tests.
    • Labels/Commands E.g. doc-change or /no-code or skip-ci
  • Encourage collaborators as well as contributors to use following tags/strings in their commit messages to Skip CI or tests from triggering auto.;

    • [skip ci]
    • [ci skip]
    • [no ci]
    • [skip actions]
    • [actions skip]
  • Obviously we can enforce Spell-Check and(or) Formatting tests irrespective of the Code/Non Code changes :)

  • 🤗🌏 #SaveEarth

Cc: @sammy-SC @hramos

PS: Sorry for tagging all of you, just wanted to make sure this is not ignored
@willsawyerrrr sorry to ping you, but you can also use this in your upcoming PRs not only in this repo but others as well :)

OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
The documentation for `useColorScheme()` suggested that the user's preferred color scheme will be 'Dark Mode'. Instead suggesting 'Dark Mode' as an example of what the user's preferred color scheme could be is more correct.

## Changelog
[INTERNAL] [FIXED] - Edited documentation for `useColorScheme()` hook
Edited
```javascript
/**
 * A new useColorScheme hook is provided as the preferred way of accessing
 * the user's preferred color scheme (aka Dark Mode).
 */
export function useColorScheme(): ColorSchemeName;
```
to
```javascript
/**
 * A new useColorScheme hook is provided as the preferred way of accessing
 * the user's preferred color scheme (e.g. Dark Mode).
 */
export function useColorScheme(): ColorSchemeName;
```

Pull Request resolved: facebook#35141

Test Plan: Documentation only - no testing required.

Reviewed By: cipolleschi

Differential Revision: D40934781

Pulled By: rshest

fbshipit-source-id: acac8947c3f99016839be27f505066e8992a20fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants