DATx02-16-14 / Hastings

A project evaluating Haste.App and the suitability of Haskell for the web.
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Bug/don't remove sidebars #52

Closed Kalior closed 8 years ago

Kalior commented 8 years ago

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.

Tejpbit commented 8 years ago

Common

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

Game

createGameChangeNameDOM could use documentation

Travis

The travis build can be disregarded. I tried building locally, it works.

Kalior commented 8 years ago

Common

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.

Game

Will document this function.