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

Sticky KQL toolbar broken in Serverless #167908

Closed
semd opened this issue Oct 3, 2023 · 7 comments
Closed

Sticky KQL toolbar broken in Serverless #167908

semd opened this issue Oct 3, 2023 · 7 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@semd
Copy link
Contributor

semd commented Oct 3, 2023

Summary

The KQL toolbar is not sticky anymore in serverless.

Expected behavior

(in ESS)

sticky_bar_working.mov

Actual behavior

(in Serverless)

sticky_bar_not_working.mov
@semd semd added bug Fixes for quality problems that affect the customer experience Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Oct 3, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@semd
Copy link
Contributor Author

semd commented Oct 3, 2023

The cause of the problem may come from the HeaderActionMenu. When the position: sticky style is removed from it, the internal toolbar becomes sticky again.

sticky_bar_broken_possible_cause.mov

@Dosant
Copy link
Contributor

Dosant commented Oct 5, 2023

I took a quick look, the securitySolutionStickyKQL just sticks to top: var(--euiFixedHeadersOffset,0);

I think we will have to adjust it for serverless to account for HeaderActionMenu and it should be dynamic depending on if the sub-header is present

top: var(--euiFixedHeadersOffset + headerActionMenuHeight,0);

I am not sure if I am missing a simpler way

@petrklapka petrklapka assigned tsullivan and Dosant and unassigned tsullivan Oct 5, 2023
@semd
Copy link
Contributor Author

semd commented Oct 6, 2023

@Dosant Your solution works 👏
But it implies that we'll have to set a different top distance in serverless, and doing a special case in the CSS code is not ideal.

If we were to go with this solution, would it be possible for sharedUX to provide an offset constant or something, that we can use on both environments (serverless and non-serverless) without having to do a special case? it would be 57px in serverless and 0 in ess.

@Dosant
Copy link
Contributor

Dosant commented Oct 9, 2023

@semd, yes, I agree, we should expose something, I'll look into it.
note: this constant should also account for the top banner https://www.elastic.co/guide/en/kibana/current/banners-settings-kb.html

@semd
Copy link
Contributor Author

semd commented Oct 10, 2023

@Dosant Using the ESS (stateful) layout, we do not need to do any position changes when the top banner is present. Could it be that the serverless layout is doing something else differently that is causing all these positioning issues?

@Dosant
Copy link
Contributor

Dosant commented Oct 10, 2023

@Dosant Using the ESS (stateful) layout, we do not need to do any position changes when the top banner is present. Could it be that the serverless layout is doing something else differently that is causing all these positioning issues?

Yes, the variable you're using changes depending on if the banner is present.
After the fix, serverless should work in a similar way, this was mostly a note to myself

Dosant added a commit that referenced this issue Oct 13, 2023
## Summary

- Fixes sticky kql bar in serverless security project
#167908
- Fixes double scroll in serverless discover caused by incorrect app
container height cc @elastic/kibana-data-discovery

![Screenshot 2023-10-10 at 17 23
58](https://github.com/elastic/kibana/assets/7784120/3bf50299-7d9f-4c38-953a-33a6a75815c6)

- Fixes empty app header for top_nav component, for example, discover
doc page:

![Screenshot 2023-10-10 at 17 24
45](https://github.com/elastic/kibana/assets/7784120/4965deac-9472-402f-8e8e-66ede83ce1bb)

---------
Co-authored-by: Cee Chen <constance.chen@elastic.co>
@Dosant Dosant closed this as completed Oct 13, 2023
dej611 pushed a commit to dej611/kibana that referenced this issue Oct 17, 2023
…68372)

## Summary

- Fixes sticky kql bar in serverless security project
elastic#167908
- Fixes double scroll in serverless discover caused by incorrect app
container height cc @elastic/kibana-data-discovery

![Screenshot 2023-10-10 at 17 23
58](https://github.com/elastic/kibana/assets/7784120/3bf50299-7d9f-4c38-953a-33a6a75815c6)

- Fixes empty app header for top_nav component, for example, discover
doc page:

![Screenshot 2023-10-10 at 17 24
45](https://github.com/elastic/kibana/assets/7784120/4965deac-9472-402f-8e8e-66ede83ce1bb)

---------
Co-authored-by: Cee Chen <constance.chen@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

No branches or pull requests

4 participants