-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Links don't work anymore for pagePerSection
#1702
Comments
@alexcanessa Would you create a code sandbox? https://codesandbox.io/s/github/mitsuruog/react-styleguidist-issue-template |
This comment has been minimized.
This comment has been minimized.
This seems to be due to the fact that module.exports = {
webpackConfig: require("./webpack.config"),
// This is what breaks the URL:
pagePerSection: true,
sections: [
{
name: "<section name>",
components: "src/components/**/*.{js,jsx}"
}
]
}; |
This comment has been minimized.
This comment has been minimized.
@sapegin |
Not sure why it should be an error, seems like a valid configuration. What am I missing? (The problem is that this feature wasn't well thought and too brittle, that why we constantly have bugs, and when someone fixes one bug they usually create several others.) |
From what I've seen in the implementation, it doesn't seem to work properly without Since the implementation looked like that, I thought that it was designed from the beginning to always have sections. |
Please don't use the current implementation as the source of how it should work ;-) I also haven't written any of this code so I can't say either how it should work. But for me having each component on its own page looks like the most common use case, and I remember it used to work at some point. |
It's definitely working on the version I don't think |
You always have sections even if you don't define them explicitly in the config file. react-styleguidist/src/scripts/schemas/config.ts Lines 219 to 234 in d80a190
|
@sapegin yes. I think I'm missing your point? In the configuration file, I should be able to not specify sections and have a component per page. |
You'll always have one section with your components, |
@sapegin Yes, ok. So what does it change in terms of my configuration file? |
Nothing I guess? I don't know what's in your config file. I was answering to this statement:
Sections are mandatory because you can't have no sections. |
Well that's the point lol. Config file is in the sandbox. Anyway, they're not mandatory to have in the config file. The fact that the library then creates them it's a separate story. So to answer the actual bug: you should be able to not specify |
🎉 This issue has been resolved in version 11.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Current behavior
Since
11.0.9
(I suspect because of this PR), when clicking on any component (withpagePerSection: true
) the routing goes to#/-?id=ComponentName
.To reproduce
pagePerSection: true
Page Not Found
.Expected behavior
Routing to the actual component page, showing the component.
The text was updated successfully, but these errors were encountered: