Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Adds form elements #587

Merged
merged 8 commits into from
Jun 9, 2017
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"eslint.enable": false,
"flow.enabled": false,

"editor.formatOnSave": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mennenia @sarahscott @alloy @l2succes - this turns on prettier by default when you press save

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a compulsive saver (i occasionally try to cmd-s in real life), does this noticeably slow down the editor or hang?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I'm a compulsive saver too, all these things are done async too

There is an option to run on every newline instead, but I felt that was a bit overkill

"prettier.singleQuote": false,
"prettier.trailingComma": "es5",
"prettier.typescriptEnable": [
Expand All @@ -18,10 +18,11 @@
],
"prettier.semi": false,
"prettier.printWidth": 120,

"files.trimTrailingWhitespace": true,
"editor.renderWhitespace": "boundary",
"editor.rulers": [120],
"editor.rulers": [
120
],
"editor.tabSize": 2,
"files.exclude": {
"**/.git": true,
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [dev] Adds component for consignments todo - orta
- [dev] Adds a root component for the Consignments flow - orta
- [dev] Adds storybooks for consignments - orta
- [dev] Adds some form elements for consignments - orta
- Added the Welcome/Overview screen for consignments - orta

### 1.3.6
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint-staged": "lint-staged",
"ci": "npm run type-check && npm run lint && npm run prettier-project -- -l && npm run test -- --runInBand",
"danger": "danger",
"start": "npm run clean-example && concurrently --kill-others 'npm run start-packager' 'npm run storybook'",
"start": "npm run clean-example && npm run start-servers",
"start-servers": "concurrently --kill-others 'npm run start-packager' 'npm run storybook'",
"start-packager": "node node_modules/react-native/local-cli/cli.js start --config \"$(pwd)\"/rn-cli.config.js",
"storybook": "storybook start -p 9001 -c .storybook --skip-packager",
"rndebugger": "REACT_DEBUGGER=\"open 'rndebugger://set-debugger-loc?host=localhost&port=8081' --args\" npm start",
Expand Down Expand Up @@ -105,6 +106,7 @@
"danger": "^0.19.0",
"jest": "^20.0.4",
"jest-react-native": "18.0.0",
"jest-snapshots-svg": "^0.0.11",
"lint-staged": "^3.4.1",
"prettier": "^1.4.2",
"react-dom": "16.0.0-alpha.12",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react"
import { Text, View } from "react-native"

import Search from "../components/artist-search-results"
import BottomAlignedButton, { BottomAlignedProps } from "../components/bottom-aligned-button"
import Search from "../components/artist_search_results"
import BottomAlignedButton, { BottomAlignedProps } from "../components/bottom_aligned_button"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bunch of renames, they're in a folder called consignments already, so no need for extra context


export const name = "Consignments - bottom aligned"
export const component = BottomAlignedButton
Expand Down
9 changes: 4 additions & 5 deletions src/lib/components/consignments/__stories__/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import "./consignments.story"
import "./typography.story"
import "./style.story"

import { storiesOf } from "@storybook/react-native"
import * as React from "react"
import { View } from "react-native"

import * as bottomAlignedButton from "./consignments-bottom-aligned.story"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved all of my kebab named files to lowercase, this is mainly to be consistent with code that came before me - we should consider adding a danger rule for this ( thinking of the same for Jest too jestjs/jest#3771 )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I'm down for lowercase and snake case for files, def.

import * as search from "./consignments-search.story"
import * as todo from "./consignments-todo.story"
import * as bottomAlignedButton from "./bottom_aligned.story"
import * as search from "./search.story"
import * as todo from "./todo.story"

// Just a quick interface so you know the API
export interface AutoStory {
name: string
allStates: any[]
component: any
}

// Converts a set of state and a component type into a set of stories
const autoStories: AutoStory[] = [search, bottomAlignedButton, todo]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { View } from "react-native"

import { camelCase } from "lodash"

import Search, { ArtistQueryData } from "../components/artist-search-results"
import Search, { ArtistQueryData } from "../components/artist_search_results"

export const name = "Consignments - Search"
export const component = Search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as React from "react"
import { View } from "react-native"
import * as T from "../typography"

import BooleanSelector from "../components/boolean_button"

const Wrapper = p => <View style={{ backgroundColor: "black", flex: 1, paddingTop: 20 }}>{p.children}</View>

storiesOf("Consignments - Type")
Expand All @@ -18,3 +20,9 @@ storiesOf("Consignments - Type")
<T.Subtitle>Subtitle</T.Subtitle>
</Wrapper>
)
.add("Boolean selector", () =>
<Wrapper>
<BooleanSelector selected={true} />
<BooleanSelector selected={false} />
</Wrapper>
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { storiesOf } from "@storybook/react-native"
import * as React from "react"

import TODO from "../components/artwork-consignment-todo"
import TODO from "../components/artwork_consignment_todo"
import { ConsignmentMetadata, ConsignmentSetup } from "../index"

export const name = "Consignments - TODO"
Expand Down
Loading