Closed wang-li closed 2 years ago
Thank you very much for the instructions @vinaygaba! 🙏
I updated the commit, adding the relevant test and removing the previous unit tests changes in the showkase-browser-testing
to reduce the noise around this PR 😉
Thank you for taking the time to review my PR 🙏
Hey @vinaygaba 👋 Would it be possible to get a new release in order to benefit this fix through a gradle dependency? 🙏
@wang-li I was hoping to get one more change in before I do the next release. You can expect it tomorrow
Hey @vinaygaba 👋 Will there be a new release for this fix?
Overview
In this PR, I fixed the indentations in
ShowkaseBrowserWriter
so that it does not shift the code by a double indentation every time it generates code for a preview parameter provider.The results were asserted by looking at the generated files (the fixed indent is at line 101 in the following screenshots):
I also added the extension
withDoubleIndent { }
so that the indentations can safely unindent after the relevant block. This extension is based on the existingwithIndent { }
extension from Kotlin poet.Finally, I wanted to add a unit test to avoid this issue to resurface but I struggled to understand how the unit tests in
showkase-processor-testing
work... But I'm open for some guidance! 😄This fixes https://github.com/airbnb/Showkase/issues/257