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

[react-ui] Move experimental event+a11y work to react-ui package #16794

Merged
merged 3 commits into from
Sep 16, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Sep 16, 2019

This PR renamed the react-events package to react-ui and adds a top-level directory for each category. The react-events work goes into a top-level events directory, whilst all the accessibility component experiments go into accessibility. This also allows us to move relevant other parts of our experimental UI work into React Interactions, and other projects, into other top-level directories of react-ui without having to make them fit into existing directory structures (which is getting awkward).

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

I'm okay with this rename.

Have we reached out to siddharthkp about the likelihood of getting the react-ui package though? Looks like he's actively publishing to it.

@sizebot
Copy link

sizebot commented Sep 16, 2019

Details of bundled changes.

Comparing: 9691eb2...ace6a73

react-ui

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-ui-events/focus.development.js n/a n/a 0 B 10.92 KB 0 B 2.36 KB UMD_DEV
react-ui-events/press.development.js n/a n/a 0 B 20.69 KB 0 B 4.82 KB UMD_DEV
react-ui-events/focus.production.min.js n/a n/a 0 B 4.09 KB 0 B 1.39 KB UMD_PROD
react-ui-events/press.production.min.js n/a n/a 0 B 6.96 KB 0 B 2.62 KB UMD_PROD
react-ui-events/context-menu.development.js n/a n/a 0 B 2.67 KB 0 B 1001 B UMD_DEV
react-ui-events/input.development.js n/a n/a 0 B 4.51 KB 0 B 1.44 KB UMD_DEV
react-ui-events/swipe.development.js n/a n/a 0 B 5.99 KB 0 B 1.62 KB UMD_DEV
react-ui-events/context-menu.production.min.js n/a n/a 0 B 1.38 KB 0 B 726 B UMD_PROD
react-ui-events/input.production.min.js n/a n/a 0 B 1.83 KB 0 B 979 B UMD_PROD
react-ui-events/swipe.production.min.js n/a n/a 0 B 2.44 KB 0 B 1.1 KB UMD_PROD
react-ui-events/context-menu.development.js n/a n/a 0 B 2.48 KB 0 B 955 B NODE_DEV
react-ui-events/input.development.js n/a n/a 0 B 4.33 KB 0 B 1.39 KB NODE_DEV
react-ui-events/swipe.development.js n/a n/a 0 B 5.81 KB 0 B 1.58 KB NODE_DEV
react-ui-events/context-menu.production.min.js n/a n/a 0 B 1.19 KB 0 B 666 B NODE_PROD
react-ui-events/input.production.min.js n/a n/a 0 B 1.65 KB 0 B 911 B NODE_PROD
react-ui-events/swipe.production.min.js n/a n/a 0 B 2.26 KB 0 B 1.04 KB NODE_PROD
react-ui-events/hover.development.js n/a n/a 0 B 7 KB 0 B 1.55 KB UMD_DEV
react-ui-events/scroll.development.js n/a n/a 0 B 6.29 KB 0 B 1.65 KB UMD_DEV
react-ui-events/hover.production.min.js n/a n/a 0 B 3.11 KB 0 B 1.13 KB UMD_PROD
react-ui-events/scroll.production.min.js n/a n/a 0 B 2.62 KB 0 B 1.14 KB UMD_PROD
react-ui-events/hover.development.js n/a n/a 0 B 6.81 KB 0 B 1.5 KB NODE_DEV
react-ui-events/scroll.development.js n/a n/a 0 B 6.11 KB 0 B 1.6 KB NODE_DEV
react-ui-events/hover.production.min.js n/a n/a 0 B 2.93 KB 0 B 1.07 KB NODE_PROD
react-ui-events/scroll.production.min.js n/a n/a 0 B 2.43 KB 0 B 1.09 KB NODE_PROD
react-ui-events/focus.development.js n/a n/a 0 B 10.73 KB 0 B 2.31 KB NODE_DEV
react-ui-events/press.development.js n/a n/a 0 B 20.51 KB 0 B 4.77 KB NODE_DEV
react-ui-events/focus.production.min.js n/a n/a 0 B 3.92 KB 0 B 1.32 KB NODE_PROD
react-ui-events/press.production.min.js n/a n/a 0 B 6.78 KB 0 B 2.56 KB NODE_PROD
react-ui-events/drag.development.js n/a n/a 0 B 5.22 KB 0 B 1.54 KB UMD_DEV
react-ui-events/keyboard.development.js n/a n/a 0 B 6.88 KB 0 B 2.38 KB UMD_DEV
react-ui-events/tap.development.js n/a n/a 0 B 16.42 KB 0 B 3.63 KB UMD_DEV
react-ui-events/drag.production.min.js n/a n/a 0 B 2.24 KB 0 B 1.07 KB UMD_PROD
react-ui-events/keyboard.production.min.js n/a n/a 0 B 2.79 KB 0 B 1.39 KB UMD_PROD
react-ui-events/tap.production.min.js n/a n/a 0 B 5.77 KB 0 B 2.22 KB UMD_PROD
react-ui-events/drag.development.js n/a n/a 0 B 6.97 KB 0 B 2.21 KB NODE_DEV
react-ui-events/keyboard.development.js n/a n/a 0 B 6.69 KB 0 B 2.33 KB NODE_DEV
react-ui-events/tap.development.js n/a n/a 0 B 16.24 KB 0 B 3.58 KB NODE_DEV
react-ui-events/drag.production.min.js n/a n/a 0 B 2.87 KB 0 B 1.38 KB NODE_PROD
react-ui-events/keyboard.production.min.js n/a n/a 0 B 2.61 KB 0 B 1.34 KB NODE_PROD
react-ui-events/tap.production.min.js n/a n/a 0 B 5.67 KB 0 B 2.21 KB NODE_PROD

Generated by 🚫 dangerJS against ace6a73

@trueadm trueadm requested a review from sebmarkbage September 16, 2019 16:26
@trueadm
Copy link
Contributor Author

trueadm commented Sep 16, 2019

@bvaughn We might decide to move this to the React package in the future, but for now this is all more of a package of experimental work we're playing around with internally. I do quite like react-ui though :P

Copy link
Contributor

@necolas necolas left a comment

Choose a reason for hiding this comment

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

lgtm

packages/react-ui/accessibility/src/FocusGrid.js Outdated Show resolved Hide resolved
@trueadm trueadm merged commit 494300b into facebook:master Sep 16, 2019
@trueadm trueadm deleted the react-events-to-react-uoi branch September 16, 2019 18:05

import React from 'react';
import {tabFocusableImpl} from './TabbableScope';
import {useKeyboard} from 'react-events/keyboard';
import {useKeyboard} from '../../events/keyboard';
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops this is the non-type import that could get inlined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is okay. I plan on doing a follow up where I add the a11y components to build and will revise it there.


import React from 'react';
import {TabbableScope} from './TabbableScope';
import {useKeyboard} from 'react-events/keyboard';
import {useKeyboard} from '../../events/keyboard';
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is okay. I plan on doing a follow up where I add the a11y components to build and will revise it there.

@bvaughn
Copy link
Contributor

bvaughn commented Sep 16, 2019

I think this PR may have broken DevTools tests. Can you run yarn test-build-devtools?

Hm... I think CI runs this though so maybe my local Yarn is just corrupted.

yarn test-build-devtools
yarn run v1.17.3
$ cross-env NODE_ENV=development jest --config ./scripts/jest/config.build-devtools.js packages/react-devtools-shared/src/tests/store-test.js --watch
Error: ENOENT: no such file or directory, stat '/Users/bvaughn/Documents/git/react/packages/react-events/package.json'
at Object.statSync (fs.js:871:3)
at /Users/bvaughn/Documents/git/react/node_modules/graceful-fs/polyfills.js:308:16
at readdirSync.filter.dir (/Users/bvaughn/Documents/git/react/scripts/jest/config.build-devtools.js:17:10)
at Array.filter ()
at Object. (/Users/bvaughn/Documents/git/react/scripts/jest/config.build-devtools.js:9:44)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
error Command failed with exit code 1.

@trueadm
Copy link
Contributor Author

trueadm commented Sep 16, 2019

I had a similar issue when deleting the "react-events" directory locally. Git doesn't register directory removals as a change, so maybe we should update the script to check if the directory is empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants