Skip to content

Consistency in StyleSheet code #50

@dominicduffin1

Description

@dominicduffin1

Is your feature request related to a problem? Please describe.
At present, most stylistic values are defined on a screen-by-screen basis in the StyleSheet.create() function. There are also some colors declared in a Colors.ts file. It feels difficult to ensure consistency between screens with this setup.

Describe the solution you'd like

My thinking is that it would help to ensure consistency if values (colors, lengths, amount of padding etc) were all defined in the constants folder along the lines of Colors.ts. This would provide a single point of reference for contributors (easing onboarding for new contributors), ease consistent style implementation, and aid maintainability by providing a single place from which to apply stylistic changes across the whole app.

Describe alternatives you've considered

An alternative option would be to create comprehensive documentation of styles for the app to serve as a point of reference for contributors when writing or editing StyleSheet.create() functions. This would still aid the onboarding process and ease aid consistent styling. If styles were to be changed, though, it would still be necessary to make the changes separately for each screen. If there are advantages to defining style values on a screen-by-screen basis that I am not aware of (I am not a React Native expert) this would be an option to consider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions