Replies: 1 comment
-
|
Great question, I've wanted something like this myself in the past. Sending a header should be possible since the modal-or-not decision is made before the actual network request is made from the client. And adding the Rails helper can read off of that. This would also be safer than using reusing the JSON file since the client might have an override in the local (or outdated) path configuration. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Not an issue per-se, but more of a feature request/suggestion.
When I am rendering a page in a modal:
I sometimes need to render some things differently: for example skipping the navbar or the footer.
I somehow can of course re-use the json definition, to check if the current path matches a rule, and therefore understand if the page is being rendered in a modal, but I thought it would be much better to have a custom header from the client, and a
hotwire_native_modal?helper out-of-the-box.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions