How to handle complete rewrite of a file in regards to code review

by Kodos Johnson   Last Updated November 08, 2018 20:05 PM

My situation is this: I am contributing to a Symfony/PHP project. I had to completely reskin one page in the application. The controller logic is almost totally unchanged. I only had to change the template file (named index.html.twig). But the changes are completely different. If I make a pull request with these changes against the RC branch, the diff for this pull request will be all over the place. For some reason this seems wrong to me. Since this template file is a "new" change, I'm currently getting around this issue by creating a new file named "index_new.html.twig" and changing the controller logic to reference this file. That way when I make a pull-request, the template file will be displayed as a new file and it will be obvious that the controller references the new file. But this also seems wrong because it seems to be a hacky solution. Also, what if this page is redesigned again? I might have to do "index_new_new.html.twig".

What is the optimal way to deal with this situation?



Related Questions