We are ready to create a Full React view, starting with the Audits page. I wrote a component that is essentially app/views/layouts/_application_content.html.erb in React.
When rendering a React page, application_content.html.erb should not be rendered,
We thought the best approach is to create a class ReactController < ApplicationController that will contain a boolean telling the Layout its a React View. Thoughts?
@TimoGoebel I think it is going to be blocker issue because we still don’t have a ready solution for extending react components/pages.
I love the idea of using ReactController
I afraid boolean telling the layout what kind of layout to render can lead us to abuse it in a way we will start add if react do .. else do .. in too many places.
I prefer a solution when we have different layout files for react pages. (we can reuse whatever stay the same between layouts).
This is basically the approach @amirfefer and I went throw when we implemented the POC for SPA:
This functionality was broken when the audit page was moved to react. I just noticed now. I believe we need a solution for this. Plugin’s are key to Foreman’s success in the community and we’re currently doing a great job making it hard for plugin authors.