Releases: rx/presenters
Releases · rx/presenters
v3.0.0-beta.3
3.0.0-beta.3 (2021-06-07)
Bug Fixes
- added cli --version (4c5b10e)
- added missing prepare context callbacks to Rails Engine (bafa36d)
- added prepare context for Rails native views engine that sets the request and session automatically (a09f3c6)
- Added version.rb to plugin generator (f1f2092)
- Added version.rb to plugin generator (35187bf)
- expanded plugin generator to include github semantic release, demo pom and sample README (06de7a2)
- fixed unordered list partial rendering error (014f1d1)
- generator not compatible with COPRL 3 Rails templating naming conventions (f6d80f0)
- removed google_map built in plugin to its own plugin (a34290d)
Features
- Added singular alias for common actions: load, replace, post, create, and delete (b57c305)
v3.0.0-beta.2
v3.0.0-beta.1
3.0.0-beta.1 (2021-06-02)
- Coprl module rename and Rails 5 and 6 native views (#318) (8acafd5), closes #318 #309 #317 #316 #315 #314 #313 #312 #311 #310 #316 #315 #314 #313 #312 #311 #310
BREAKING CHANGES
Migrating from Presenters v2 to COPRL Presenters v3
Clients
- Refactor module Voom => Coprl
- Replace in requires in app and lib files 'voom' => 'coprl'
Plugins
The plugins have been modified to support Rails native views.
There is a generator that you can also use to generate a new plugin: coprl generate plugin PLUGIN_NAME
.
In some cases generating a new plugin and moving over the code may be the preferred option.
The rest of this guide assumes you are going to migrate it over manualy.
Module Rename
- Rename library directory
lib/voom
=> 'lib/coprl' - Refactor module
Voom
=>Coprl
- Replace in
lib
files 'voom/' =>coprl/
View Changes
In the Coprl::Presenters::Plugins::PLUGIN_NAME::WebClientComponents
Add the following callback that points to your views directory
def view_dir_PLUGIN_NAME(pom)
File.join(__dir__, '../../../../../../..', 'views', 'components')
end
- Add an
application
directory under your view directory returned above. - Add a
_
prefix to your templates. - Change erb render calls in your templates
erb :"components/event"
=>partial "components/event"
- Add raw calls to any javascript/css that you emitt from your templates, e.g.,
<%= raw File.read(File.expand_path('../../../../../../public/c3.min.css', __dir__) ) %>
Recommended
Move templates, javascript and css files into their own view directory at the root of the presenter.
This makes it easier to reason and find the appropriate parts of the plugin
v2.1.1
v2.1.0
v2.0.3
v2.0.2
v2.0.1
Rails 6 compatible
- Upgrade to Zeitwork 2 .
- Add image grid component.
- Add unordered list component.
- Bring back autocomplete text field.
- Dialog width/height can now be set as a percentage of the page.