Buggy display of Navigation Additional region, Navigation Main

Created on 31 December 2022, almost 2 years ago
Updated 10 April 2024, 8 months ago

Problem/Motivation

templates/navigation/menu--main.html.twig uses mr-auto class which is replaced by me-auto in bootstrap 5.2.
https://git.drupalcode.org/project/bootstrap5/-/blob/3.0.x/templates/nav...

adding search form to region Navigation Additional causes odd display:

Steps to reproduce

Add user menu and search form to Navigation Additional region

Proposed resolution

Add user ability to set CSS class on regions inside navbar (Additional, Main, Branding) this allows fixing odd display and also gives ability to control items display.

Remaining tasks

review and community test

User interface changes

added 3 textfields in settings form

API changes

n/a

Data model changes

Added 3 theme configuration options that allow adding classes to navigation regions additional, main and branding:
b5_nav_additional_class,
b5_nav_main_class,
b5_nav_branding_class

๐Ÿ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

๐Ÿ‡ต๐Ÿ‡ฑPoland prauat Wroclaw

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia jannakha Brisbane!

    - Main menu mr-auto is fixed by ๐Ÿ“Œ Various CSS fixes Fixed
    - Any new features should be put into a separate feature request issue (so bugs and new features are not mixed)
    - Rather than creating multiple configuration settings (config settings for each region - as regions can change within sub-themes), it's preferable to create sub-theme and customise CSS as required
    - Please run PHPCS before creating patches to keep coding standards

  • Status changed to Active over 1 year ago
  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    The elements around Search still look funny, so the problem isn't really fixed ... Perhaps we can re-open the issue, and find a solution?

  • ๐Ÿ‡ต๐Ÿ‡ฑPoland prauat Wroclaw

    @jannakha no it's not adding configurable classes should be preferred solution instead of adding more and more CSS which is then removed in various fixes. Moreover you're sacrificing the ease of use for normal user because when making subtheme advanced users can change regions?

    What about settings that are not used anywhere but still display on settings page?
    https://git.drupalcode.org/project/bootstrap5/-/blob/1.1.x/src/SettingsM...

    $form['body_details']['b5_top_container_config'] = [
          '#type' => 'textarea',
          '#title' => t('Website container type configuration'),
          '#default_value' => theme_get_setting('b5_top_container_config'),
          '#description' => t("Format: <classes|label> on each line, e.g. <br><pre>container|fixed<br />container-fluid m-0 p-0|fluid</pre>"),
        ];
    

    Correct me if I'm wrong but what is the purpose of this? As I haven't found it anywhere in the code beside SettingsManager.

    At last for customize CSS I though that bootstrap is used to limit bothering with CSS to minimum and reuse prepared CSS.

    Please forgive me I've forgot about phpcs because being in rush to deploy website.

    @ressa Yes.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ravi kant Jaipur

    ravi kant โ†’ made their first commit to this issueโ€™s fork.

  • @ravi-kant opened merge request.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ravi kant Jaipur

    I have resolved issue and created a PR.

  • Assigned to Jay Jangid
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Jay Jangid

    I have reviewed patch #2 and implemented the merge request !41 provided by @ravi kant.
    The patch & MR! has been implemented successfully.
    Result:- Above issue resolved.
    I am attaching my screenshot for your reference. Please review.
    And Thank You.

  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia snehal-chibde

    Hello, the MR gets applied successfully, patch #2 fails.
    Added screenshots for reference.

  • Hi

    I'm new to Drupal (one week) and I want to use this theme. I installed both version with composer and the problem persists. I don't know how to merge or apply the patch. Is ti possible to explaim me please?

    Thanks

Production build 0.71.5 2024