Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early app setup #6

Merged
merged 4 commits into from
May 13, 2020
Merged

Early app setup #6

merged 4 commits into from
May 13, 2020

Conversation

Castau
Copy link
Member

@Castau Castau commented May 13, 2020

This Pull Request is the basic App Setup.

  • components
    • All real components belong in here. Components should be reusable. Some of them will be used in almost all screens and some only in one. Besides the ones provided in this PR, additional components could be
      • custom Button
      • custom Footer
      • custom TextView
  • constants
    • To minimize redundancies, everything that is a constant should be in here. Then we only need to make changes one place in the code in order to change for example a color.
    • Constant Example:
      export default {
          primary: 'darkslategrey',
         secondary: 'rosybrown'
      }
    • Use Example:
      const styles = StyleSheet.create({
          title: {
              color: colors.primary
          }
      });
  • demos
    • contains demo gifs for PR and Report
  • screens
    • All screens belong here. If you need another screen create it here like the others, don't use Modal.
    • This gif shows how to switch between screens in app.js
    • demo
  • app
    • The "main". This file is the root file and is responsible for switching between screens and holding "global" useStates.
  • facade
    • contains all functions that fetches?
    • perhaps other code?

@Castau Castau linked an issue May 13, 2020 that may be closed by this pull request
11 tasks
@Castau Castau mentioned this pull request May 13, 2020
11 tasks
@Castau Castau removed a link to an issue May 13, 2020
11 tasks
@Runi-VN
Copy link
Member

Runi-VN commented May 13, 2020

How does keyboard.dismiss() work and why is it necessary? :)

@Castau
Copy link
Member Author

Castau commented May 13, 2020

How does keyboard.dismiss() work and why is it necessary? :)

I forgot about that! I included it, to remember to tell you :P When an input field is pressed the phone keyboard pops up. If you have keyboard.dismiss() in an <TouchableWithoutFeedback/> (or any other outer component) the keyboard will be dismissed if the user press anywhere on the screen that is not the keyboard.

It is not strictly necessary, but it's nice to have in the components with input fields. Otherwise the keyboard will only dismiss if the screen is changed, I think.

@Runi-VN
Copy link
Member

Runi-VN commented May 13, 2020

Oh yeah, I remember not being able to dismiss my keyboard. How weird that it is not default behavior, but an import.

Thanks for clarifying.

@Castau Castau merged commit 97e722f into master May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants