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

Side Panel has reappeared #4

Open
roberts2727 opened this issue Oct 2, 2018 · 4 comments
Open

Side Panel has reappeared #4

roberts2727 opened this issue Oct 2, 2018 · 4 comments

Comments

@roberts2727
Copy link

A couple of weeks ago the app started showing the side panel again for quicklaunch. No links in it, but the side panel has reappeared.

@DRobinson-Informa
Copy link

DRobinson-Informa commented Nov 29, 2018

I was able to fix this for the "Hide an Element" web part by going into \src\webparts\hideAnElement\App.js and making a minor code change. Looks like the "hide quick launch" functionality broke somewhat because MS changed something about the way the quick launch element was labeled. Frankly, I expect this to happen again at some point in the future, so it's good to know how to diagnose this sort of thing with the console browser, and how to modify the code to handle any issues resulting from changes in element labeling.

I haven't tested this extensively, so this may break something else... But, here's the code change I made, if you're willing:

In the aforementioned App.js file, go to function hideQuickLaunch(), find the else block, and add in the following on Line 28:

$("div[class^='nav_']").hide();.

(Don't replace what was on Line 28, just add this line before that.)

After making this code change, you will need to repackage the solution and upload the new solution to your Apps Catalog in SharePoint.

@MBenson415
Copy link

MBenson415 commented Apr 16, 2019

I was able to fix this for the "Hide an Element" web part by going into \src\webparts\hideAnElement\App.js and making a minor code change. Looks like the "hide quick launch" functionality broke somewhat because MS changed something about the way the quick launch element was labeled. Frankly, I expect this to happen again at some point in the future, so it's good to know how to diagnose this sort of thing with the console browser, and how to modify the code to handle any issues resulting from changes in element labeling.
I haven't tested this extensively, so this may break something else... But, here's the code change I made, if you're willing:
In the aforementioned App.js file, go to function hideQuickLaunch(), find the else block, and add in the following on Line 28:
$("div[class^='nav_']").hide();.
(Don't replace what was on Line 28, just add this line before that.)
After making this code change, you will need to repackage the solution and upload the new solution to your Apps Catalog in SharePoint.

This was working really well until I checked it today (4/16/2019), when the left nav has once again re-appeared. Using the console browser, I believe the element has been relabed to spNav_cb2a1c59, but I am new to this. Would adding $("div[class^='spNav_cb2a1c59']").hide(); work?

@DRobinson-Informa
Copy link

This was working really well until I checked it today (4/16/2019), when the left nav has once again re-appeared. Using the console browser, I believe the element has been relabed to spNav_cb2a1c59, but I am new to this. Would adding $("div[class^='spNav_cb2a1c59']").hide(); work?

The short answer is that yes, that will probably work!

The longer answer is that the code is going to hide any div elements with a class value beginning with (^=) 'spNav_cb2a1c59'. I don't think that any other elements on the page will have this class value (or a class value that begins with this string), so you're probably fine. But, if you notice any other elements missing, you may want to change the ^= to = in that statement.

@MBenson415
Copy link

Hi! Thank you so much for the quick response.

Adding this line $("div[class^='spNav_']").hide(); to the else code block in App.js, repackaging and deploying, did the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants