-
Notifications
You must be signed in to change notification settings - Fork 20
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
[WIP] Closes #1406 - Sidebar nav changes #1835
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sidebar navigation supports unlimited levels. It doesn't look like the offcanvas nav is taking that into account.
Example on probo: https://7b5e2985-cedf-4a13-ab91-3a35916c835d--pr-1835.probo.build/pages/text
Example of more nav levels
Nav levels missing from mobile
Additionally, the lack of top margin for the navigation looks bad in my opinion.
But nice to see the navigation move to second sidebar. Since most of our users read left to right, my department considered the main page text to be most important text to read first and has had sidebar navigation on the right for many years.
I believe the increase of levels in the off-canvas nav is happening in a separate PR that will be related to the design mockups that are coming from the designers. Is that correct @danahertzberg ? |
Yes, this is correct |
I'm personally conflicted between adding or removing top margin. Please wait to merge until we run by leadership. |
It sounds like more workshop time needs to happen with this topic; there's some conflicting opinions on sidebar nav placement we should hash out. Going to postpone this PR until we can discuss it in another workshop. I also think it would be a good idea to remove the "hide on mobile" for the sidebar nav from this PR and instead add it to the PR that addresses adding more tiers to the off-canvas mobile nav. This PR should focus on moving (if still applicable after 2nd round group discussion) the block only. |
We need to compile a list of sites that might be negatively impacted by this 'automatic' change in sidebar position. |
Sounds good! Perhaps changes like moving sidbar nav to the right and/or removing top margin could be done for 'new' sites while 'existing' sites could keep things relatively as-is to reduce the potential for negative impact. For margin, that could mean using an update to put in an mt-4 or mt-5 for existing sites while keeping the default empty for new sites. |
Blocks or should be merged together with #1834 if merged. |
Bringing over Dana's comments from the issue to the PR:
|
PR is updated with latest requirement changes and is ready for re-review and/or approvals. |
@@ -46,7 +46,7 @@ | |||
{% set title_attributes = title_attributes.addClass('sr-only') %} | |||
{% endif %} | |||
{{ title_prefix }} | |||
<h2{{ title_attributes.setAttribute('id', heading_id).addClass('h4').addClass('mt-md-5') }}>{{ configuration.label }}</h2> | |||
<h2{{ title_attributes.setAttribute('id', heading_id).addClass('h4').addClass('mt-0') }}>{{ configuration.label }}</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change immediately affects existing sites. Please change to only affect new sites. If the idea is that such an update would come in another issue/PR, then this PR will be blocked until that is implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll supply a patch so we can test this in combination with the #1834 so we can test this easily on existing sites and figure out a way to do the least amount of harm.
I can't think of a way to only affect existing sites, without rewriting this template a bit first.
Steps would be:
- Move the added classes into a theme setting.
mt-0
- Add an update that adds the configuration setting, and sets it to what it was before this change.
mt-md-5
Not 100% sure that this will work ☝️ , so will need to test it.
The theory is that config distro will skip a changed value if using the merge strategy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, we can update this setting in bulk via drush on any sites we deem safe, after this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course this will most likely be a problem for any sites that have a sub theme with an overridden template and those added classes changed and are using {{title_attributes}}. Unless we don't add classes to title attributes in the .theme file, and instead add the classes to title_attributes within this template.
Patch for testing on existing sites. Add this to you're site specific composer.json.
Run Run Do not commit this to your main/master branch. Or add this to your live site, this should be throwaway code. |
Something like
|
To get comparison screenshots of existing sites in a multidev: |
In this specific example, the page content can be modified to get the desired look. Add bottom spacing to the Text on Media paragraph, and add the It will be important to see the distribution of how this change will look on various sites to determine impact. |
Here are some examples. I need to do more. https://docs.google.com/presentation/d/1ghzsQatd9bUAusnSIzzccpPVisp-DTy4wJwCA8ZM9dE/edit#slide=id.p |
Potential path forward:
This requires many configuration changes that are fragile. Will continue discussions int he workshop. Need more research on impact. |
Add default theme setting for block title margin class |
This may need to be revisited with the upcoming navigation changes led by central MarCom. |
Description
In an effort to improve content hierarchy (page title and secondary sidebar content), this PR moves the sidebar nav to the
sidebar_second
region, hides the sidebar nav on mobile (in favor of the off-canvas experience), eliminates the sidebar nav'sh2
margin-top, and consolidates sidebar mobile breakpoints to match the mobile nav breakpoint.Review site: https://7b5e2985-cedf-4a13-ab91-3a35916c835d--pr-1835.probo.build/
Related issues
Closes #1406
Related to #1834
How to test
Types of changes
Arizona Quickstart (install profile, custom modules, custom theme)
Drupal core
Drupal contrib projects
Checklist