Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Fix animations #62

Merged
merged 3 commits into from
Mar 23, 2023
Merged

Fix animations #62

merged 3 commits into from
Mar 23, 2023

Conversation

skyman503
Copy link
Contributor

This changes fix the background in place during transitions between screens.

@@ -10,3 +10,12 @@ export const getShortUsername = (username: string) => {
.join('')
.toUpperCase();
};

/**
* Used to check whether string contains only whitespaces.
Copy link
Collaborator

@graszka22 graszka22 Mar 23, 2023

Choose a reason for hiding this comment

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

No need to document that, it's in the function name and the types.
Comments like this make code less readable. In time the function might change and we'll most likely forget to update the comment.

Good comments are explaining things that are not obvious (for example "I'm doing this like that because there is an issue #1234 with RN"). What the function does should be obvious from the function name and you're doing a good job creating small, well named functions 👍

Also I'm adding comments like this one but to the public API to automatically generate public docs. But this function is not a public API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remved.

@@ -90,7 +117,26 @@ export const CreateRoom = ({ navigation, route }: Props) => {
}, []);

return (
<BackgroundWrapper hasHeader>
<Animated.View
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's a bit repetitive. Can we extract this to a separate component and reuse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new component.

@skyman503 skyman503 merged commit 97e63e5 into master Mar 23, 2023
@skyman503 skyman503 deleted the @skyman503/animations-fix branch March 23, 2023 12:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants