Giter Site home page Giter Site logo

simple_navigation_bootstrap's Issues

Must click primary nav item twice to see secondary menu

I am trying to move our app away from the simple-navigation-bootstrap gem to this one and have managed to get everything working, but I have one problem: when I click on a primary item in the nav bar, I need to click it a second time to see the menu.

Is this expected behavior? Is there a way to configure it to display the menu on the first click?

Options specified in a nav item are being lost upon rendering

Thanks for developing this package. A similar package, simple-navigation-bootstrap is looking for a maintainer. You should consider taking it over. Your code seems better organized.

I am running into a problem where options, like icon: [fa fa-ticket] to disappear when our app uses this package. That means code like this:

    primary.item :ticket,
      "Ticket",
      url_for('//mycompany/ticket'),
      link_html: { target: '_blank' },
      icon: ['fa fa-ticket'],
      if: -> { can? :create, Ticket }

Now appears to ignore the icon: ['fa fa-ticket'] option. That snippet used to render as a small ticket icon followed by the word "Ticket" now renders as just "Ticket" with no icon. No CSS for the icon is present in the view.

I am investigating the problem, but cannot promise I will be able to deliver a fix.

Bootstrap4 Renderer not registering

For some reason I haven't been able to find, the Bootstrap4 renderer is not registering in my app. To try and figure this out, I added a test for the renderer registers for Bootstrap4 and got the same:

"Uninitialized constant "SimpleNavigationBootstrap::Bootstrap4"

I have tried my best to figure out why the Boostrap4 renderer isn't registering but no luck so far. I'm sure I'm overlooking something simple and will keep trying but thought I'd go ahead and report it.

Seeing Rails.logger.info messages with '#prepare_name' in development log

We use this gem in our production app and recently I noticed that every time the nav bar gets rendered a series of log messages of the form:

------------ #prepare_name: {:text=>"Inventory", :icon=>"fa fa-cube"}
------------ and is a Hash
------------ content_tag: <i class="fa fa-cube"></i> Inventory
------------ #prepare_name: Movements
------------ #prepare_name: Movements
...

I don't see this statement in the repo, but I did find it in the installed gem:

$ ack '#prepare_name'
.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/simple_navigation_bootstrap-1.0.1/lib/simple_navigation_bootstrap/bootstrap_base.rb
70:        Rails.logger.info "------------ #prepare_name: #{name}"

I am assuming it is debugging code that somehow escaped into the wild?

Navigation does not render correctly when using `level: 2`

I'm splitting my navigation into two seperate divs. One at the top and one as a sidebar.
simple-navigation provides a :level setting to archive this functionality (docs)

Using the Bootstrap3 renderer, the second menu is hidden (display: none;) as it is rendered like a dropdown menu.

View:

= render_navigation expand_all: true, level: 2

Navigation settings:

navigation.renderer = SimpleNavigationBootstrap::Bootstrap3
navigation.items do |primary|
    primary.item :main, 'Main', main_url do |sub_nav|
      sub_nav.item :sub, 'Sub', sub_url
    end
end

Level 2 should be rendered like level 1, level 3 like level 2 and so on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.