-
Notifications
You must be signed in to change notification settings - Fork 5.3k
update TV-related props, improve docs formatting #4802
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
maybe @douglowder can help review this 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.
See my requested changes inline
docs/button.md
Outdated
### `hasTVPreferredFocus` <div className="label ios">tvOS</div> | ||
|
||
:::warning Deprecated | ||
Use [`focusable` prop](view#focusable) form `View` instead. |
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.
This prop is not interchangeable with focusable
, and is actively used in the TV repo. See facebook/react-native#52043 (comment)
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.
Hey @douglowder, thanks for the review! 👋 The goal of docs is to align with what's in the React Native code.
As it currently seems, those changes have landed, and did not get reverted, see:
I can remove the deprecation notice from the Next version docs and this PR for now, but you should rise this issue in core repo or on RN Discord, create a PR reverting the deprecation and request cherry picking to the version branch.
If the code will remain unchanged for 0.82, we will need to add the deprecation anyway, closer to the release/docs version cut. This will probably happen in around three weeks, according to the schedule:
--- | ||
|
||
### `hasTVPreferredFocus` <div className="label tv">TV</div> | ||
### `hasTVPreferredFocus` <div className="label ios">tvOS</div> |
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.
In the TV repo, this prop is supported on both Apple TV and Android TV.
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.
Hey @douglowder, after discussing it with @cortinico, looks like want to keep the docs as close to the core repo code (no other out-of-tree platform specific props or prop changes are listed in the docs).
If you have a website or doc where we can redirect people interested in TV platforms let me know. We can add a link to the page which have a better/more detailed information for TV usage.
Also, if you think that those platform annotations are incorrect in the core repo code, please create a PR addressing that, and we can follow up with docs correction, if it gets merged.
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.
Also, if you need a help with setting up TV platforms website LMK, let's talk on Discord 🙂
--- | ||
|
||
### `nextFocusDown` <div className="label android">Android</div><div className="label tv">TV</div> | ||
### `nextFocusDown` <div className="label android">Android TV</div> |
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.
In the TV repo, this prop (and nextFocusUp, nextFocusLeft, nextFocusRight) are supported on both Apple TV and Android TV. I believe nextFocusForward is only on Android.
Why
When working on recent Sidebar and ToC I have spotted that some of the TV-related props are marked inconsistently. Also, spotted that
hasTVPreferredFocus
deprecation note is missing, refs:How
Update platform marking on the TV props, add deprecation note for
hasTVPreferredFocus
prop, small tweaks for content formatting in various component and APIs docs.Preview