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
Reload icon #2386
Reload icon #2386
Conversation
Code Climate has analyzed commit f26b716 and detected 0 issues on this pull request. View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach
# API
field :reviews, as: :has_many, reload_button: do
current_user.admin?
end
field :reviews, as: :has_many, reload_button: true
# in ResourceIndexComponent
<%= render Avo::PanelComponent.new(description: description, data: { component: 'resources-index' }, display_breadcrumbs: @reflection.blank?, reload_button: reload_button) do |c| %>
- add option on
hasBaseField
- add concern with
reload_icon
- js controller will find its own parent turbo frame
- if it can't find the parent don't do anything
- if it finds it, reload it
- use
reload_button: :visible
on the field declaration - in
ResourceIndexComponent
we should take this option value and pass it to thePanelComponent
- in resource index component we have access to the field if it's a reflection field
- the option should be
false
by default - this option should be available for all
has_
fields - remove the SVG file
- use the
svg
helper to load the SVG
nice to have
- the option should support the
ExecutionContext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super job!
Thanks @gabrielgiroe1.
I left a few comments to tweak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't need this file once you rebase.
#2453 brought this icon to our repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has not been addressed.
We can remove this file now that we updated heoricons.
2651454
to
bfc9854
Compare
let's try this approach for feedback.
|
Description
Fixes #2172
Checklist:
Screenshots & recording
Manual review steps
Manual reviewer: please leave a comment with output from the test if that's the case.