-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
wip: adjustment reason edit with turbo-frame link and turbo template with no index #6045
Conversation
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.
I like this very much! I only would like us to still be able to render the new/edit routes.
There seems to be a syntax error, that's why the specs are still failing.
admin/app/controllers/solidus_admin/controller_helpers/turbo_actions.rb
Outdated
Show resolved
Hide resolved
@@ -64,8 +64,13 @@ | |||
end | |||
|
|||
describe "GET /edit" do | |||
it "renders the edit template with a 200 OK status" do | |||
it "redirects when the request is not Turbo-Frame" do |
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.
No, we want that these routes still accessible in ie. new tabs or tests w/o javascript.
admin/app/controllers/solidus_admin/adjustment_reasons_controller.rb
Outdated
Show resolved
Hide resolved
Test failures fixed in #6048 |
admin/app/components/solidus_admin/adjustment_reasons/index/component.rb
Show resolved
Hide resolved
@tvdeyen no worries, glad I could help! The only downside with it is that browser will make two GET requests to Also, with dedicated edit route there are few issues that I found:
I'm sure, though, that these could be fixed easily |
I cannot reproduce those in #6046 |
@tvdeyen nope, haven't checked it yet. Just double checked in my branch, the |
Can you check out my branch and verify if this is still the case for you? It is not for me locally and not in tests (they are all passing). I would prefer to continue the conversation as a review of #6046 as I updated a lot more components already. Thanks for all the great feedback. This really helps to fix the issues with the new admin |
perfect, let's proceed in #6046 |
closing in favour of #6046 |
Summary
This is a draft PR to collect feedback on the proposed solution. If it looks good, I'll make changes to other routes that open modals in admin.
This addresses #6014 (comment) as a potential solution to the index table being loaded on visiting a route rendered within a modal.
edit
componentChecklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: