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

Secondary labels above each field #2604

Closed
4 of 11 tasks
krystof-k opened this issue Mar 16, 2024 · 7 comments
Closed
4 of 11 tasks

Secondary labels above each field #2604

krystof-k opened this issue Mar 16, 2024 · 7 comments
Labels
Bug Something isn't working

Comments

@krystof-k
Copy link
Contributor

Describe the bug

Discussed in #2578

I have duplicate labels above each input in edit view. When there is a translation for such field:

cs:
  activerecord:
    attributes:
      car:
        make: Značka

it is even translated:

image

Expected behavior & Actual behavior

There are no secondary labels.

Models and resource files

System configuration

Avo version: 3.5.3

Rails version: 6.1.7.7

Ruby version: 3.1.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

view_component version is 3.11.0

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 Paul-Bob added the Bug Something isn't working label Mar 18, 2024
@Paul-Bob Paul-Bob moved this to To Do in Issues Mar 18, 2024
@Paul-Bob
Copy link
Contributor

I'm not able to reproduce it, can you please provide a minimal reproduction repository? It only need to include an app with avo installed and 1 resource where this is happening

@krystof-k
Copy link
Contributor Author

I will try, but I'm afraid I will not be able to… If you have any idea where to start digging in our app I'll try.

@Paul-Bob
Copy link
Contributor

I would start by inspecting the element and try to figure out where is it rendered in the component

@adrianthedev
Copy link
Collaborator

Closing this as we can't reproduce it.
If you can create a reproducible repo we'll gladly have a look.

@github-project-automation github-project-automation bot moved this from To Do to Done in Issues May 30, 2024
@krystof-k
Copy link
Contributor Author

@adrianthedev Sure, thanks, I will try to investigate this as soon as I have a while and get back.

@krystof-k
Copy link
Contributor Author

krystof-k commented Jun 18, 2024

I found it. It was caused by Foundation Rails Helper used in our legacy app, which adds labels to all form fields. The fix was to disable it in config/initializers/foundation_rails_helper.rb:

FoundationRailsHelper.configure do |config|
  config.auto_labels = false
end

So not an issue related to Avo (or – just to the fact that it is Rails engine).

@adrianthedev
Copy link
Collaborator

Wow. What a wild find!
Thank you so much for posting this!
I don't know if I could have found it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants