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

Add desktop platform-related stylesheet props #21027

Closed

Conversation

empyrical
Copy link
Contributor

This PR adds the ReactPropTypes and Flow definitions for two style properties that are not useful for mobile platforms, but will be useful for desktop implementations:

  • cursor - for setting what the cursor's style will be when hovering over a <View />
  • appRegion - to make Views into draggable areas of a window, and also for marking children of said views non-draggable (like buttons). This is named after the --webkit-app-region property seen in Chrome apps and Electron apps

These could also be utilized by React Native Dom and React Native Web. (mapping appRegion back to --webkit-app-region)

Test Plan:

In a test project I was able to use appRegion and cursor in a StyleSheet and have flow check pass.

Release Notes:

[GENERAL] [ENHANCEMENT] [Libraries/StyleSheet/DesktopPropTypes.js] - Added Desktop Prop Types
[GENERAL] [ENHANCEMENT] [Libraries/Components/View/ViewStylePropTypes.js] - Added Desktop Prop Types
[GENERAL] [ENHANCEMENT] [Libraries/StyleSheet/StyleSheetTypes.js] - Added Desktop style flow types
[GENERAL] [ENHANCEMENT] [Libraries/StyleSheet/StyleSheet.js] - Added Desktop style flow types

@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 Sep 9, 2018
@empyrical
Copy link
Contributor Author

Looks like test_node10 failed due to a network hiccup:

yarn install v1.9.4
[1/5] Validating package.json...
[2/5] Resolving packages...
error Received malformed response from registry for undefined. The registry may be down.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exited with code 1

But other than that, seemingly no regressions.

@empyrical
Copy link
Contributor Author

Going to close this for now in favor of writing a proposal for allowing out-of-tree platforms to define style, view, etc props

@empyrical empyrical closed this Sep 24, 2018
facebook-github-bot pushed a commit that referenced this pull request Mar 23, 2021
Summary:
This sync includes the following changes:
- **[6d3ecb70d](facebook/react@6d3ecb70d )**: Remove unstable_changedBits ([#20953](facebook/react#20953)) //<Andrew Clark>//
- **[754e30728](facebook/react@754e30728 )**: Delete immediateQueueCallbackNode ([#20980](facebook/react#20980)) //<Andrew Clark>//
- **[be5a2e231](facebook/react@be5a2e231 )**: Land enableSyncMicrotasks ([#20979](facebook/react#20979)) //<Andrew Clark>//
- **[f6bc9c824](facebook/react@f6bc9c824 )**: [Fizz] Expose maxBoundarySize as an option ([#21029](facebook/react#21029)) //<Sebastian Markbåge>//
- **[154b85213](facebook/react@154b85213 )**: [Fizz] Expose a method to explicitly start writing to a Node stream ([#21028](facebook/react#21028)) //<Sebastian Markbåge>//
- **[cf485e6f6](facebook/react@cf485e6f6 )**: [Fizz] Expose a method to abort a pending request ([#21027](facebook/react#21027)) //<Sebastian Markbåge>//
- **[3fb11eed9](facebook/react@3fb11eed9 )**: React Native: Touch Instrumentation Interface ([#21024](facebook/react#21024)) //<Timothy Yung>//
- **[825c3021f](facebook/react@825c3021f )**: Don't delete trailing mismatches during hydration at the root ([#21021](facebook/react#21021)) //<Sebastian Markbåge>//
- **[1d1e49cfa](facebook/react@1d1e49cfa )**: [Fizz] Assign an ID to the first DOM element in a fallback or insert a dummy (and testing infra) ([#21020](facebook/react#21020)) //<Sebastian Markbåge>//
- **[466b26c92](facebook/react@466b26c92 )**: Store commit durations on HostRoot for DevTools access ([#20983](facebook/react#20983)) //<Brian Vaughn>//
- **[89acfa639](facebook/react@89acfa639 )**: Fix native event batching in concurrent mode ([#21010](facebook/react#21010)) //<Ricky>//
- **[0203b6567](facebook/react@0203b6567 )**: chore: update react-reconciler README ([#21016](facebook/react#21016)) //<susiwen8>//

Changelog:
[General][Changed] - React Native sync for revisions c9f6d0a...6d3ecb7

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross, kacieb

Differential Revision: D27231625

fbshipit-source-id: 89c0c0662e69044ae8890486a693013bee6005dd
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants