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

App #51

Merged
merged 55 commits into from
Aug 16, 2023
Merged

App #51

merged 55 commits into from
Aug 16, 2023

Conversation

JannisGehrt
Copy link

No description provided.

@JannisGehrt JannisGehrt self-assigned this Jul 30, 2023
Copy link
Member

@NiklasRentzCAU NiklasRentzCAU left a comment

Choose a reason for hiding this comment

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

The structure of the project looks fine, I can see you tried to follow the guidelines we gave you to make the code structure readable. However, as there are hardly any comments in the code that makes understanding and even reviewing the code very cumbersome. Please provide documentation in the code for all public API and inline comments in the code explaining what the code does in some parts. Try to make that a habit to write comments as you write the code, even better: write the documentation of what a method is supposed to do before writing its first line of code. That makes you better aware of what you want to write and has the benefit that the documentation then is already there.

Please start commenting some parts an re-request a review on those parts so that we can have a closer look at that.

Comment on lines +1 to +20
import * as React from "react"
import Svg, { SvgProps, Path } from "react-native-svg"
const LesserLevelCrossing = (props: SvgProps) => (
<Svg
xmlns="http://www.w3.org/2000/svg"
width={46}
height={40}
viewBox="0 0 46 40"
fill="none"
{...props}
>
<Path
fill="#FAFAFA"
stroke="#DE0B0B"
strokeWidth={4}
d="M23 37.57 2.464 2h41.072L23 37.57Z"
/>
</Svg>
)
export default LesserLevelCrossing
Copy link
Member

Choose a reason for hiding this comment

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

Is it common to build SVG assets like this for react? For easier editing and handling of these assets I would assume saving them as .svg files and including in some way would be better.

Copy link
Author

Choose a reason for hiding this comment

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

I will look out for a better way of implementing svg support, but this is at least a very common way to use svgs (https://stackoverflow.com/a/52663626)

Comment on lines +62 to +91
const styles = StyleSheet.create({
primary: {
borderRadius: 50,
padding: 15,
backgroundColor: Color.primary,
},
secondary: {
borderRadius: 50,
padding: 15,
},
disabled: {
borderRadius: 50,
padding: 15,
backgroundColor: Color.darkGray,
},
textPrimary: {
color: Color.textLight,
fontSize: 18,
textAlign: "center",
},
textSecondary: {
color: Color.primary,
fontSize: 18,
textAlign: "center",
},
textDisabled: {
color: Color.darkGray,
fontSize: 18,
textAlign: "center",
},
Copy link
Member

Choose a reason for hiding this comment

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

This looks like something that should be css classes and used as such in the structure. Does the framework support css or css-like general stylings that can be reused?

Copy link
Author

Choose a reason for hiding this comment

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

This is the css-like styling of React. I use reusable stylings for styles that should be applied in the whole app (see values/text-styles.ts). Since these styles are button specific, they are part of the button component, the non specific parts (eg. colors) of these styles are in general styling files.

@JulianGrabitzky JulianGrabitzky merged commit 9bd60a4 into development Aug 16, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants