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

Merge master to v1.0-beta #475

Merged
merged 6 commits into from
Aug 8, 2019
Merged

Conversation

pradeepnschrodinger
Copy link
Collaborator

Description, Motivation and Context

Merges latest master to v1.0-beta to prepare for 1.0-beta production release.

Improvements/bug fixes that gets merged from master:

How Has This Been Tested?

Tested on our examples and verified the role attributes and touch scrolling.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Tanner-MS and others added 6 commits May 21, 2019 16:05
… (Helps #440)

This seems to have helped the screen reader identify where it is when focus is within the table.

When using Narrator in Edge or Accessibility tools with Firefox, the screen reader says the roles correctly, reads the column with the cell, can tell which column it is in, and which row it is in.
* Touch Handlers only added  when `touchScrollEnabled` is enabled
* Fixed scroll bar not being at the correct position when clicked on the scroll bar body
@@ -22,6 +22,7 @@ import PropTypes from 'prop-types';
import ReactTouchHandler from 'ReactTouchHandler';
import ReactWheelHandler from 'ReactWheelHandler';
import Scrollbar from 'Scrollbar';
import ariaAttributesSelector from 'ariaAttributes';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I put this to a selector. Will be easier to manage in the near future.

this._touchHandler.onTouchMove,
{ passive: false }
);
if (this.props.touchScrollEnabled) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

only add the touch event handler if the prop is on

onTouchStart={this._touchHandler.onTouchStart}
onTouchEnd={this._touchHandler.onTouchEnd}
onTouchCancel={this._touchHandler.onTouchCancel}
onTouchStart={touchScrollEnabled ? this._touchHandler.onTouchStart : null}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

don't register touch event handlers unless prop is on

@@ -512,11 +512,11 @@ class Scrollbar extends React.PureComponent {
}

getTouchX = (/*object*/ e) => {
return Math.round(e.targetTouches[0].pageX - e.target.getBoundingClientRect().x);
return Math.round(e.targetTouches[0].clientX - e.target.getBoundingClientRect().x);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixes touch positioning of the scrollbar thumb

* ariaRowIndexOffset: number
* }}
*/
function calculateAriaAttributes(rowsCount, useGroupHeader, useFooter) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Tanner-MS , can you review this function? I just copied your PR for master, and renamed/rearranged a bit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good

Copy link
Member

@wcjordan wcjordan left a comment

Choose a reason for hiding this comment

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

lgtm

@pradeepnschrodinger pradeepnschrodinger merged commit 434d323 into v1.0-beta Aug 8, 2019
@pradeepnschrodinger pradeepnschrodinger deleted the beta-upmerge-from-master branch September 24, 2019 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants