Navigation: Theme aside layout builder section on navigation block page

Created on 10 May 2024, 11 months ago
Updated 16 September 2024, 7 months ago

Problem/Motivation

Layout builder region on Navigation block page is breaking when collapsed.

Steps to reproduce

1. Install navigation module.
2. Go on admin/config/user-interface/navigation-block/ page
3. Collapse the left side bar.
4. Uncheck 'Show content preview'
5. You'll see the design is breaking.
6. See image for reference

Proposed resolution

Fix the styling of collapsed aside region.

Solution - I have fixed the font size and reduced the padding on nav.

Remaining tasks

User interface changes

After Fix -

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

RTBC

Version

11.0 🔥

Component
Navigation 

Last updated about 21 hours ago

No maintainer
Created by

🇮🇳India gauravvvv Delhi, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @gauravvvv
  • 🇮🇳India sanket.tale

    Hi @Gauravvvv Could you please provide any styling recommendations? Here's how I styled it and will modify it if necessary.

  • 🇮🇳India ahsannazir

    i could think of reducing the font-size to 1rem but still it the labels are not fully visible due to very less space available.
    Attaching screenshot how it looks with font-size of 1rem.

  • Merge request !86023446433: Navigation theme aside styling → (Closed) created by sanket.tale
  • Pipeline finished with Failed
    9 months ago
    Total: 218s
    #212802
  • 🇮🇳India sanket.tale

    Hi, Created MR for the issue please review it. Thanks!

  • Status changed to Needs review 9 months ago
  • Pipeline finished with Failed
    9 months ago
    Total: 4126s
    #212813
  • Pipeline finished with Failed
    9 months ago
    Total: 211s
    #212861
  • Pipeline finished with Success
    9 months ago
    Total: 633s
    #212867
  • Status changed to Needs work 9 months ago
  • 🇺🇸United States smustgrave

    Issue summary should be updated to include the solution and after screenshots.

    Don't need a code snippet but what was actually fixed.

  • 🇮🇳India ahsannazir

    The layout builder section seems fixed in collapsed state by reducing the font-size and paddings. Attaching screenshot|

  • Status changed to Needs review 9 months ago
  • 🇮🇳India Kanchan Bhogade

    I've tested MR 8602 on Drupal 11.x
    MR is applied cleanly...

    Testing steps:
    1. Install the navigation module.
    2. Go to admin/config/user-interface/navigation-block/ page
    3. Collapse the left sidebar
    4. You'll see the design is breaking.
    5. Appy MR and check for the same

    Test Result:
    The layout builder section is fixed in the collapsed state and visually looks good.
    Attaching SS for reference
    RTBC+1

    Keeping "needs review" for code verification

  • Pipeline finished with Success
    9 months ago
    Total: 511s
    #214468
  • Status changed to Needs work 9 months ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    The navigation sidebar typically has icons:

    it seems like the issue reporter and everyone working on this issue are getting a version of the sidebar that is providing the alt text instead of the icons. This is not something I'm able to reproduce, but considering multiple contributors are seeing the exact same thing, I have to assume there are fairly straightforward steps beyond those in the issue summary to and this should be documented. I'm also not sure how to get it where layout builder can be used on a navigation block as seen in the screenshots, so that would be good to include in the issue summary as well.

    If the icons aren't showing up, there are already problems happening and making this look nicer isn't bad but probably not a major priority. We should ensure nothing in this MR conflicts with the correctly-loading Navigation bar.

  • 🇷🇸Serbia finnsky

    Imo simplest option here will be always expanded sidebar on that page(on desktop). ignoring user setting.

  • 🇮🇳India ahsannazir

    @finnsky Does #13 mean that when "show content preview" is unchecked we have to expand the toolbar even it is already in collapsed state?

  • 🇳🇿New Zealand quietone

    Fixes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.

  • Status changed to Needs review 8 months ago
  • Status changed to Needs work 8 months ago
  • 🇷🇸Serbia finnsky

    Added 2 comments.

  • Pipeline finished with Success
    8 months ago
    Total: 550s
    #244315
  • Pipeline finished with Success
    8 months ago
    Total: 1394s
    #245237
  • Pipeline finished with Success
    8 months ago
    Total: 457s
    #245276
  • Status changed to Needs review 8 months ago
  • Status changed to Needs work 7 months ago
  • 🇮🇳India nayana_mvr

    I have verified the changes in MR !8602 and it fixes the issue mentioned in the ticket. Please find the before and after screenshots.
    As suggested by @finnsky, I tried to place the layout builder related code change of core/modules/layout_builder/css/layout-builder.pcss.css in core/modules/navigation/css/base/layout-builder.pcss.css. But the styles are getting overridden and I'm not sure !important should be used in such cases. Is it really necessary to move this code?

    Regarding

    this is another (design) problem. not strictly required here imo

    , I also feel like it can be removed from this MR as it is not relevant for this issue and also it is causing misalignment of logo on collapsed mode (Please see the screen recording)

  • 🇷🇸Serbia finnsky

    But the styles are getting overridden and I'm not sure !important should be used in such cases. Is it really necessary to move this code?

    !important definetly should NOT be used by anyone anywhere anytime ;)

    - you can remove :where and it will increase CSS specificity

  • Status changed to Needs review 7 months ago
  • 🇮🇳India nayana_mvr

    Thanks! @finnsky for the suggestion. I removed :where and added .navigation-layout to increase CSS specificity because even after removing :where, style was getting overridden . Also, I have removed admin-toolbar.css changes as per review comment. Please see the attached screenshot as a reference to these changes.

    Kindly review.

  • Status changed to RTBC 7 months ago
  • 🇷🇸Serbia finnsky

    LGTM. Thank you!

  • 🇳🇿New Zealand quietone

    I didn't find any unanswered questions here. I can't comment further on CSS issues. Leaving at RTBC

    • nod_ committed c05d7345 on 10.3.x
      Issue #3446433 by sanket.tale, ahsannazir, nayana_mvr, gauravvvv,...
    • nod_ committed 9be6e1c3 on 10.4.x
      Issue #3446433 by sanket.tale, ahsannazir, nayana_mvr, gauravvvv,...
    • nod_ committed 0d81ddd1 on 11.0.x
      Issue #3446433 by sanket.tale, ahsannazir, nayana_mvr, gauravvvv,...
    • nod_ committed ba3a786b on 11.x
      Issue #3446433 by sanket.tale, ahsannazir, nayana_mvr, gauravvvv,...
  • 🇫🇷France nod_ Lille

    Committed and pushed ba3a786beca to 11.x and 0d81ddd1910 to 11.0.x and 9be6e1c3cc7 to 10.4.x and c05d734567b to 10.3.x. Thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024