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

Initializer for react-native sample #879

Merged
merged 108 commits into from
Dec 15, 2021
Merged

Initializer for react-native sample #879

merged 108 commits into from
Dec 15, 2021

Conversation

CobyPear
Copy link
Contributor

@CobyPear CobyPear commented Dec 9, 2021

DO NO MERGE!!

Description / Motivation

Testing Details

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)


android_build_config(
name = "build_config",
package = "com.<%- appName %>",
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there were a lot of additional appName replacements (vs what we were replacing previously - basically just package.json and sitecore.config). Only concern here is that we don't do regression testing for React Native (automated or manual) as part of release activities. Any risk?

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 I could see this being a bit spooky. Another concern/question I had about this is that these package names come from the folder names I believe, and they were originally PascalCase but at the moment they would be skewer or however the user inputs the name. Do we need those folders to be PascalCase (is this a Java standard practice? I think so...)
@illiakovalenko do you know if the case for the directories matter? Just noticed another foldername in the templates with the default appname, android/app/src/java/com/basicreactnativesample, should this be replaced too and will hyphens break it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can't answer for sure without testing

Copy link
Contributor

Choose a reason for hiding this comment

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

Based on what I'm hearing, sounds like we should err on the side of keeping things as they were named before.

Base automatically changed from diy-generator to dev December 13, 2021 15:42
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Looks good! See some comments

...answers,
};

const FILTER_REGEXP = /.(jar)$/;
Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand, we should skip files with .jar extension. What is the reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same issue as .pdfs where it has %> encoded so we want to copy it over, but skip EJS.
It actually needs to go this logic here instead of being skipped completely like it is now:

if (file.match(ASSET_REGEX)) {

Should we add jar to the ASSET_REGEX?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

const ASSET_REGEX = /\.(gif|jpg|jpeg|tiff|png|svg|ashx|ico|pdf)$/;

do we want this^ to be:
const COPY_ONLY_REGEX = /\.(gif|jpg|jpeg|tiff|png|svg|ashx|ico|pdf|jar)$/;
or something similar?

Copy link
Contributor

@ambrauer ambrauer Dec 14, 2021

Choose a reason for hiding this comment

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

Sounds like a sensible name/change to me. We have something to make this better (handle "skip file for copy" and "skip file for ejs processing" separately) in our improvements task.


android_build_config(
name = "build_config",
package = "com.<%- appName %>",
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't answer for sure without testing

@CobyPear CobyPear merged commit 6aa2ae1 into dev Dec 15, 2021
@CobyPear CobyPear deleted the diy-generator-react-native branch December 15, 2021 13:23
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