Skip to content

Story Hierarchy - initial state bug fix#1401

Merged
shilman merged 7 commits intorelease/3.2from
151-story-hierarchy
Jul 6, 2017
Merged

Story Hierarchy - initial state bug fix#1401
shilman merged 7 commits intorelease/3.2from
151-story-hierarchy

Conversation

@igor-dv
Copy link
Copy Markdown
Member

@igor-dv igor-dv commented Jul 2, 2017

Issue: #151

What I did

I've added componentWillReceiveProps to the stories_tree/index.js that will recalculate the selected nodes according to the provided selected hierarchy.

How to test

run cra-kitchen-sink

@igor-dv igor-dv added this to the v3.2.0 milestone Jul 2, 2017
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 2, 2017

Codecov Report

Merging #1401 into release/3.2 will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##           release/3.2   #1401      +/-   ##
==============================================
+ Coverage        15.82%   15.9%   +0.07%     
==============================================
  Files              237     237              
  Lines             5043    5050       +7     
  Branches           625     619       -6     
==============================================
+ Hits               798     803       +5     
- Misses            3725    3729       +4     
+ Partials           520     518       -2
Impacted Files Coverage Δ
...les/ui/components/left_panel/stories_tree/index.js 100% <100%> (ø) ⬆️
app/react-native/src/preview/story_kind.js 0% <0%> (ø) ⬆️
app/react/src/client/preview/error_display.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/libs/hierarchy.js 47.16% <0%> (ø) ⬆️
lib/ui/src/libs/key_events.js 23.25% <0%> (ø) ⬆️
lib/ui/src/modules/shortcuts/actions/shortcuts.js 6.25% <0%> (ø) ⬆️
...ponents/left_panel/stories_tree/tree_decorators.js 39.02% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/layout.js 12.5% <0%> (ø) ⬆️
lib/ui/src/modules/ui/libs/filters.js 41.66% <0%> (ø) ⬆️
addons/knobs/src/react/WrapStory.js 11.11% <0%> (ø) ⬆️
... and 13 more

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 03e10d0...3096cde. Read the comment docs.

currentSelectedHierarchy.length === nextSelectedHierarchy.length &&
currentSelectedHierarchy.every((item, index) => item === nextSelectedHierarchy[index])
) {
return;
Copy link
Copy Markdown
Member

@shilman shilman Jul 4, 2017

Choose a reason for hiding this comment

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

if(!deepEquals(currentHierarchy, nextHierarchy)) {
   const selectedNodes ...
}

Copy link
Copy Markdown
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

see suggestion above @igor-dv

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants