Open davidpfahler opened 9 years ago
Component names aren't great, but it's a start. FormattedText
and TimeRelative
are component not necessarily bound to a tile, so I will not develop them in this project. To relevant hierarchy the is:
Harder than expected. Deferred until I understand react better. Related question here: reddit.com/r/react. I think I'll do something like this:
t.deepEqual((
React.createElement(<div>textcell</div>)
), React.createElement(TextCell))
Done. However, it turns out this is all we need, so next two steps are irrelevant here (for now).
Next up: write unit tests for current feature set, then for dreamcode feature set.
The idea here is to create a tile component that can render multiple types of content. That includes text, images, but also combine the two (i.e. background images). It should also allow for an icon overlay that indicates the type of content the tile stands for (play icon for a youtube video, photo icon for an instagram image etc.). It should automatically fit text to a useful font-size and cut text with ellipsis that is too long.
Steps
Inspiration: Thinking in React
Identify the minimal (but complete) representation of UI state, if any (post here)if the component has state, some tests should be passing, not all; write more test or rewrite if neededIdentify where your state should live, if anyAdd inverse data flow - almost certainly not needed, but for sake of completeness