Closes #2768
Issue #2768 was created because a way how to limit a page to be only
available under the root page was unknown.
The implementation has allowed this for a while now, but the issue was
not closed (presumably due to missing documentation).
The documentation of the `parent_page_types` filed now includes this
"special" case.
* Add bars.svg icon
* Add Open/Close button for mobile mode
* Completely hide sidebar in mobile mode
* mobile state tweaks
* Rename 'open' to 'visibleOnMobile'
* Don't initialise 'collapsed' state based on screen size (old code)
* Remove main.sidebar--open (not used)
Co-authored-by: Storm Heg <storm@stormbase.digital>
- Due to how high-contrast mode works, there was no visual separation between the sidebar and the main content, adding a transparent border resolves this without having any visual impact in non-high contrast mode
- fixes #7456
is_ajax is scheduled for removal in Django 4.0, since Django no longer considers the X-Requested-With header as a definitive indicator of whether the request came from Javascript. On that logic, there is no real value in enforcing it in our AJAX-only views, and there's no harm in removing it (it just means that if anyone ever does make a non-AJAX request to that URL, they'll get an HTML fragment back rather than a 400 error, which is equally good at communicating the message that the URL endpoint isn't directly usable in the browser).
This test class is mistakenly testing the site_history view - see the `get()` method. The workflow_history view doesn't have any filtering options, so there's nothing to test here.
Attempting to call get_image_model or get_document_model at the top level of a models.py file currently fails with "Models aren't loaded yet". This can be avoided by passing `require_ready=False` to apps.get_model.
This change makes it possible for third-party apps to define abstract models with foreign key references to the possibly-custom image or document model (which can then be subclassed into concrete models in the project itself - defining concrete models in the third-party app probably still isn't safe, as the model will end up being baked into the third-party app's migrations).
* Fix left padding not changing fast enough
* Make all icons stay in a fixed Y position
So they don't move when you hover
* Make the Wagtail a bit bigger in collapsed mode
* Fix position of search icon when expanding/contracting menu
* Animation refinements
* Fix gap between icon and text changing for legacy icons during collapse
* Only peek the menu if the mouse hovers over a menu
This fixes an issue where peeking wouldn't happen if you collapsed the
menu and then hovered over a menu item without the mouse leaving the
sidebar. It now always peeks when the user hovers the menu item.
But we still want to avoid it peeking when the user clicks the collapse
button, so I've moved the mouse enter/leave handlers to a sub-element
that doesn't include this button.
* Peek the sidebar on focus
Allows the sidebar to open when it receives keyboard focus, and stops it
annoyingly closing while you are typing a search query.
* Remove the start peeking timeout
* Make more panels type collapsible
* Remove duplicate js in homepage template
* Move collapsible code into its own js file
* Change $li to $target in collapsible.js, as in #6342 Closes #7364, #6342, #6187, #2123
Co-authored by: Fabien Le Frapper <contact@fabienlefrapper.me>
Co-authored-by: Robbie Mackay <rm@robbiemackay.com>
Co-authored-by: Scott Cranfill <scott.cranfill@jpl.nasa.gov>
Have confirmed that this doesn't strip out any context variables that we do rely on - IndexView is the only thing descending from the generic base template which customises the header beyond title/subtitle/icon, and it does that by explicitly passing parameters to `include`, not by having them floating around in the template context.