fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

FluentUI Panel - Allow option for "non-sticky" Pivot/Panel Header

Open PeterWCox opened this issue 5 years ago • 8 comments

Describe the feature that you would like added

Add option to turn off "Sticky Header"

What component or utility would this be added to

Panel

Have you discussed this feature with our team, and if so, who

No

Additional context/screenshots

IMO we should be able to turn off the sticky header especially when we are using custom content like in the below screenshot.

image

I am able to disable it in the chrome devtools as below

image

I'm sure its possible to change this using the IPanelStyles property but am struggling to find a way to do it as the "stickyness" comes from a frustrating media query

Any help would be appreciated - by the way thanks for making such an awesome and easy to use front-end framework.

PeterWCox avatar Sep 25 '21 23:09 PeterWCox

I eventually managed to fix the issue using some very ugly CSS - hopefully someone finds it useful or at least solves their problem!

image

PeterWCox avatar Sep 25 '21 23:09 PeterWCox

@PeterWCox - I’ve added this to our backlog for review but it’s low on our priority list as we’re likely not going to get to it immediately due to the fact we’re currently focused on larger coherence work items and enhancements to our performance. However, If you come up with a solution in the interim and would like to submit a PR for this request - our team will gladly review it!

gouttierre avatar Oct 04 '21 13:10 gouttierre

@gouttierre thank you - I will see what I can do this week to help out

PeterWCox avatar Oct 04 '21 13:10 PeterWCox

I've also encountered this problem, looks like you can override media queries like so:

      styles={{
        commands: {
          "@media (min-height: 480px)": {
            position: "unset"
          }
        }
      }}

jameslieu avatar Oct 27 '21 15:10 jameslieu

Additionally, the sticky header doesn't set a z-index, so the body content shows up over it. It also doesn't use the background color of the main panel (set using main.backgroundColor). Thus we get something like this:

image

mbest avatar Nov 05 '21 00:11 mbest

*.ms-Panel-commands{
    z-index: 1;
}

This worked for me .!!

bablu-joshi avatar Mar 02 '22 17:03 bablu-joshi

@bablu-joshi , @PeterWCox do you consider this to be fixed on your side based on the discussion? Can we close this issue?

tudorpopams avatar Aug 29 '22 13:08 tudorpopams

Hey @tudorpopams yes feel free to close, as I think the above fixes are sufficient for all practical purposes.

PeterWCox avatar Aug 29 '22 16:08 PeterWCox