-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Solution nav not rendering when KibanaPageTemplate has no data #143114
Comments
This looks like it might be a regression caused by #141043 |
I believe this is the PR that caused regression: Specifically this change to With this change, the sidebar is rendered at the incorrect place in the DOM. When I changed the code locally to |
My PR linked above introduced this The This works as intended on all other Solution pages besides Observability. |
I looked into this issue yesterday and think I found a root cause. The EUI Page Template Sidebar docs mention
I refactored the example code to My hunch is moving the sidebar or section code into one file instead of using an import statement should fix the issue without additional work in EUI. Let me know if that doesn't fix the issue and we'll take another look |
@1Copenut thank you for looking into this. putting this in the same side makes it definitely look better, but the culprit I see is still this |
Also, the top is not set properly for the side nav; that is a result of my change. I still don't understand what makes Observability Page Template different than the one in all the other solutions. I will have a look into that. |
I wish I had a better answer than I'm not sure. I read through the docs a number of times and didn't find any indication why the Observability Page Template is handling the left nav different than the others. I've let Chandler know about this issue so he can take a fresh look next week. |
I've asked @miukimiu to look into this next week |
I looked at this. And these are my findings. The issue only happens if we pass a The way the EuiPageTemplate works is to check all the children and if the React.Children.toArray(children).forEach((child, index) => {
if (!React.isValidElement(child)) return; // Skip non-components
switch (child.type) {
case EuiPageSidebar:
default: It seems that in Kibana every time we pass a // console.log(children) that is a <EuiSidebar css={css``} />
type: {$$typeof: Symbol(react.forward_ref), render: ƒ}
// console.log(children) that is a <EuiSidebar /> no CSS prop
type: ƒ EuiPageSidebar(_ref) I tested in CodeSandbox (also locally) and if I pass a So I'm not sure why this is happening in Kibana. How to fixOne solution could be avoid the But IMO we should find out why any EUI component that has a So this is something a couldn't find answer. @chandlerprall @majagrubic could this be the way emotion is configured in kibana (babel for example)? |
I plan on a taking a look at this tomorrow to investigate a potential fix on EUI's side. Amazing job debugging the underlying |
@majagrubic elastic/eui#6324 - I have a fix in but it likely won't land in Kibana main for another week or two. In the interim I would suggest using |
I merged a workaround as suggested by @constancecchen. This should now fix Observability problem |
Thank you @majagrubic and @constancecchen! I'm going to close this issue. |
FYI @majagrubic that the |
Kibana version:
main
(Confirmed it is working as expected on 8.5)Describe the bug:
The side solution nav does not render when the KibanaPageTemplate has no data.
Steps to reproduce:
I was able to reproduce this for the Observability apps. I'm not sure if it's only limited to that or not though.
/app/home#/getting_started
Expected behavior:
The solution nav should render when the user does not have any data.
Screenshots (if relevant):
Current behavior:
Expected behavior:
Any additional context:
Here is the code that handles the Observability page template rendering. I see there were some EUI changes made in #139524, however, assuming the labels are correct, this was released in 8.5.
This bug is problematic specifically for the guided onboarding project, as the existing EuiTour expects elements to exist in the solution nav.
The text was updated successfully, but these errors were encountered: