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

Action resource breaks when switching between resources #3249

Closed
3 of 11 tasks
pjmuller opened this issue Sep 17, 2024 · 4 comments
Closed
3 of 11 tasks

Action resource breaks when switching between resources #3249

pjmuller opened this issue Sep 17, 2024 · 4 comments

Comments

@pjmuller
Copy link

Describe the bug

see screen recording: https://www.loom.com/share/18b5bdd56bd34ba182bac32e38484759

Steps to Reproduce

My resource files look like

    def actions
      action Avo::Actions::ExcelImport
   end

   self.index_controls = -> do
      action Avo::Actions::BulkEdit, icon: "heroicons/outline/paint-brush", style: :outline, title: "Bulk Edit", label: ""
      actions_list style: :primary, color: :primary, icon: "heroicons/outline/bars-arrow-down", label: "", title: "lists"
   end
end

Expected behavior & Actual behavior

actions are able to load everywhere

System configuration

Avo version: 3.12.0

Rails version: 7.2.1

Ruby version: 3.2.2

License type:

  • Community
  • Pro
  • Advanced

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

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

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

Hello @pjmuller I'm having a hard time simulating this on Avo demo https://main.avodemo.com

I guess that some project configuration is triggering that behavior.

reproduce_actions_bug.mp4

@pjmuller
Copy link
Author

@Paul-Bob ok, I'll try to nail it down what is causing it in our setup.
Challenge accepted :)

@Paul-Bob
Copy link
Contributor

Does it happen with all the actions or only with some specific ones?

@pjmuller
Copy link
Author

pjmuller commented Oct 2, 2024

@Paul-Bob after removing all my actions and only using #3218 I don't have this issue anymore 💪 .

So if other users ever encounter this, it's most likely a combination of the def actions and action lists within the self.index_controls = -> do that caused it (we weren't monkey patching anything there, so it's likely that other people will have this as well)

@pjmuller pjmuller closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants