sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Pre-allocating space for top app customizer hides the 'collapse content' button for library

Open kapilmehtagit opened this issue 6 years ago • 6 comments

Category

  • [x] Bug

Describe the bug

App customizer in Top placeholder has a pre-allocated height of 40px. When a user clicks on the 'Expand content' option in a library's command bar, the 'Collapse content' option gets hidden behind the app customizer due to it's pre-allocated height.

Steps to reproduce

Create a top placeholder customiser (an empty div would do) with a pre-allocated height of 40px.

elements.xml/ClientSideInstance.xml should include: HostProperties="{"preAllocatedApplicationCustomizerTopHeight":"40"}">

Deploy the placeholder. Click 'Expand content' from a libary's command bar. Note the 'Collapse content' button is now hidden behind the app customizer.

Expected behavior

The 'Collapse content' button and associated div should be placed below the app customizer when the library is shown in 'expanded content' mode.

Developer environment

Additional context

Thanks for your contribution! Sharing is caring.

kapilmehtagit avatar Mar 18 '20 15:03 kapilmehtagit

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Mar 18 '20 15:03 msft-github-bot

To add to this, even if you don't set the preAllocatedApplicationCustomizerTopHeight setting, we are still seeing this issue.

I can reproduce following this to create a header placeholder app customizer: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions

In some tenancies it works as expected, in others it doesn't (see examples below): readingpane

Top example is how it is expected (and still works like this in some tenancies), however the majority of tenancies the application customizer is appearing above the expanded content (bottom example) and users are stuck, they can't minimize the content (even with a page refresh).

CloudDesignBox avatar Apr 06 '20 14:04 CloudDesignBox

I've made a workaround solution for this. Not pretty but works, similar solution to @estruyf used for checking page navigation. Hopefully Microsoft can resolve so we don't have to add these hacks.

private checkForexpandCollapseList(){ const interval = window.setInterval(() => { let collapsebuttons:any = document.querySelectorAll("[data-automationid='expandCollapseList']"); //if item exists on the page if(collapsebuttons){ //hide menu if(collapsebuttons[0].title == "Collapse content"){ const topbannermenu: HTMLElement = document.querySelector(#${styles.myheader}); if(topbannermenu){ topbannermenu.style.display = "none"; } // show menu }else if (collapsebuttons[0].title == "Expand content"){ const topbannermenu: HTMLElement = document.querySelector(#${styles.myheader}); if(topbannermenu){ topbannermenu.style.display = "block"; } //show menu if another value }else{ const topbannermenu: HTMLElement = document.querySelector(#${styles.myheader}); if(topbannermenu){ topbannermenu.style.display = "block"; } } } }, 200); }

CloudDesignBox avatar Apr 19 '20 09:04 CloudDesignBox

Any updates regarding this issue?

mirkori avatar May 12 '20 14:05 mirkori

Sorry for the delay / missing metadata. This looks like it is fixed, although a separate issue (the customizer doesn't appear in focus mode) is being addressed separately.

patmill avatar Nov 11 '21 19:11 patmill

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

ghost avatar Nov 19 '21 00:11 ghost