You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
Gents, I've used mobylette on a few projects over the years and have had a few fallback issues at times -- I think I assumed they were all fixed in 3.x, but ran into a few again. So, first I wanted to start this discussion to see what the expected fallback behavior is.
Gherkin just for clarity...
Given the request for "pages#primary" is a mobile request
And "views/pages/primary.html.haml" exists
And "views/pages/primary.mobile.haml" does NOT exist
And the primary view template renders the "partial" partial
And "views/pages/_partial.html.haml" exists
And "views/pages/_partial.mobile.haml" exists
When the partial is rendered
I would expect the fallback behavior to result in:
Then the "_partial.mobile.haml" file is rendered
However my experience is:
I would expect the fallback behavior to be:
Then the "_partial.html.haml" file is rendered
There are similar behaviors with layout rendering.
What is the desired behavior form your perspective?
The text was updated successfully, but these errors were encountered:
I think that's exactly what I had in mind,
but there is another point we should consider, is that if the partial is crafted for the mobile layout/view, probably it will fit wrongly on the "desktop" one. What do you think?
Good question, but I don't think so, actually. The most straight forward
expectation to set is that if there is a mobile template available, it will
be used in a mobile request.
In fact, in my application, having a single HTML layout with certain
partials that are overridden for mobile is desired.
In that corner case you mention, the user could explicitly set the format
for the partial render to work around the expected behavior.
I think that's exactly what I had in mind,
but there is another point we should consider, is that if the partial is
crafted for the mobile layout/view, probably it will fit wrongly on the
"desktop" one. What do you think?
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/35#issuecomment-24724561
.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Gents, I've used mobylette on a few projects over the years and have had a few fallback issues at times -- I think I assumed they were all fixed in 3.x, but ran into a few again. So, first I wanted to start this discussion to see what the expected fallback behavior is.
Gherkin just for clarity...
I would expect the fallback behavior to result in:
However my experience is:
I would expect the fallback behavior to be:
There are similar behaviors with layout rendering.
What is the desired behavior form your perspective?
The text was updated successfully, but these errors were encountered: