-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Phoenix.View and use the new Phoenix.Component structure #3055
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EMaksy It looks great.
The unique thing that we should do is to move the view
functions and files to the controller folders themselves, as suggested by phoenix documentation, and we should do the same in wanda, as we forgot. (we already discussed this offline as well)
b652ef3
to
2411447
Compare
Thanks for the review, as mentioned by @arbulu89 opened a follow up pr on wanda |
2411447
to
817e573
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor nitpicks
* Replace Phoenix.View from config * Update json rendering to 1.7 standards * Update VIEW test to JSON tests * Remove old views * Update html structure without Phoenix.View * Fix suse_manager_json rendering * Clean up code * Apply suggestions * Refactor function
Description
This PR has the main goal to update Trento Web console to Phoenix 1.7 standards
What has been done ?
Removed Phoenix.View and replaced it with Phoenix.Component/HTML
Updated configs for new html and json rendering
Replaced old view modules with json modules with new style of json rendering
Updated Projectors when required for JSON rendering
Added components/core component and layouts to fit new Phoenix directory structure
Updated heex templates
Added verified routes
Updated existing controllers for json rendering
Switched some functions to private when not used elsewhere
What has been not done?
Phoenix View was not completely removed as currently Swoosh still uses it, there are ways to remove Phoenix.View, but i would prefer to do it when Swoosh officially removes Phoenix.View.
Check out the discussion and official docs
This PR relates to wanda trento-project/wanda#513
How was this tested?
Updated all existing tests
Added test for about json view