Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On a fresh hydra development instance, I'm getting this unhelpful error message on My jobs.
This PR adds the ability for lazy tabs to show the
error()
given.I am taking my first steps into the world of Perl, so this is possibly a bad implementation of a good idea. I am open to critique and to suggestion to make this better.
These are also my first steps in Hydra and its internals, which means the same, it might be unoptimally implemented. The idea here is to touch the smaller amount of things to implement this.
The way it is implemented, this allows
error()
in a "lazy" route to implicitly use a partial view for the error messages, and to document the fact that this is still to be rendered as-is using the custom header as the side-channel.Ideally, I would like to instead use an attribute
:Lazy
on the route's method, but I have no idea how it works, if it's possible or if it's a good idea. Adding this attribute could also allow other automatisms, like using the full URL for the resource, with a special header (e.g.X-Hydra-Wants-Lazy
), and render only the tab with the header, and the full layout with pre-baked tab on a normal navigation to the route. (Using HTML5 history navigation would allow us to change the URL when loading the tab via ajax.)