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

[0.68] Keyboard navigation in Flatlist (#1258) #1262

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

Saadnajmi
Copy link
Collaborator

Cherry pick #1258 to 0.68-stable

* add pull yml

* match handleOpenURLNotification event payload with iOS (microsoft#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* [pull] master from microsoft:master (#11)

* Deprecated api (microsoft#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (microsoft#852)

* Ignore javadoc failure

* Bringing few more changes from 0.63-stable

* Fixing a patch in engine selection

* Fixing a patch in nuget spec

* Fixing the output directory of nuget pack

* Packaging dependencies in the nuget

* Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (microsoft#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (microsoft#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* fix mouse evetns on pressable

* delete extra yml from this branch

* Add macOS tags

* reorder props to have onMouseEnter/onMouseLeave always be before onPress

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* Grammar fixes. (microsoft#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

* wip

* wip

* more wip

* Home/End/OptionUp/OptionDown work

* ensureItemAtIndexIsVisible works

* Home/End work

* Initial cleanup for PR

* More cleanup

* More cleanup

* Make it a real prop

* No need for client code

* Don't move keyboard focus with selection

* Update tags

* Fix flow errors

* Update colors, make ScrollView focusable

* prettier

* undo change

* Fix flow errors

* Clean up code + handle page up/down with new prop

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
@Saadnajmi Saadnajmi requested a review from a team as a code owner July 19, 2022 22:24
@Saadnajmi Saadnajmi changed the title Keyboard navigation in Flatlist (#1258) [0.68] Keyboard navigation in Flatlist (#1258) Jul 19, 2022
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

...
}> {
_onPress = () => {
this.props.onPress(this.props.item.key);
};
render(): React.Node {
const {fixedHeight, horizontal, item, textSelectable} = this.props;
// [TODO(macOS GH#774)

Choose a reason for hiding this comment

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

prettier/prettier: Replace ⏎······fixedHeight,⏎······horizontal,⏎······item,⏎······textSelectable,⏎······isSelected, with fixedHeight,·horizontal,·item,·textSelectable,·isSelected}·=

horizontal,
item,
textSelectable,
isSelected,

Choose a reason for hiding this comment

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

prettier/prettier: Replace }·= with ·

@@ -78,10 +87,12 @@ class ItemComponent extends React.PureComponent<{
styles.row,
horizontal && {width: HORIZ_WIDTH},
fixedHeight && {height: ITEM_HEIGHT},
]}>

Choose a reason for hiding this comment

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

prettier/prettier: Delete ⏎········

@@ -276,7 +286,8 @@ class FlatListExample extends React.PureComponent<Props, State> {
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb)

Choose a reason for hiding this comment

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

react/no-unstable-nested-components: Declare this component outside parent component "FlatListExample" or memoize it. If you want to allow component creation in props, set allowAsProps option to true.

@pull-bot
Copy link

pull-bot commented Jul 19, 2022

Fails
🚫

node failed.

🚫

❔ This pull request needs a description.

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • macOS
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

Log

Error:  RequestError [HttpError]: Must have admin rights to Repository.
    at /root/react-native/bots/node_modules/@octokit/request/dist-node/index.js:86:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/microsoft/react-native-macos/issues/1262/labels',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Tue, 19 Jul 2022 23:15:05 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-oauth-scopes': '',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '8FC6:7E28:AD069:1BE8C8:62D73AF9',
      'x-oauth-scopes': 'public_repo',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4965',
      'x-ratelimit-reset': '1658273342',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '35',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Must have admin rights to Repository.',
      documentation_url: 'https://docs.github.com/rest/reference/issues#add-labels-to-an-issue'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/microsoft/react-native-macos/issues/1262/labels',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-rest.js/18.12.0 octokit-core.js/3.5.1 Node.js/14.18.1 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"labels":["Pick Request"]}',
    request: { hook: [Function: bound bound register] }
  }
}
danger-results://tmp/danger-results.json

Generated by 🚫 dangerJS against b5710f4

@ghost ghost removed the Needs: Author Feedback label Jul 19, 2022
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@Saadnajmi Saadnajmi merged commit 3942b6f into microsoft:0.68-stable Jul 20, 2022
@Saadnajmi Saadnajmi deleted the lists-68 branch July 20, 2022 01:02
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.

4 participants