You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have copy that is relevant for the entire flow and is re-used in multiple nodes. Currently we have no place to put shared copy and with existing copy tied to particular nodes or hard coded in view templates.
For example, flow title is used on the start pages and the captions above questions, however is specified in the "Start page" content file. Another example is the banner text for the "Next steps for you business", which appears on every node, however is hard coded in the view template for lack of a better place.
This leads to confusing patterns in the code, for example creating a StartNodePresenter just to access the flow title.
I'd like to propose introducing a separate file to specific shared content within the flow. This content is then accessible on any node. I'm unsure whether this should formatted like an existing ERB file, or just have a YAML files similar to locales.
We could re-purpose the top level lib/smart_answer_flows/<flow_name>.erb file (currently used for start page) for generic content and move the start page content to another file alongside the question and result content files e.g. lib/smart_answer_flows/<flow-name>/start.erb
The text was updated successfully, but these errors were encountered:
We have copy that is relevant for the entire flow and is re-used in multiple nodes. Currently we have no place to put shared copy and with existing copy tied to particular nodes or hard coded in view templates.
For example, flow title is used on the start pages and the captions above questions, however is specified in the "Start page" content file. Another example is the banner text for the "Next steps for you business", which appears on every node, however is hard coded in the view template for lack of a better place.
This leads to confusing patterns in the code, for example creating a StartNodePresenter just to access the flow title.
I'd like to propose introducing a separate file to specific shared content within the flow. This content is then accessible on any node. I'm unsure whether this should formatted like an existing ERB file, or just have a YAML files similar to locales.
We could re-purpose the top level
lib/smart_answer_flows/<flow_name>.erb
file (currently used for start page) for generic content and move the start page content to another file alongside the question and result content files e.g.lib/smart_answer_flows/<flow-name>/start.erb
The text was updated successfully, but these errors were encountered: