Reasonable Layout
Markus Liebelt edited this page Jun 13, 2020
·
8 revisions
What are the problems that most of the people want to solve? See #158
- Have a consistent layout most of the time (without too much hassle).
- Have some useful defaults, if needed, but ensure that settings of the user will win.
Here are some examples, that may be relevant (or not, just collecting).
- Width (set by div), layout: top ==> Width == boardSize, movesHeight consistent (with a max height)
- Width, layout: left ==> width == boardSize + movesWidth. half / half would be consistent
- No width, boardSize, layout == top ==> Similar to the first one, on difference
- Create some basic examples for: layout == top|bottom|left|right
- Remove all styling that corresponds to layout: margin, padding, ...
- Remove all styling from the Javascript source code.
- Create for each example the corresponding CSS.
- Decide how to do the styling in Javascript: at the end once, in between, ...?
- Chessground has a default board size of 320px (if not set).
- Grid is possible to have a reasonable layout, but if elements are variable sized, it gets complex
- Moves height depends on the number of moves (and comments). If you reserve in top-layout 40% of the whole space for moves, that is too much. So perhaps there should be some heuristic:
- number of half moves == # vmin (but not more than 40%??)
- Moves height depends on the number of moves (and comments). If you reserve in top-layout 40% of the whole space for moves, that is too much. So perhaps there should be some heuristic: