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

Fela #1281

Merged
merged 196 commits into from
Jan 1, 2017
Merged

Fela #1281

merged 196 commits into from
Jan 1, 2017

Conversation

steida
Copy link
Contributor

@steida steida commented Jan 1, 2017

No description provided.

- typed style hoc ftw
- note about circular dependencies
- refactoring
Need to update to flow 0.35 to continue, because invariants.
# Conflicts:
#	package.json
#	yarn.lock
- fontSizes and sizes, good to remember
- values are reused
- <Style /> pattern
- etc.
Remove unused APP_STORAGE_LOADED action.
- Exact type restricts allowed props, which is the must for good DX.
- With $Keys<T>, we can extract keys from any type.
- Autocomplete doesn’t work with the {[key: Key]: Bla }, but we don’t
need that anymore with exact object type.

https://flowtype.org/docs/objects.html#exact-object-types
- Native exact type doesn’t work with spread nor intersection yet,
fortunately we can replace it with custom Exact type.
- For Theme, we can’t use native exact type nor Exact type, because the
first doesn't support spread nor intersection and the second doesn’t
support autocomplete.
- For app state, I decided to use Exact anyway, since strictness is
more important then autocomplete here.
- For Style, I decided to use plain object checking, since we can’t
detect custom Fela strings anyway.
- Note pattern, plain type A, in export Exact<A>.

Why all of that? The simple reason. We want to detect misspelled
component props. I we are there :-)

I believe this is the best trade-off we can have for now. Of course,
there is always room for more strictness.
I decided to not allow any open color in color property. Semantic
colors should be good enough. Anyone can add new semantic key, or read
from theme.colors.open directly in custom components.

Tie your hands to free your mind!
It’s a place specific component.
Yes. H1, H2, P, OL, UL, etc. is just garbage. Not existing in RN
anyway. We don’t need it. But we should add accessibility metas, of
course.
@steida
Copy link
Contributor Author

steida commented Jan 1, 2017

I burn a lot of life energy in that.

@steida steida merged commit 1aaa22e into master Jan 1, 2017
@steida steida deleted the fela branch January 5, 2017 02:12
matejkriz pushed a commit to actum/devstack that referenced this pull request Jan 9, 2017
Merge branch 'upstream/master' into este-merge/server

* upstream/master: (29 commits)
  Add Fela to readme
  Clean obsolete todos in code
  Consistent flow type annotation
  Webpack2 Close este#1248 (este#1285)
  Ups, mistake.
  Fix merge
  Radio button (este#1284)
  SVG Checkbox (este#1283)
  Improve Baseline
  Update README.md
  Update deps.
  Implement custom Baseline
  Fela (este#1281)
  Upgrade react-redux to v5 (este#1279)
  Add backgroud_color to manifest (este#1278)
  Fix este#1030, gulp android on Windows (este#1277)
  Update redux repo url in readme (este#1274)
  Update .eslintrc (este#1262)
  RN 0.39, Close este#1258
  Add comment explaining algebraic types
  ...

# Conflicts:
#	.eslintrc
#	.flowconfig
#	README.md
#	flow-typed/npm/eslint-plugin-react_vx.x.x.js
#	flow-typed/npm/eslint_vx.x.x.js
#	flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js
#	flow-typed/npm/firebase_vx.x.x.js
#	flow-typed/npm/react-native_vx.x.x.js
#	flow-typed/npm/rebass_vx.x.x.js
#	flow-typed/npm/reflexbox_vx.x.x.js
#	flow-typed/npm/sinon_vx.x.x.js
#	flow-typed/npm/webpack-dev-middleware_vx.x.x.js
#	flow-typed/npm/webpack-hot-middleware_vx.x.x.js
#	flow-typed/npm/webpack-isomorphic-tools_vx.x.x.js
#	flow-typed/npm/webpack_vx.x.x.js
#	gulp/android.js
#	gulp/ios.js
#	ios/Este.xcodeproj/project.pbxproj
#	ios/Este/AppDelegate.m
#	ios/Este/Info.plist
#	messages/de.js
#	messages/es.js
#	messages/fr.js
#	messages/pt.js
#	messages/ro.js
#	package.json
#	src/browser/app/App.js
#	src/browser/app/Footer.js
#	src/browser/app/Header.js
#	src/browser/app/components/Button.js
#	src/browser/app/components/FieldError.js
#	src/browser/app/components/Form.js
#	src/browser/app/components/Image.js
#	src/browser/app/components/Link.js
#	src/browser/app/components/Loading.js
#	src/browser/app/components/SwitchTheme.js
#	src/browser/app/components/View.js
#	src/browser/app/components/index.js
#	src/browser/app/components/pseudo.js
#	src/browser/app/themes/custom.js
#	src/browser/app/themes/index.js
#	src/browser/app/themes/initial.js
#	src/browser/auth/Email.js
#	src/browser/auth/SignInError.js
#	src/browser/auth/SignInPage.js
#	src/browser/auth/SignOut.js
#	src/browser/auth/Social.js
#	src/browser/fields/FieldsPage.js
#	src/browser/home/HomePage.js
#	src/browser/intl/IntlPage.js
#	src/browser/intl/SwitchLocale.js
#	src/browser/me/MePage.js
#	src/browser/me/ProfilePage.js
#	src/browser/me/SettingsPage.js
#	src/browser/offline/OfflinePage.js
#	src/browser/todos/Buttons.js
#	src/browser/todos/NewTodo.js
#	src/browser/todos/Todos.js
#	src/browser/todos/TodosPage.js
#	src/browser/users/OnlineUsers.js
#	src/browser/users/UsersPage.js
#	src/common/app/actions.js
#	src/common/app/components/ThemeProvider.js
#	src/common/app/errorToMessage.js
#	src/common/auth/actions.js
#	src/common/auth/emailMessages.js
#	src/common/auth/errorMessages.js
#	src/common/auth/reducer.js
#	src/common/configureDeps.js
#	src/common/configureEpics.js
#	src/common/configureReducer.js
#	src/common/configureStorage.js
#	src/common/lib/validation/ValidationError.js
#	src/common/todos/actions.js
#	src/common/todos/buttonsMessages.js
#	src/common/todos/newTodoMessages.js
#	src/common/todos/reducer.js
#	src/common/todos/todosMessages.js
#	src/common/users/actions.js
#	src/common/users/createUserFirebase.js
#	src/common/users/reducer.js
#	src/native/app/Menu.js
#	src/native/app/components/index.js
#	src/native/auth/Email.js
#	src/native/auth/SignInPage.js
#	src/native/auth/SignOut.js
#	src/native/auth/Social.js
#	src/native/intl/IntlPage.js
#	src/native/main.js
#	src/native/me/MePage.js
#	src/native/offline/OfflinePage.js
#	src/native/todos/Buttons.js
#	src/native/todos/Header.js
#	src/native/todos/NewTodo.js
#	src/native/todos/Todo.js
#	src/native/todos/Todos.js
#	src/native/todos/TodosPage.js
#	src/server/frontend/render.js
#	webpack/makeConfig.js
#	yarn.lock
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants