Thanks @tbrisker! I will try to answer some of the points you mentioned
In case all (or most) of what the index.js file does is export the component, do we actually need an additional Component.js file?
I agree, I guess we could reduce one more file.
We still have a few components that use the “old” rails convention, so that we didn’t even finish the migration from the previous convention to the current one. How do we approach this migration in a manner that allows us to complete it before a new convention arises and we have 3 different conventions instead of 2?
Tough question, I guess it’s a matter of priority, and I wouldn’t ask devs to rewrite all of the components,
I guess that now as we are migrating more and more to PF4 we could refactor the whole folder,
but other than that, we should have some documentation on how to write a component and point it in new PRs, make everyone know this is the way we go… but I don’t see us refactoring old components honestly unless someone has the capacity for it of course.
With regards to helpers, I would suggest we only extract code to a helpers.js once the main file becomes too big to manage or there is some common logic that is repeated in multiple sub-components, as jumping back and forth between files makes following the data flow more difficult.
I am not sure what’s best, but personally, I would prefer to move helpers to helpers.js same as when we have subcomponent we would create a components/
dir for them usually.