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

feature/propTypes #35

Closed
7 tasks
pashute opened this issue Jun 29, 2018 · 2 comments
Closed
7 tasks

feature/propTypes #35

pashute opened this issue Jun 29, 2018 · 2 comments
Assignees

Comments

@pashute
Copy link
Owner

pashute commented Jun 29, 2018

Two stages.

  • Stage 1 If more than 1 hour of work, please stop and warn Moshe via whatsapp.
  • Stage 2 only after stage 1 done.

Stage 1 splash page

  1. change the App.js line 6 to:

    module.exports = __DEV__ ? StorybookUI : AppRedux;
    // please delete the un-needed remarks after this line in App.js

  2. set up splash story:
    2.1 delete files CenterView.js, Demo0.js and Demo1.js from storybook/stories.
    2.2 remark storybook/stories/index.js on lines of storiesOf(...
    2.3 make a new storiesOf... with MainSplash
    2.4 if needed fix MainSplash to have a simple with a simple in it at first. Just to check that it works.

  3. to run it:

3.1 cleanup: gradlew clean: for android, in the project folder

cd android
gradlew clean
cd ..

3.2 get packages: in the project folder run

npm install 

3.3 run storybook server: in storybook you need to first run the storybook server in a separate admin cmd window:

npm run storybook

3.4 you CAN, but don't have to, in chrome open a tab with url: http://localhost:7007

3.5 now in an admin cmd window run

react-native run-android 

to attached phone or to simulator.

3.6 If you get a "websocket error, cannot connect to 10.0.3.2:7007` then do

adb reverse tcp:7007 tcp:7007 

and run again. If there is still a problem see: storybook-eol/react-native-storybook#107
or for ios: facebook/react-native#17685

stage II - splash page storybook

AFTER EACH OF THE FOLLOWING COMMIT AND PUSH.
Each task below has a number and a name. e.g. 2.2 splashContent state isBTon
IF IT WORKS: write in the commit: n.n soAndSo works. e.g. 2.2 splashContent state isBTon works.
IF IT DOESN'T WORK:
a. still commit before you leave it, and write in commit: n.n soAndSo not working.
e.g. commit: 1. storySplash lookalike not working.
b. and write a comment here in the issue,
c. and try to fix the problem. Contact Moshe if you are stuck.

**Stage 2 tasks: **

  1. storySplash lookalike: Make the storybook/stories/Splash/index.js to look like pages/Splash.js

  2. splashContent: Change to use a new component components/Splash/SplashContent.js
    2.1 The component should LOOK like the inside content (text and buttons) of the current splash screen.
    2.2 splashContent state isBTon: The component should have a state IsBluetoothOn recieved in its props. type: boolean default: false.
    2.2.1 When IsBluetoothOn: ButtonTurnBluetoothOn is enabled and ButtonContinue disabled.
    2.2.2 When isBluetoothOff: ButtonTurnBluetoothOn is disabled and ButtonContinue enabled.
    2.3 splashContent states:
    2.4 storySplash continue: Pressing ButtonContinue does same as in real splash.js (i think it navigates to the mainPage.

  3. Knobs.
    3.1.a proptype isbton: Add the PropTypes property-types for the SplashContent state: IsBluetoothOn
    3.1b proptype textStyle and add a proptype for the text style state so that we can change it with knobs.
    3.1c proptype textContent and add a proptype for the text content state (the content of the section in the component)
    3.2 knobs install Add knobs to storybook (follow knobs instructions for android if there is a diff with ios remark about that in an issue comment)
    3.3 add a knob that changes the IsBluetoothOn state
    3.4 add a knob for the content of the text
    3.5 add a knob for style of text

Stage 3 propTypes for other pages (so we can use storybook)

  • Fix the following files with property types (I'll be using them in the storybook. Each page finished, tick the checkbox here immediately before continuing work on next.

NOTE: The nearby page will be getting current beacon from redux and accordingly showing data,

The following are the pages I want with propTypes:

  • Splash
  • MainPage
  • Pages/tab_pages/Nearby
  • Pages/tab_pages/pointLists/NearbyPoints
  • Pages//SettingPages/Settings
  • Pages/SettingPages/Preferences
@pashute pashute assigned ghost Jun 29, 2018
@pashute pashute assigned kbhatia01 and unassigned ghost Jul 31, 2018
@kbhatia01
Copy link
Collaborator

with real device and adb reverse tcp:7007 we got Websocket connection error: connection reset.
Looking up solution on web.

@pashute pashute mentioned this issue Aug 9, 2018
5 tasks
@pashute
Copy link
Owner Author

pashute commented Aug 12, 2018

@kbhatia01 i updated the story. See stage 2.

@pashute pashute closed this as completed Oct 28, 2018
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