Skip to content
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

Changes needed for custom renderers? #199

Closed
gltarsa opened this issue Jan 12, 2017 · 2 comments
Closed

Changes needed for custom renderers? #199

gltarsa opened this issue Jan 12, 2017 · 2 comments

Comments

@gltarsa
Copy link

gltarsa commented Jan 12, 2017

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.

@andi
Copy link
Collaborator

andi commented Jan 17, 2017

Could you provide the code for the custom renderer you use?

@n-rodriguez
Copy link
Contributor

@andi andi closed this as completed Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants