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

784 replace native base #806

Merged
merged 27 commits into from Jul 26, 2023

Conversation

joshua-davis-rose
Copy link
Contributor

@joshua-davis-rose joshua-davis-rose commented Jul 22, 2023

PR Creator Checklist

Ensure you've checked the following before submitting your PR:

  • You've discussed making your changes with a member of the dev team per contributing rules in the README
  • Your changes are free of any lint errors
  • Your changes are free of any typescript errors
  • You've tested your changes

Summary

Please provide a summary of what your PR does

Replacing Native Base with Gluestack #784 .

Everything Native Base is pulled out. Theming is working, but font scaling is not so I've commented that code out for now.

I did my best to test everything. There are likely some small things I overlooked so let me know if you see something wonky.

Screenshots

If the UI has been changed, include screenshots.
We will not review your PR without screenshots if they are applicable.

No screen shots applicable. Ideally nothing looks or acts differently than it did before.

Test Plan

Please documemnt the steps required to test your PR

Everything. All. The. Things.

image

@joshua-davis-rose joshua-davis-rose marked this pull request as ready for review July 24, 2023 14:42
Start.tsx Outdated
isSystemFont,
accentColor,
]);
}, [currentTheme, fontSize, getFontScale, isSystemFont, accentColor]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the fontSize stay in the dependencies as long as it is deactivated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not. With font scaling commented out, it won't make a difference since the value shouldn't change, so it's just a matter of cleanup. It sounded like @gkasdorf was going to try uncomment the font scaling though.

Copy link
Collaborator

@sgriff96 sgriff96 Jul 25, 2023

Choose a reason for hiding this comment

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

I'm gonna try to work on font scaling at some point soon tonight or tomorrow, can we at least leave a todo there so i remember to re-add it?

<Spacer />
<ChevronRightIcon />
<Icon as={ChevronRightIcon} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Would an SFIcon work here too ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, it should. It just passes any provided properties right through. I got it working with IonIcons.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yea please no icons other than SFIcons

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to do a 1:1 with Native Base. I'll see what SFIcon we have as a replacement.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I see, I thought I would've removed this but it's not a tabler icon so I didn't find it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are two cases of IonIcons being used too. I didn't touch those either.

import { Path } from "react-native-svg";
import { Root } from "../styled-components";

const FavouriteIcon: any = createIcon({
Copy link
Contributor

Choose a reason for hiding this comment

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

British version ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's one of the Gluestack generated component so maybe the dev was a Brit? Most of those icons can probably be deleted since I don't think we're likely to use them.

Comment on lines 28 to 38
colors: {
primary50: "#f0f9ff",
primary100: "#e0f2fe",
primary200: "#bae6fd",
primary300: "#7dd3fc",
primary400: "#38bdf8",
primary500: "#0ea5e9",
primary600: "#0284c7",
primary700: "#0369a1",
primary800: "#075985",
primary900: "#0c4a6e",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume these are autogenerated but do we need them all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not all of them. I'll try to clean out the ones we don't use.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should change to completely remove using these variables but you don't have to do that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we used some random colors from Native Base so I wanted that change to be deliberate.

tsconfig.json Outdated
Comment on lines 3 to 15
"baseUrl": "./",
"paths": {
"@root/*": [
"./*"
],
"@src/*": [
"./src/*"
],
"@components/*": [
"./src/components/*"
]
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm think we could do this better unless not having webpack is causing us to do this. Ik with webpack we can do it in a cleaner way.

baseUrl: "./src",

plus probably some other config changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot to clean that up to have a single root. Unfortunately we need to have it in both babel and tsconfig unless you know of a way for webpack to get typescript to resolve properly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let me look into it a little more

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This more-or-less stayed the same. I was able to simplify the babel.config.js though so it uses what's in here to populate over there.

@joshua-davis-rose
Copy link
Contributor Author

@sgriff96 @felix-staud I think I've addressed all of the feedback except for the tsconfig item.

@sgriff96 sgriff96 merged commit 3f41cd4 into Memmy-App:main Jul 26, 2023
3 of 4 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.

None yet

3 participants