This follows the pattern we established for Hanami actions in https://github.com/hanami/controller/pull/320 and makes it so that an "application view" has all of its configuration applied from a matching Hanami.application.config.views application-level config object.
Along with this, this includes a few adjustments to make it so that the Hanami::View.config includes all the necessary settings that are required for application views (instead of some settings having to reside exclusively within the application config). This includes:
A new handling of the paths setting for application views: if the application’s own “paths” setting is a relative path, then it will now be appended onto the application provider’s root path (e.g. the slice or application root paths). This makes it possible to configure a standard “sub-path” at the application level that will then work for views in any given slice.
A new template_inference_base setting, which will currently be used only when auto-inferring template names for application views. Later on, I might consider supporting template name inference in general (i.e. even for views used outside Hanami applications, but this this is outside the scope of this PR).
This follows the pattern we established for Hanami actions in https://github.com/hanami/controller/pull/320 and makes it so that an "application view" has all of its configuration applied from a matching
Hanami.application.config.views
application-level config object.Along with this, this includes a few adjustments to make it so that the
Hanami::View.config
includes all the necessary settings that are required for application views (instead of some settings having to reside exclusively within the application config). This includes:paths
setting for application views: if the application’s own “paths” setting is a relative path, then it will now be appended onto the application provider’s root path (e.g. the slice or application root paths). This makes it possible to configure a standard “sub-path” at the application level that will then work for views in any given slice.template_inference_base
setting, which will currently be used only when auto-inferring template names for application views. Later on, I might consider supporting template name inference in general (i.e. even for views used outside Hanami applications, but this this is outside the scope of this PR).