Skip to content

feat: new template #369

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

Merged
merged 31 commits into from
Jun 3, 2025
Merged

feat: new template #369

merged 31 commits into from
Jun 3, 2025

Conversation

jbroma
Copy link
Member

@jbroma jbroma commented May 31, 2025

Summary

Closes #325

  • - add new welcome package with the template
  • - include the welcome package with platform-ios & platform-android
  • - make @rnef/welcome package work without packageExports

Screenshots

Light mode:

Android iOS
image image

Dark mode:

Android iOS
image image

Test plan

  • - works in newly created app

Copy link

vercel bot commented May 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rnef ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 1:03pm

@jbroma
Copy link
Member Author

jbroma commented Jun 2, 2025

@thymikee I can't reproduce the typecheck issue locally, do you know what might be causing this kind of discrepancy?

@jbroma jbroma marked this pull request as ready for review June 2, 2025 12:37
@thymikee
Copy link
Member

thymikee commented Jun 2, 2025

Yeah, you'll need to add the new @rnef/welcome package to root project.json

@jbroma jbroma requested review from mdjastrzebski and thymikee June 2, 2025 12:58
Copy link
Member

@mdjastrzebski mdjastrzebski left a comment

Choose a reason for hiding this comment

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

Looks awesome. I've left some questions about code structure:

  1. Why re-export welcome screen from welcome in platform-xxx and then do Platform.select again?
  2. I would suggest renamign to @rnef/welcome-screen to make it event more evident that this package can be removed afterwards from the users project.

@jbroma
Copy link
Member Author

jbroma commented Jun 2, 2025

Looks awesome. I've left some questions about code structure:

  1. Why re-export welcome screen from welcome in platform-xxx and then do Platform.select again?
  2. I would suggest renamign to @rnef/welcome-screen to make it event more evident that this package can be removed afterwards from the users project.
  1. We don't want users to install @rnef/welcome explicitly, nor we want to add it to the template so ppl need to remove it manually after setup. @rnef/welcome acts as a shared package for universal template, and the template imports it via the platform packages (like suggested in the related issue)
  2. Good idea 👍

@mdjastrzebski
Copy link
Member

@jbroma how does it work then? I do not see it in any deps except platform-xxx, but these packages are devDeps in deployed template.

@mdjastrzebski
Copy link
Member

@thymikee what is the reason #325 suggests to use Platform.select in the main app template? This will break if we do not pick both ios and android platforms.

@jbroma
Copy link
Member Author

jbroma commented Jun 2, 2025

@jbroma how does it work then? I do not see it in any deps except platform-xxx, but these packages are devDeps in deployed template.

users have @rnef/platform-ios installed so its taken from there through reexport and internally @rnef/platform-ios has a dependency on @rnef/welcome.

@jbroma
Copy link
Member Author

jbroma commented Jun 2, 2025

@thymikee what is the reason #325 suggests to use Platform.select in the main app template? This will break if we do not pick both ios and android platforms.

tbh from the technical perspective it makes more sense to have it explicitly in the projects because @rnef/welcome is a react-native runtime package while @rnef/platform-ios and @rnef/platform-android are meant for Node runtime.

@thymikee
Copy link
Member

thymikee commented Jun 2, 2025

@thymikee what is the reason #325 suggests to use Platform.select in the main app template? This will break if we do not pick both ios and android platforms.

Ah that's right. Ideas how to make it better?

@mdjastrzebski
Copy link
Member

Import from the shared package directly

@jbroma
Copy link
Member Author

jbroma commented Jun 2, 2025

@thymikee what is the reason #325 suggests to use Platform.select in the main app template? This will break if we do not pick both ios and android platforms.

Ah that's right. Ideas how to make it better?

Import from the shared package directly

+1

the only reasoning against is that users will have one more explicit dependency in their projects and would need to remove it explicitly after the setup

Copy link
Member

@mdjastrzebski mdjastrzebski left a comment

Choose a reason for hiding this comment

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

Perfecto 👌

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

❤️

@thymikee thymikee merged commit 89614b6 into main Jun 3, 2025
4 checks passed
@thymikee thymikee deleted the feat/new-template branch June 3, 2025 13:04
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.

New default template design
3 participants