-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render ingredients as view components
Instead of rendering the view partial of the ingredient we render it view component instead. Deprecates the ingredients view partials.
- Loading branch information
Showing
24 changed files
with
126 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::AudioView.new(audio_view) -%> | ||
<%- ingredient_view_deprecation_notice(audio_view, __FILE__) -%> | ||
<%= render audio_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::BooleanView.new(boolean_view) -%> | ||
<%- ingredient_view_deprecation_notice(boolean_view, __FILE__) -%> | ||
<%= render boolean_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<%= render Alchemy::Ingredients::DatetimeView.new( | ||
datetime_view, | ||
<%- ingredient_view_deprecation_notice(datetime_view, __FILE__) -%> | ||
<%= render datetime_view.as_view_component( | ||
**local_assigns.slice(:options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Alchemy::Ingredients::FileView.new( | ||
file_view, | ||
link_text: local_assigns.fetch(:options, {})[:link_text], | ||
html_options: local_assigns.fetch(:html_options, {}) | ||
<%- ingredient_view_deprecation_notice(file_view, __FILE__) -%> | ||
<%= render file_view.as_view_component( | ||
**local_assigns.slice(:options), | ||
**local_assigns.slice(:html_options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<%= render Alchemy::Ingredients::HeadlineView.new( | ||
headline_view, | ||
<%- ingredient_view_deprecation_notice(headline_view, __FILE__) -%> | ||
<%= render headline_view.as_view_component( | ||
**local_assigns.slice(:options), | ||
**local_assigns.slice(:html_options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::HtmlView.new(html_view) -%> | ||
<%- ingredient_view_deprecation_notice(html_view, __FILE__) -%> | ||
<%= render html_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Alchemy::Ingredients::LinkView.new( | ||
link_view, | ||
text: local_assigns.fetch(:options, {})[:text], | ||
html_options: local_assigns.fetch(:html_options, {}) | ||
<%- ingredient_view_deprecation_notice(link_view, __FILE__) -%> | ||
<%= render link_view.as_view_component( | ||
**local_assigns.slice(:options), | ||
**local_assigns.slice(:html_options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::NodeView.new(node_view) -%> | ||
<%- ingredient_view_deprecation_notice(node_view, __FILE__) -%> | ||
<%= render node_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::PageView.new(page_view) -%> | ||
<%- ingredient_view_deprecation_notice(page_view, __FILE__) -%> | ||
<%= render page_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<%- options = local_assigns.fetch(:options, {}) -%> | ||
<%= render Alchemy::Ingredients::PictureView.new( | ||
picture_view, | ||
show_caption: options.delete(:show_caption), | ||
disable_link: options.delete(:disable_link), | ||
srcset: options.delete(:srcset), | ||
sizes: options.delete(:sizes), | ||
picture_options: options, | ||
html_options: local_assigns.fetch(:html_options, {}) | ||
<%- ingredient_view_deprecation_notice(picture_view, __FILE__) -%> | ||
<%= render picture_view.as_view_component( | ||
**local_assigns.slice(:options), | ||
**local_assigns.slice(:html_options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<%= render Alchemy::Ingredients::RichtextView.new( | ||
richtext_view, | ||
plain_text: local_assigns.fetch(:options, {})[:plain_text], | ||
<%- ingredient_view_deprecation_notice(richtext_view, __FILE__) -%> | ||
<%= render richtext_view.as_view_component( | ||
**local_assigns.slice(:options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::SelectView.new(select_view) -%> | ||
<%- ingredient_view_deprecation_notice(select_view, __FILE__) -%> | ||
<%= render select_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Alchemy::Ingredients::TextView.new( | ||
text_view, | ||
disable_link: local_assigns.dig(:options, :disable_link), | ||
html_options: local_assigns.fetch(:html_options, {}) | ||
<%- ingredient_view_deprecation_notice(text_view, __FILE__) -%> | ||
<%= render text_view.as_view_component( | ||
**local_assigns.slice(:options), | ||
**local_assigns.slice(:html_options) | ||
) -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= render Alchemy::Ingredients::VideoView.new(video_view) -%> | ||
<%- ingredient_view_deprecation_notice(video_view, __FILE__) -%> | ||
<%= render video_view.as_view_component -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters