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

Implementations of link_to should support rel attributes #3190

Closed
4 of 11 tasks
dark-panda opened this issue Aug 24, 2024 · 1 comment
Closed
4 of 11 tasks

Implementations of link_to should support rel attributes #3190

dark-panda opened this issue Aug 24, 2024 · 1 comment

Comments

@dark-panda
Copy link

I noticed that link_to/link was added recently to avo-menu and it broke a few things for me, which were easy to fix, but it would be nice to have compatibility with the regular link_to. The issue is that it errors out when using the rel named argument, which is passed to the a tag, i.e. <a href="foo" target="_blank" rel="noopener noreferrer">link</a>. This used to silently do nothing it appears, but now it errors out with a ArgumentError. Turns out that rel was not being passed to anything anyways, it just happily did not cause an issue. Modern browsers automatically add noopener to links with target="_blank", but I don't think noreferrer is automatically added. This might be a small leak of information that would be a good idea to avoid when setting up links to external sites.

Steps to Reproduce

Create a link using the menu builder and the link_to method. rel options error out presently. (V3.11.9 I believe.)

System configuration

Avo version: 3.11.9

Rails version: 7.2.1

Ruby version: 3.3.4

License type:

  • Community
  • Pro
  • Advanced

Are you using Avo monkey patches, overriding views or view components?

  • Yes. If so, please post code samples.
  • No

Screenshots or screen recordings

Additional context

https://discord.com/channels/740892036978442260/1138182212655788054/1276556608335249429

Impact

  • High impact (It makes my app un-usable.)
  • Medium impact (I'm annoyed, but I'll live.)
  • Low impact (It's really a tiny thing that I could live with.)

Urgency

  • High urgency (I can't continue development without it.)
  • Medium urgency (I found a workaround, but I'd love to have it fixed.)
  • Low urgency (It can wait. I just wanted you to know about it.)
@Paul-Bob
Copy link
Contributor

Paul-Bob commented Sep 3, 2024

Thanks for reporting this issue @dark-panda

We're working on it and tracking by #3199

Closing this one in favor of #3199

@Paul-Bob Paul-Bob closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants