chronoscio / frontend

Frontend repository for the ChronoScio project
https://chronoscio.now.sh
GNU General Public License v3.0
3 stars 0 forks source link

Add basic UI components #10

Closed amaury1093 closed 6 years ago

amaury1093 commented 6 years ago

Add some basic UI in this PR. Note: nothing is connected to the backend yet, there is a temporary mockData.ts file which holds some fake territories of one nation, which evolves over time.

Edit: sorry about the git avatars not being there, i got a new computer, but forgot to do git config...

vercel[bot] commented 6 years ago

This pull request is automatically deployed with Now.

To access deployments, click Details below or on the icon next to each push.

amaury1093 commented 6 years ago

Fixing Now deployment

amaury1093 commented 6 years ago

Yes, thanks for the comments.

amaury1093 commented 6 years ago

I was looking at the alternatives of a React date picker component, but didn't find the perfect one:

I'm looking for one where it's easy to navigate between years.

Didn't try others yet. I'll try some others later, maybe in another PR. If not, then I'll create a custom datepicker (probably will be based on airbnb's one).

For now, in the scope of this PR, I'll use the HTML5 one.

quorth0n commented 6 years ago

Yeah I'd say react-dates with some customization is probably the best option. Have you seen https://github.com/airbnb/react-dates/pull/1106? It looks like this recent PR might help us out a bit for our customization. Why do you want to avoid moment.js? Also, might be worth noting the design of the date picker in a game that a lot of our mappers play. It's unique but is pretty intuitive and makes it easy to select dates. The arrows above and below the year allow you to change by century/decade/year, a fourth for millennia might suit this project. screenshot 2018-08-21 at 6 00 04 pm

amaury1093 commented 6 years ago

Yes, I saw that PR, that's what I meant by "some design work" in my previous message, we needed to design the month/year selector ourselves. But this comment https://github.com/airbnb/react-dates/pull/1106#issuecomment-395693542 seems to be cool.

I really like the game one. react-dates + this customization would be really nice.

I want to avoid moment because of the bundle size: see https://github.com/moment/moment/issues/3376 or tons of other articles on the net.