Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(Accessibility): Split action handlers with "OR" condition #1622

Merged
merged 3 commits into from
Jul 12, 2019

Conversation

sophieH29
Copy link
Contributor

Based on this initial PR #1588, there was made a decision to split actions in separate PR. And re-think conditional handlers in further discussions.

@codecov
Copy link

codecov bot commented Jul 11, 2019

Codecov Report

Merging #1622 into master will increase coverage by 0.2%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1622     +/-   ##
=========================================
+ Coverage   71.28%   71.49%   +0.2%     
=========================================
  Files         846      846             
  Lines        6938     6945      +7     
  Branches     1982     1982             
=========================================
+ Hits         4946     4965     +19     
+ Misses       1986     1974     -12     
  Partials        6        6
Impacted Files Coverage Δ
...b/accessibility/Behaviors/Tree/treeItemBehavior.ts 100% <100%> (ø) ⬆️
...ages/react/test/specs/behaviors/testDefinitions.ts 92.97% <100%> (+5.57%) ⬆️
packages/react/src/components/Tree/TreeItem.tsx 75% <71.42%> (-1.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3ae479...56fb65a. Read the comment docs.

/** Checks if current tree item has a subtree and it is opened */
const isSubtreeOpen = (props: TreeItemBehaviorProps): boolean => {
const { items, open } = props
return !!(items && items.length && open)
Copy link
Member

Choose a reason for hiding this comment

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

Was it determined that checking open alone was not sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, in TreeItem subtree is only rendered if open === true and items is not an empty array

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

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

Just one comment, address as you see fit and merge 👍

@sophieH29 sophieH29 merged commit 7dc2027 into master Jul 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the feat/split-action-handlers branch July 12, 2019 07:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants