hanami-view/CHANGELOG.md

239 lines
9.6 KiB
Markdown
Raw Permalink Normal View History

# Hanami::View
View layer for Hanami
2020-01-17 09:47:10 +00:00
## v2.0.0.alpha8 - 2022-05-19
### Added
- [Tim Riley] Access a hash of template locals via accessing `locals` inside any template
### Changed
- [Tim Riley] Removed automatic integration of `Hanami::View` subclasses with their surrounding Hanami application. View base classes within Hanami apps should inherit from `Hanami::Application::View` instead.
2022-03-08 10:59:35 +00:00
## v2.0.0.alpha7 - 2022-03-08
### Added
- [Luca Guidi] Automatically inject the app's `settings` and `assets` components (if present) into instances of `Hanami::View::ApplicationContext`
- [Luca Guidi] Temporarily added to `Hanami::View::ApplicationContext` the `#content_for`, `#current_path` `#csrf_token` helpers, ported from the hanami-2-application-template. Some of those helpers will be moved to `hanami-helpers` gem in a later release.
### Changed
- [Sean Collins] For views within an Hanami application, changed default location for templates from "web/templates" to "templates"
- [Luca Guidi] For views within an Hanami application, the default `part_namespace` is now `"view/parts"` (previously `"views/parts"`)
## Fixed
- [Luca Guidi] Application-level configuration is now applied to `Hanami::View` subclasses, no matter how deep their inheritance chain (e.g. app base view -> slice base view -> slice view)
2022-02-09 08:48:10 +00:00
## v2.0.0.alpha6 - 2022-02-10
### Added
- [Luca Guidi] Official support for Ruby: MRI 3.0 and 3.1
### Changed
- [Luca Guidi] Drop support for Ruby: MRI 2.3, 2.4, 2.5, 2.6, and 2.7.
2022-01-12 11:41:26 +00:00
## v2.0.0.alpha5 - 2022-01-12
### Added
- [Marc Busqué] Automatically provide access to Hanami application routes helper as `routes` in default application view context (`Hanami::View::ApplicationContext`)
2021-11-09 12:31:36 +00:00
## v2.0.0.alpha3 - 2021-11-09
2021-11-07 11:51:03 +00:00
### Added
- [Pablo Vicente] Raise `LayoutNotFoundError` exception with friendlier, more specific error message when layouts cannot be found
2020-01-17 09:47:10 +00:00
2021-11-07 12:05:32 +00:00
### Changed
- [Tim Riley] (Internal) Updated settings to use updated dry-configurable `setting` 0.13.0 API
2021-11-07 11:51:03 +00:00
## v2.0.0.alpha2 - 2021-05-04
2019-03-05 22:41:56 +00:00
### Changed
- [Tim Riley] Replaced entire gem with dry-view (now renamed to hanami-view). See [dry-view's documentation](https://dry-rb.org/gems/dry-view/) for its capabilities and [the dry-view changelog](CHANGELOG.dry-view.md) for its history.
2020-01-20 11:49:26 +00:00
## v1.3.1 - 2019-01-18
### Added
- [Luca Guidi] Official support for Ruby: MRI 2.6
- [Luca Guidi] Support `bundler` 2.0+
2020-01-20 11:49:26 +00:00
## v1.3.0 - 2018-10-24
2019-03-05 22:41:56 +00:00
## v1.3.0.beta1 - 2018-08-08
### Fixed
- [Ferdinand Niedermann] Ensure to set `:disable_escape` option only for Slim and don't let Tilt to emit a warning for other template engines.
- [glaszig] Ensure partial rendering to respect `format` overriding
2019-01-26 09:18:13 +00:00
## v1.2.1 - 2018-10-16
2019-01-26 09:18:13 +00:00
### Added
- [Luca Guidi] Introduced new, backward compatible, signature to render a layout for testing purposes (eg. `ApplicationLayout.new({ format: :html }, "contents").render`)
2019-01-26 09:18:13 +00:00
2020-01-17 09:47:10 +00:00
### Fixed
- [Luca Guidi] Ensure layout to be rendered when using HAML 5
- [Luca Guidi] Ensure to raise `NoMethodError` when an unknown method is invoked by a view/template
2020-01-17 09:47:10 +00:00
## v1.2.0 - 2018-04-06
2020-01-17 09:47:10 +00:00
## v1.2.0.rc2 - 2018-04-06
2020-01-20 11:49:26 +00:00
## v1.2.0.rc1 - 2018-03-30
2020-01-20 11:49:26 +00:00
## v1.2.0.beta2 - 2018-03-23
## v1.2.0.beta1 - 2018-02-28
2019-01-01 08:38:46 +00:00
## v1.1.2 - 2018-04-10
2019-01-01 08:38:46 +00:00
### Fixed
- [Luca Guidi] Ensure to be able to use `exposures` even when they aren't duplicable objects
2019-01-01 08:38:46 +00:00
## v1.1.1 - 2018-02-27
2018-10-21 22:12:13 +00:00
### Added
- [Luca Guidi] Official support for Ruby: MRI 2.5
2018-10-21 22:12:13 +00:00
### Fixed
- [Alfonso Uceda] Ensure that `exposures` are properly overwritten for partials when `locals:` option is used
2020-01-20 11:49:26 +00:00
## v1.1.0 - 2017-10-25
2020-01-20 11:49:26 +00:00
## v1.1.0.rc1 - 2017-10-16
2018-06-12 22:52:13 +00:00
## v1.1.0.beta3 - 2017-10-04
2018-02-19 22:53:33 +00:00
## v1.1.0.beta2 - 2017-10-03
2018-02-19 22:53:33 +00:00
### Added
- [Luca Guidi] Added `Hanami::Layout#local` to safely access locals from layouts
2018-02-19 22:53:33 +00:00
## v1.1.0.beta1 - 2017-08-11
### Fixed
- [yjukaku] Raise `Hanami::View::UnknownRenderTypeError` when an argument different from `:template` or `:partial` is passed to `render`
2018-01-23 11:35:39 +00:00
## v1.0.1 - 2017-08-04
2018-01-23 11:35:39 +00:00
### Added
- [Luca Guidi] Compatibility with `haml` 5.0
2018-01-23 11:35:39 +00:00
## v1.0.0 - 2017-04-06
2020-01-20 11:49:26 +00:00
## v1.0.0.rc1 - 2017-03-31
2018-01-23 11:35:39 +00:00
## v1.0.0.beta2 - 2017-03-17
### Changed
- [Luca Guidi] Remove deprecated `Hanami::View::Rendering::LayoutScope#content`
2017-11-01 05:06:15 +00:00
## v1.0.0.beta1 - 2017-02-14
2017-11-01 05:06:15 +00:00
### Added
- [Luca Guidi] Official support for Ruby: MRI 2.4
- [Vladimir Dralo] Allow `View#initialize` to splat keyword arguments
2017-11-01 05:06:15 +00:00
## v0.8.0 - 2016-11-15
### Fixed
- [Luca Guidi] Ensure `Rendering::NullLocal` to work with HAML templates
2017-11-01 05:06:15 +00:00
### Changed
- [Luca Guidi] Official support for Ruby: MRI 2.3+ and JRuby 9.1.5.0+
2017-11-01 05:06:15 +00:00
## v0.7.0 - 2016-07-22
2017-05-14 04:59:15 +00:00
### Added
- [Luca Guidi] Introduced `#local` for views, layouts and templates. It allows to safely access locals without raising errors in case the referenced local is missing.
2017-05-14 04:59:15 +00:00
### Fixed
- [nessur] Find the correct partial in case of deeply nested templates.
- [Marcello Rocha] Ensure `Hanami::Presenter` to respect method visibility of wrapped object.
- [Luca Guidi] Ensure to use new registry when loading the framework
2017-05-14 04:59:15 +00:00
2020-01-17 09:47:10 +00:00
### Changed
[Luca Guidi] Drop support for Ruby 2.0 and 2.1. Official support for JRuby 9.0.5.0+.
[Luca Guidi] Deprecate `#content` in favor of `#local`.
2020-01-17 09:47:10 +00:00
## v0.6.1 - 2016-02-05
2017-01-31 03:40:06 +00:00
### Changed
- [Steve Hook] Preload partial templates in order to boost performances for partials rendering (2x faster)
2017-01-30 10:08:47 +00:00
### Fixed
- [Luca Guidi] Disable Slim autoescape to use `Hanami::View`'s feature
2017-01-30 10:08:47 +00:00
## v0.6.0 - 2016-01-22
### Changed
- [Luca Guidi] Renamed the project
2017-01-30 00:24:47 +00:00
## v0.5.0 - 2016-01-12
2020-01-17 09:47:10 +00:00
### Added
- [Luca Guidi] Added `Lotus::View::Configuration#default_encoding` to set the encoding for templates
2020-01-17 09:47:10 +00:00
### Fixed
- [Luca Guidi] Let exceptions to be raised as they occur in rendering context. This fixes misleading backtraces for exceptions.
- [Martin Rubi] Raise a `Lotus::View::MissingTemplateError` when rendering a missing partial from a template
- [Luca Guidi] Fix for `template.erb is not valid US-ASCII (Encoding::InvalidByteSequenceError)` when system encoding is not set
2020-01-17 09:47:10 +00:00
2017-01-30 00:24:47 +00:00
### Changed
- [Liam Dawson] Introduced `Lotus::View::Error` and let all the framework exceptions to inherit from it.
2017-01-30 00:24:47 +00:00
## v0.4.4 - 2015-09-30
### Added
- [Luca Guidi] Autoescape for layout helpers.
2020-01-20 11:49:26 +00:00
## v0.4.3 - 2015-07-10
### Fixed
- [Farrel Lifson] Force partial finder to be explicit when to templates have the same name.
2020-01-20 11:49:26 +00:00
## v0.4.2 - 2015-06-23
### Fixed
- [Tom Kadwill] Ensure views to use methods defined by the associated layout.
## v0.4.1 - 2015-05-22
### Added
- [Luca Guidi] Introduced `#content` to render optional contents in a different context (eg. a view sets a page specific javascript in the application template footer).
2016-07-06 23:40:41 +00:00
## v0.4.0 - 2015-03-23
2016-07-06 23:40:41 +00:00
### Changed
- [Luca Guidi] Autoescape concrete and virtual methods from presenters
- [Luca Guidi] Autoescape concrete and virtual methods from views
2016-07-06 23:40:41 +00:00
### Fixed
- [Tom Kadwill] Improve error message for undefined method in view
- [Luca Guidi] Ensure that layouts will include modules from `Configuration#prepare`
2020-01-20 11:49:26 +00:00
## v0.3.0 - 2014-12-23
### Added
- [Trung Lê] When duplicate the framework, also duplicate `Presenter`
- [Benny Klotz] Introduced `Scope#class`, `#inspect`, `LayoutScope#class` and `#inspect`
- [Alfonso Uceda Pompa & Trung Lê] Introduced `Configuration#prepare`
- [Luca Guidi] Implemented "respond to" logic for `Lotus::View::Scope` (`respond_to?` and `respond_to_missing?`)
- [Luca Guidi] Implemented "respond to" logic for `Lotus::Layout` (`respond_to?` and `respond_to_missing?`)
- [Jeremy Stephens] Allow view concrete methods that accept a block to be invoked from templates
- [Peter Suschlik] Implemented "respond to" logic for `Lotus::Presenter` (`respond_to?` and `respond_to_missing?`)
- [Luca Guidi] Official support for Ruby 2.2
2020-01-20 11:49:26 +00:00
### Changed
- [Alfonso Uceda Pompa] Raise an exception when a layout doesn't have an associated template
2016-07-06 23:40:41 +00:00
### Fixed
- [Luca Guidi] Ensure that concrete methods in layouts are available in templates
- [Luca Guidi] Ensure to associate the right layout to a view in case fo duplicated framework
- [Luca Guidi] Safe override of Ruby's top level methods in Scope. (Eg. use `select` from a view, not from `::Kernel`)
2016-04-21 00:56:14 +00:00
## v0.2.0 - 2014-06-23
2016-04-21 00:56:14 +00:00
### Added
- [Luca Guidi] Introduced `Configuration#duplicate`
- [Luca Guidi] Introduced `Configuration#layout` to define the layout that all the views will use
- [Luca Guidi] Introduced `Configuration#load_paths` to define several sources where to lookup for templates
- [Luca Guidi] Introduced `Configuration#root` to define the root path where to find templates
- [Luca Guidi] Introduced `Lotus::View::Configuration`
- [Grant Ammons] Allow view concrete methods with arity > 0 to be invoked from templates
- [Luca Guidi] Official support for Ruby 2.1
2016-04-21 00:56:14 +00:00
### Changed
- [Luca Guidi] `Rendering::TemplatesFinder` now look recursively for templates, starting from the root.
- [Luca Guidi] Removed `View.layout=`
- [Luca Guidi] Removed `View.root=`
### Fixed
- [Luca Guidi] Ensure outermost locals to not shadow innermost inside templates/partials
2016-04-21 00:56:14 +00:00
## v0.1.0 - 2014-03-23
### Added
- [Luca Guidi] Allow custom rendering policy via `Action#render` override. This bypasses the template lookup and rendering.
- [Luca Guidi] Introduced `Lotus::Presenter`
- [Luca Guidi] Introduced templates rendering from templates and layouts
- [Luca Guidi] Introduced partials rendering from templates and layouts
- [Luca Guidi] Introduced layouts support
- [Luca Guidi] Introduced `Lotus::View.load!` as entry point to load views and templates
- [Luca Guidi] Allow to setup template name via `View.template`
- [Luca Guidi] Rendering context also considers locals passed to the constructor
- [Luca Guidi] Introduced `View.format` as DSL to declare which format to handle
- [Luca Guidi] Introduced view subclasses as way to handle different formats (mime types)
- [Luca Guidi] Introduced multiple templates per each View
- [Luca Guidi] Implemented basic rendering with templates
- [Luca Guidi] Official support for Ruby 2.0