? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
15 May 2017

Pull Request for Issue #15892

Summary of Changes

This PR adds the use of localStorage to save the state of the sidebar (open/closed). Upon page refresh it wil automatically open or close the sidebar based on the state it was in before.

Testing Instructions

1.

  • Apply patch (sidebar should be open)

2.

  • Close the sidebar
  • Refresh the page
  • Sidebar should stay closed

3.

  • Open the sidebar
  • Refresh the page
  • Sidebar should stay open

@dgt41 I've added the test to see if localStorage can be used in the core.js, so you can use this from now on. Just do if (Joomla.localStorageEnabled()) { ... }

avatar C-Lodder C-Lodder - open - 15 May 2017
avatar C-Lodder C-Lodder - change - 15 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 May 2017
Category JavaScript Administration Templates (admin)
avatar C-Lodder C-Lodder - change - 15 May 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 15 May 2017
avatar dgt41
dgt41 - comment - 15 May 2017

@C-Lodder do we need this check?
Looking at https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage it should be available for all supported browsers in J4

avatar C-Lodder
C-Lodder - comment - 15 May 2017

Yup, but if the user has it disabled on their browser for some reason, then this is just a sanity check to prevent any console errors, which may then stop something else from working.

avatar brianteeman
brianteeman - comment - 15 May 2017

brings up a good point though - do we have a list of supported MOBILE browsers

avatar dgt41
dgt41 - comment - 15 May 2017

@brianteeman no AFAIK

avatar C-Lodder
C-Lodder - comment - 15 May 2017

@brianteeman - You're not going to want to keep the sidebar open on mobile as it will take up most of the screen.

avatar brianteeman
brianteeman - comment - 15 May 2017

@C-Lodder it was an offtopic comment that we should probably have a list of supported mobile browsers. And don't forget some "mobile" browsers run on very large devices now. Mobile browser doesn't equal small screen.

avatar brianteeman
brianteeman - comment - 16 May 2017

I have tested this item ? unsuccessfully on 8c94b9d

With this PR certain views end up with an empty space at the side


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16036.
avatar brianteeman brianteeman - test_item - 16 May 2017 - Tested unsuccessfully
avatar C-Lodder
C-Lodder - comment - 16 May 2017

which views?

avatar brianteeman
brianteeman - comment - 16 May 2017

before pr

screenshotr17-27-35

after pr

screenshotr17-28-19

avatar brianteeman
brianteeman - comment - 16 May 2017

@C-Lodder you were too fast i was uploading the images ;)

avatar C-Lodder
C-Lodder - comment - 16 May 2017

Will fix tomorrow morning

avatar C-Lodder C-Lodder - change - 24 May 2017
Labels Added: ?
avatar C-Lodder
C-Lodder - comment - 24 May 2017

@brianteeman - Fixed the edit views. Would you mind retesting please?

avatar wilsonge wilsonge - change - 29 May 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-29 09:02:45
Closed_By wilsonge
avatar wilsonge wilsonge - close - 29 May 2017
avatar wilsonge wilsonge - merge - 29 May 2017

Add a Comment

Login with GitHub to post a comment