Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Next #1370

Closed
3 of 12 tasks
steida opened this issue Jun 24, 2017 · 4 comments
Closed
3 of 12 tasks

Next #1370

steida opened this issue Jun 24, 2017 · 4 comments

Comments

@steida
Copy link
Contributor

steida commented Jun 24, 2017

The next Este is in the next brach, jfyi.

@steida
Copy link
Contributor Author

steida commented Jun 29, 2017

Switch to Relay Modern ASAP because we need unique fragments for static queries generation. Also, generated Flow types will be better I believe. apollo-codegen seems to be limited by design.

apollographql/apollo-tooling#154

steida added a commit that referenced this issue Jun 30, 2017
@christophediprima
Copy link

@steida
Copy link
Contributor Author

steida commented Jul 16, 2017

Yep.

@steida
Copy link
Contributor Author

steida commented Aug 6, 2017

Done.

@steida steida closed this as completed Aug 6, 2017
steida added a commit that referenced this issue Aug 10, 2017
* Deps

* Simplify .babelrc for Jest

* styled props

- explicit context, because hoc typing sucks
- tests
- improved global styles
- and more

* Upgrade flow-bin, prop-types, flow-typed defs

* Fix link on pages index

* Wow, redux connect flow type inference works 100%

So we can remove unnecessary types.

* Update README.md

* Use real button with global reset

Less hacking

* all still doesn't work with flow v0.46.0

* Fix radio bug

* For future Relay Modern

* Fix link

* Update flow type defs

Yay, rada compose is fully typed!

* Update Apollo integration by updated Next.js example

* WIP: redux flat fields

* Move app higher order component to components dir

* Jest 20

* WIP

fields HOC is just a smart redux connect

* WIP

* Deps

* Rename Buttons to Fieldset

* Merge Field into TextInput

It belongs there.

* fields hoc

So this is super minimal typed implementation or previous Este fields.
But, it is really abstraction do we need?

* Fix TextInput test

* Deps

* WIP

- Rename Fields to Forms. It makes more sense, because we are dealing
with objects, not scalars.
- Normalise mutation API. Let’s have onPress for buttons, and onChange
for fields with value. No onTextChange nor onValueChange naming madness.
- onChange and onPress are required. That’s because… fields need it.
- Remove fields, it was wrong idea.

* Deps

* Remove unused code

* New Redux POC

- Remove payload mannerism
https://twitter.com/estejs/status/865686279702315008
- Change forms states manualy. Almost.
- I think we are close.

* Super minimal typed Redux form

- it’s fast, immutability ftw
- it’s typed (but flow sucks, Not covered by Flow for no reason, damn)
- it’s really easy and explicit

* Add yarn run upgrade

yarn upgrade should be enough, but node_modules can be misused, so
purge them to be sure

* eslint-config-airbnb 15

* Reuse existing type

* Flow...

* Ok, this seems to be good enough. Still weird a bit.

* A brand new simple yet powerful component ➡ Set

- It's something like Fieldset, but for everything. It has vertical and
spaceBetween props. A small thing but utterly useful.
- remove button margin horizontal, it’s up to Set
- move TextField error after label
- update deps
- some refactoring and progress here and there

* Add redux-persist

And now, all forms are automatically persisted in local storage.
Awesome.

* Improve storage keyPrefix

* Deps

* WIP

* Upgrade graphql, graphql-tag, flow-bin

* Simplify Checkbox and Radio, make label optional

Still, it should be one component imho.

* WIP

- forms reducer considered as anti-pattern

* Deps

Ramda 0.24 after it will be tested

* Delete selected users

* wip

- rename TOGGLE_SELECTED_USERS to TOGGLE_USERS_SELECTION
- emoticons in table headers
- small changes here and there

* redux-observable ftw

- universal UUID
- hot reloading reducers and epics stubs
- lib/form for reduceForm helper
- refactor user actions
- etc.

* Make reducers and epics hot reloadable

* Select user, fix things

* Finish redux forms logic example

- Now it is super fast by default
- Two simple rules: Do not nest state selections and… if needed, use
redux-virtualised.

* TextInput label size

It looks better when it’s the same.

* Deps

* yarn run prettier

* Yep, Node 8.0.0

* Move user table stuff to users-form

* Deps

* Beautify UsersTable

* Downgrade Node to 7.8.0

Because HMR is broken in 8.0.0

* Finish forms

- Fix things here and there.
- Render BrowserButton as div, because Firefox is a bitch.
- Add Form onSubmit, because div can’t submit. But that’s fine for
React Native.
- Fix Set alignItems

* Use React Children type

* Remove Redux actions boilerplate

- With Flow, we don’t need it.
- Epics deal with plain objects already.
- Better typing, more explicit code.
- Use explicit action names instead onFooBla naming patter.

* Rename AppState to ConfigState

Because it is.

* Fix bug, improve types to prevent it

* Inject typed dispatch

It’s better than cast it later.

* Prettify

* import type { Element } from 'react'

* WIP

- Add ValidationError and ValidationErrors types
- Simplify Form type props, add errors
- Require maxLength prop on TextInput
- Add ValidationError component
- Small changes here and there

* Deps

* Small Redux refactoring

* Form goodness ftw

- AppError type and component for app errors.
- ValidationError type and component, for guess what.
- Fix autoFocus via Focused component. It just works.
- Naive validation in epic.
- Some refactoring here and there.
- Esc to cancel editation mode.
- Soft some airbnb eslint rules.

* Clean UserForm

* Rename Focused to AutoFocus

* Simplify ValidationError

= {} because existential operator not yet in JS, but, soon will be.

* autoFocus scrollIntoView failback

* Deps

* Add required validation to Checkbox

* Flow 48, React 15.6

* Add validator

* No, maxLength should not be required.

It should be ok to overflow text length during editation for UX. Must
be validated elsewhere.

* Simple typed sync validation

* Node 8 and Next beta 3

* Prettier trailing comma for all

We can, because Node 8.

* Deps

* Improve validation

- Rename FormError to Errors, because we can validate any object.
- Rename error to appError, be explicit.
- Refactor validate to not break rxjs typing.

* Todo

* next 3.0.0-beta16

* Rename config back to app

* simulateUserSave

Insight, global app errors must be still app state locally saved to
specify context of error. Can be rendered as some global animated popup
on mobiles, but it’s just matter of UI.

* Improve AutoFocus scrolling logic. Scroll less.

* Add form disabled state

- Improve persist strategy. This is the best.
- Improve typing.

* Deps

* Improve Flow types

- remove hacky dispatch injection, be explicit
- because we are explicit, type checking is strict, not foking Not
covered shit.
- * aka existential type help a lot

* Validation for user table

- Even non-table tables can have growing rows, with little trick.
- AlertErrors component to render errors.

* Rename deploy-now to deploy

* Fela 5

* test

test test

* revert

* test

* test

* test

I am testing new Atom Github integration.

* ok

https://twitter.com/estejs/status/877296988068478977

* Rename fela.js to fela-renderer.js

* Basic intl

* Add support for multiple languages

- LocaleLink rewrites href if needed
- Fix .babelrc
- Preload app server state
- Add one msg
- etc.

https://medium.com/@steida/este-strategy-for-i18n-multiple-languages-8a0
f0162f176

* Next 3.0.1-beta.1

* Should not be required. Let's see.

* Comment rimraf-babel-cache

* Fix client / server rendering.

- server app state must be passed as initial
- fela must always clear itself

* I18n switch-locale

- fixes here and there

* Root href for default locale

* Improve react-intl flow types

 flow-typed/flow-typed#981

* I18n almost done

- use intl babel only for build, because build
- inject intl into all pages
- main-nav (like any other nav) reads from sitemap
- sitemaps defines pages and their titles
- improve i18n, extract messages should not be a part of build
- localize pages
- fixes here and there

* Do not pass serverState to Page

* Sort extracted messages

* Add basic buttons with translations

* Next 3.0.1-beta.2, dips

* I18n validation errors and other things

* Add some i18n examples

* Localize app error

* yep

* Prettier 1.5

* Comment not yet used code

* Add fixed Apollo Flow typedefs

* Remove misleading comment

* Add Apollo page

* Deps

* Add webpack-bundle-analyzer

* Remove apollo Flow

#1370 (comment)

* Use get-schema for versioning graph.cool

* Color 2 and Flow 0.49.1

* Add Loading component

* Deps

* Next 3.0.1-beta.6

* Add onSubmitEditing for TextInput

* Add Apollo example

* graph.cool CLI is cool

* Remove flex-start from Set

We don’t need it and it complicates layout.

* Yay finally, Eslint errors as warnings for dev.

* Add correct justifyContent for Checkbox and Radio

* Add SignIn page with AuthForm

Note super nice hack to overrideWebkitYellowAutofill.

* Localize AuthForm

* An optional onChange for Radio and Checkbox

* Add userGender typed enum

* Add alignContent to Box

* Fix bug in AlertErrors

* Deps

* Improve forms a lot!

- less typing, because better model
- faster, because less diff checks
- solved form disabled with Temp once for all. We don’t have to
customise persistence any more
- better types here and there

* TextInputBig

* Deps

* Remove flow ignore auth0-lock

I am not going to use it anyway. Client side code look bad and
graph.cool is working hard on that.

* Next 3.0.1-beta.9

And we can remove Flow ignore mitt.

* Remove withTheme, welcome injectTheme HOC

* Rename ThemeProps to ThemeProp

* Rename noFormId to initialFormId

Naming is hard.

* Deps

* Add default TextInput maxLength

* Fok that shit. Return withTheme.

Flow can’t reliable type inference HOC, so avoid it with withTheme, and
when we can’t, we have to redeclare exported type manually. Shit.
ReasonML ftw.

* Fok that shit.

* Deps

* Improve TextInputBig error

* SignIn client side and app errors

* Deps

* camelCase for gql queries

* Add ApolloClient and ServerState types, add apolloClient as dependency

* Update readme

* Auth progress

- Merge signIn and signUp actions into single auth action.
- Improve naming and translations.
- Add mutateAuth.
- Use exact type in app state as much as possible.

* Add AppError cannotSignInCredentialsInvalid

* Add cookie auth

* Deps with fix for react-apollo

apollographql/react-apollo#826 (comment)
5212452

* Auth resetStore and redirect

* Flow 0.50

* Deps

* Next.js 3.0.1-beta.14

* Fix bug

Damn dynamic code…

* Remove Apollo

* Add Relay

- move data stuff to data dir
- get actual graph.cool schema

* Next 3.0.1-beta.16

* Remove Apollo-client types

* From kebab-case to case sensitive file names

kebab-case seems to be Next.js standard, but case sensitive is React
Create App and Relay standard. I like it more when file names match JS
names.

* Temp commit before checkout

Damn, git handling case sensitive renaming.

* git mv foo.js Foo.js ftw

* Refactor gender into pure type

* Flat functional structure ftw

https://twitter.com/estejs/status/887109974018666496

* Disable eslint camelcase

* Fix yarn run relay, add comment to package.json 😱

https://medium.com/@steida/package-json-scripts-with-comments-771a364336
31

* Rename nom script relaySchema to schema

After all, it’s GraphQL anyway.

* Deps

* Add missing dep, relay-runtime

* Render posts with Relay Modern

Static queries with nested Relay containers is such a good design.

* Put Flow __generated__ into repo

To be honest, it’s because npm run relay does not work in Zeit now. I
also tried now files, but it seems to override everything else.

The good thing is, we can see and repo check generated Flow types.

* Relay 1.2.0-rc.1, fix Now deploy

* Improve npm script prettier

* Remove graphql dependency

import { graphql } from 'react-relay'; ftw

* Leverage process.env.NOW_URL

And fix naming ofc.

* Explain why TextInput maxLength is optional

* Going to respect React recommended naming for event handlers

It’s handler, so handle it. Also, onFooBla is event dispatcher name,
not the handler. OK.

* Deps, CreatePost, refactoring

I am pretty sure Redux will be replaced with declarative local state
based on Relay. Until it happen, we use redux for side effects and
handle all mutations in epics.

Soon, we will have app page Query with pending navigations and global
error handling. So close!

* Rename add to create

To be the same as GraphQL scheme.

* createRelayEnvironment, refactoring

* Flow 0.51

* Refactor, collocate, and simplify Flow types

Read IMPORTANT ADVICE! In types/index.

* Add CreatePost validation, refactoring

* Fix test file names casing

* yarn relay

* Improve AppError

* Create post

* createCommit helper

Remove RelayEnvironment. No type placeholders until properly flow-typed.

* Extract DeletePostButton

- rename Remove to Delete, because CRUD
- extract, because reusability

* Simplify imports

* Refactoring

* Fix typo

CREATE_USER_ERROR to CREATE_POST_ERROR

* Refactor AppError

While ValidationErrors are rendered locally, global app error should be
rendered globally and once.

* Remove AlertErrors

* Delete post

* Deps and little things here and there

* Pending navigations

After so many years of weak abstractions, we finally have it. Pending
navigations without pain. This is gold.

* Fix clientMutationId

It’s relic of iOS Relay. Not sure why it’s still required.

* Fix for CI

http://facebook.github.io/jest/docs/en/snapshot-testing.html#snapshots-a
re-not-written-automatically-on-continuous-integration-systems-ci

* Fix CI

* Add first query variable

- fix rerending for the same url
- rename environment to getEnvironment

* Rename AllPosts to Posts

* Simplify DeletePostButton

Optimistic mutations don’t need Redux with observables to handle async
properly.

* Test circle ci 2

* Try add watchman

* Temp fix for circle ci 2

* ups

* try deploy to now from circleci

http://macklin.underdown.me/2017/07/27/deploy-to-now-from-circleci

* maybe

* OK, doesn't work for some reason

* Deps

* Relay Modern auth mutations, refactoring

* Fix AppError to now cover whole width

* Deps

* Comments

* Deps

* Add auth cookie

* Switch to next DB

Old demo links should work.

* Flow 0.52

* Email auth is done

* Back to default db

* Deps

* Enable flow linting

And disable some warnings

* Improve GraphQL example

* Add gravatar

* Cleaning

* Fix extractMessages

* Add confirm components

I think it’s very nice pattern.

* Error reporting with Sentry

* Deps & Fixes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants