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
Core: Disable sidebar and don't load refs when singleStory=true
#15201
Conversation
Nx Cloud ReportCI ran the following commands for commit d0b533d. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
viewMode, | ||
storyId, | ||
refId, | ||
singleStory: singleStory === 'true', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parseBoolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in a different module, so I can't directly access it. Also singleStory
is a new param which is not supposed to support '1'
, but only 'true'
.
Issue: #15171
What I did
This retrieves the
singleStory
query param and passes it as a boolean to initializing modules.layout
module uses it to preventshowNav
from ever becomingtrue
(i.e. ignore the toggle).url
module uses it to setshowNav: false
when creating the initial layout state.refs
module uses it to not initialize any refs and prevent refs from being added.I also refactored the url params handling to be more straightforward with less if/else and a consistent way to handle boolean params.
How to test
If your answer is yes to any of these, please make sure to include it in your PR.