Skip to content

Changes needed for custom renderers? #199

@gltarsa

Description

@gltarsa

Did the requirements for a custom renderer change when your gem moved from v3 to v4?

We have been using simple-navigation for some time in conjunction with an add-on gem to include bootstrap rendering. Recently, I needed to use the link_html feature and upgraded to 4.0.3 so that I could use it. The add-on gem is no longer actively maintained, but another user posted a PR to get it working with 4.0.3, I pulled those changes into a private repo and link_html work for me now. However, the new combination of 4.0.3 + add-on now appears to ignore other options, so that code like this:

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

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.

The changes to the custom renderer were minimal and there appears to be nothing there that would explain this. I read the article in the Wiki on custom renderers and spent some time verifying that the add-on gem appears to adhere to those guidelines. I also noticed that it is circa 2013 and that got me wondering if there is more to building a custom renderer for simple-navigation V4.

Any insights into this issue would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions