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

Story Hierarchy - initial state bug fix #1401

Merged
merged 7 commits into from
Jul 6, 2017
Merged

Conversation

igor-dv
Copy link
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

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
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
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.

None yet

2 participants