Closed Kalior closed 8 years ago
addChildrenToParent
feels impure. It's used three times in the Common module and nowhere else.
addChildrenToParent'
feels more pure. I think these functions should switch names with each other.
If this switch is done then update the usages in Game module and any other places they are used.
It could be nice to explicitly export functions from the Common module. i.e
module Views.Common (
initDOM
createBootstrapTemplate
... etc
) Where
createGameChangeNameDOM
could use documentation
The travis build can be disregarded. I tried building locally, it works.
I agree wholly to the points made in Common. Not sure, however, if they belong in this branch, maybe they should rather be made in a refactor branch.
I actually think the addChildrenToParent
function can be removed entirely since it is always used in a context where one knows the Elem
.
Will document this function.
Also changed structure of some of the DOM elements to make that possible. Not sure if it's in line with intended structure or not. The Game and Lobby does no longer create their own BootstrapTemplates, rather a lobby-wide one called Hastings is created. Perhaps @Kerp1 could have a look at it.
Also now creating the input fields for changing nick name and changing game name now have separate methods.