Describe the bug
Using storybook 6.0.0-beta.22, the error described at #5594 happening again.
To Reproduce
Steps to reproduce the behavior (same steps from #5594):
Expected behavior
(same steps from #5594): "I expect to be able to collapse parent elements arbitrarily even if something nested inside them is selected."
System:
Please paste the results of npx -p @storybook/cli@next sb info here.
Environment Info:
System:
OS: Linux 5.3 Ubuntu 18.04.3 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Binaries:
Node: 12.1.0 - ~/.nvm/versions/node/v12.1.0/bin/node
Yarn: 1.17.3 - ~/.yarn/bin/yarn
npm: 5.1.0 - ~/dev/intelie/liverig/live-plugins/node_modules/.bin/npm
Browsers:
Chrome: 78.0.3904.97
Firefox: 76.0.1
npmPackages:
@storybook/addon-docs: ^6.0.0-beta.22 => 6.0.0-beta.22
@storybook/addon-knobs: ^6.0.0-beta.22 => 6.0.0-beta.22
@storybook/addon-links: ^6.0.0-beta.22 => 6.0.0-beta.22
@storybook/addons: ^6.0.0-beta.22 => 6.0.0-beta.22
@storybook/react: ^6.0.0-beta.22 => 6.0.0-beta.22
I've had the same issue with next version
Environment Info:
System:
OS: macOS 10.15.5
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Browsers:
Chrome: 83.0.4103.97
Safari: 13.1.1
npmPackages:
@storybook/addon-a11y: ^5.3.19 => 5.3.19
@storybook/addon-actions: ^6.0.0-beta.23 => 6.0.0-beta.23
@storybook/addon-links: ^6.0.0-beta.23 => 6.0.0-beta.23
@storybook/addon-viewport: ^5.3.19 => 5.3.19
@storybook/addons: ^6.0.0-beta.23 => 6.0.0-beta.23
@storybook/react: ^6.0.0-beta.23 => 6.0.0-beta.23
@JackHowa unrelated issue, but please upgrade all your @storybook/* packages to the same version. Having a mixture of 5.3 and 6.0 packages is bound to cause problems
@AnnyCaroline what version did you upgrade from? was it working in the previous version?
@ndelangen did this change at all in the composition work?
@shilman I upgraded from 5.3. It was working fine.
However, I don't think it has anything to do with the update. I tested it now with a new installation, and the problem happens.
To reproduce:
module.exports = {
stories: ['../src/**/*.stories.js']
};
export default { title: 'Test1/subfolder' };
export const one = () => (
<h1>
One
</h1>
);
```
- src/storie/two.stories.js:
```
import React from 'react';
export default { title: 'Test2/subfolder' };
export const two = () => (
<h1>
Two
</h1>
);
```
@shilman yes looks like changes from https://github.com/storybookjs/storybook/pull/5625/files aren't on next anymore 馃槩
We'd have to make some changes here:
https://github.com/storybookjs/storybook/blob/341fc2d90d4f3ae42fd9b68173b9f7b1856917f0/lib/ui/src/components/sidebar/Tree/State.tsx#L100-L116
@JackHowa @AnnyCaroline would either of you be interested and able to help us fixing this?
@ndelangen I would love to help
@shilman was able to replicate with using all the same version packages. thanks for the note
```
Environment Info:
System:
OS: macOS 10.15.5
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Browsers:
Chrome: 83.0.4103.97
Safari: 13.1.1
npmPackages:
@storybook/addon-a11y: ^6.0.0-beta.23 => 6.0.0-beta.23
@storybook/addon-backgrounds: ^6.0.0-beta.23 => 6.0.0-beta.23
@storybook/addons: ^6.0.0-beta.23 => 6.0.0-beta.23
@storybook/react: ^6.0.0-beta.23 => 6.0.0-beta.23
I can look into this tonight. Looks like it may have been a solved problem per @ndelangen's note?
Yes, it's been solved once, but a refactor caused the feature to be removed. Totally my fault.
What can I do to assist @JackHowa?
I think the code-change would be relatively simple, and I can definitely make some time pair programming on it.
Please add a meeting in my calendar if you'd like to take me up on that offer:
https://calendly.com/ndelangen/storybook
Perhaps it would be as easy as:
const { expandedSet, setExpanded } = useExpanded(
type,
[],
initial.filtered,
initial.unfiltered
);
(remove the second parameter)
thanks for the offer @ndelangen. Was looking at my calendar (CST-based). I may be able to later in the week. As I mentioned in the pr, I was not able to validate the fix. I tried linking and the example folder.
The tests pass with the fix so I'm not sure if that's helpful.
Really appreciate the offer. And this project is amazing!!
addressed in https://github.com/storybookjs/storybook/pull/11243
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
is anyone still taking on this bug? I see the current open PR was closed 馃槥
@fkurniaw yeah I tried a couple times and paired on it. but couldn't satisfy some of the testcases and ensure the functionality stayed intact. you're welcome to take a shot at it if you want? tried to leave comments where appropriate in the branch
This was fixed in #12601 and released on the 6.1-alpha. Closing.
Would you consider back-porting it to 6.X ? 6.1 is alpha, and some places have a policy on installing alpha versions 馃槓, willing to help myself.
Plop, just saw the video for V6, the new one looks amazing, I would rather push towards V6.1 than back-porting this feature.
@irvingv8 we're fast tracking the 6.1 release and won't spend any time back-porting stuff to 6.0
Most helpful comment
@ndelangen I would love to help