Suprnovae / abc-totaal-notitieblok

1 stars 0 forks source link

Create new record view #5

Open vidbina opened 8 years ago

vidbina commented 8 years ago

Upon clicking the "add record" button (see FAB in Android, see ➕ in iOS) a camera view should pop up which allows one to snap a picture followed by a view which allows one to specify a price and description.

vidbina commented 8 years ago

As a user I want to enter information such as the description, the monetary value and date or time for every entry.

We have to figure out how we will support this but at least we will need inputs for the description (text), price (numeric value where the keyboard should be a keypad and there should be a dropdown for the currency) and the date (use DatePicker).

Dont worry about saving. We just need the layouts in place, the functional will be added later. Create RecordFormIOS and RecordFormAndroid components which will contain the views to be used. And display the views whenever one clicks the "new record" button.

I believe we currently have the "camera" set up here, but let's just have the "new record" click fire a "CreateRecord" event which may fire up the camera first of the form depending on a setting which we will define later.

zirconias commented 8 years ago

what about a mockup ? are we going to think about reusable components or each platform has its own design ? do we look after versatility ? or user experience used to be for each platform?

vidbina commented 8 years ago

We go for native experience UI-wise, so own designs :wink:. I'm drafting mockups at the moment.

zirconias commented 8 years ago

ok cool ,

vidbina commented 8 years ago

In iOS we allow the scanning of a document through the displayed "Add scan" option, which will eventually fetch an image from the camera. recordformios

vidbina commented 8 years ago

The floating action button in Android should allow the user to take a picture of the entry.

Mockup for Android

vidbina commented 8 years ago

I've already set up components/RecordFormViewAndroid.js and components/RecordFormViewIOS.js which should contain the forms we want. I've done this because I needed to explore to which extent the keyboardType prop of the TextInput offered the ability to customise the keyboards. See commit 70f2903 for details.

Just focus on getting the form to look and feel like the mockups. The functionality will be added later when we have the dispatcher and other plumbing for actions and stores set up :wink:

TODO

AlinaChernenko commented 8 years ago

Hi @vidbina ! Could you help me with icons for this view? do you have a source assets? Thanks!

zirconias commented 8 years ago

@AlinaChernenko can you push it we can work on it together .

AlinaChernenko commented 8 years ago

@vidbina - I will update iOS with DatePicket and Camera on next commit.

AlinaChernenko commented 8 years ago

@zirconias sure, it's in the last commit of the setup/new-record-form branch.

AlinaChernenko commented 8 years ago

@vidbina Hi David! Need your help =) I placed the ActionButton on the new screen, but can't get its position changed or make it without ActionButton.Item working - my goal is to have just one 'camera' icon as a parent item. I tried add position/offsetX/offsetY and use just ActionButton element - and no result so far. Do you have an idea what can help me?

vidbina commented 8 years ago

Hey @AlinaChernenko, I did something but it is somewhat ugly still. I assumed that for every screen size offsetting the FAB (floating action button) by the height of the screen hWindow minus the padding needed because of the elements along the top, hStatusBar + 56 (height of our toolbar) + 168 (height of priceblockAndroid) + hSoftMenuBar (the one at the bottom, if even present). From that difference I subtract about 28 units which are about half the size of the action button in order to align the button's center to the bottom border of the price container.

vidbina commented 8 years ago

Great work @AlinaChernenko 👍 . Just the finishing touches left.

screen shot 2016-05-19 at 10 00 58

vidbina commented 8 years ago

For Android we need the following:

screen shot 2016-05-19 at 10 06 24

AlinaChernenko commented 8 years ago

@vidbina sure, will update everything. Just one thing with warnings. I was trying to get rid of it and it seems other guys have the issue https://github.com/facebook/react-native/issues/4547 even though the code is appropriate. I used temporary solution and ignore Warning: Failed propType for now. Hope that is fine.

vidbina commented 8 years ago

OK. I'll keep that in mind. It is fine.