excellenteasy / react-tile

A tile ui component to display text and other media.
2 stars 0 forks source link

Roadmap for react-tile #1

Open davidpfahler opened 9 years ago

davidpfahler commented 9 years ago

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

davidpfahler commented 9 years ago

Start with a mock

mock-tile

davidpfahler commented 9 years ago

Break the UI into a component hierarchy and post it here

mock-tile-hierarchy

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:

davidpfahler commented 9 years ago

Write unit tests and push to feature branch

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))
davidpfahler commented 9 years ago

Build a static version in React and push to feature branch

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.