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

Organize all files into core and ecom packages #247

Conversation

devinmorgan
Copy link
Contributor

@devinmorgan devinmorgan commented May 2, 2024

πŸ‘‹ This notion doc contains the broader context of this PR stack. Please make sure to read it once!

What

Step 2 of Part 1.

Why

See here

Test Plan

  • ❌ I've added unit tests for this change. Did not add any new tests because this PR does not introduce any new functionality.
  • ❌ The reviewer should manually test the changes in this PR. No need to manual test because the top PR in the stack passes CI tests

Demo

N/A - no new functionality

How

This PR will not get merged into main. I am leaving it open to make it easier for folks to review the code changes in the whole stack. I will end up pointing #248 to main and merging that in. I will close this PR and #246 once folks have approved the stack. See here for more detail.

@devinmorgan
Copy link
Contributor Author

devinmorgan commented May 2, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @devinmorgan and the rest of your teammates on Graphite Graphite

@devinmorgan
Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @devinmorgan and the rest of your teammates on Graphite Graphite

@devinmorgan devinmorgan force-pushed the devin/fx-1322-organize-public-ecom-repo-into-ecom-and-core-packages branch from 219ce40 to dff9a5f Compare May 3, 2024 15:24
@devinmorgan devinmorgan force-pushed the devin/move-things-to-core-and-ecom branch from a9c23d4 to 6458699 Compare May 3, 2024 15:25
@devinmorgan devinmorgan force-pushed the devin/fx-1322-organize-public-ecom-repo-into-ecom-and-core-packages branch from dff9a5f to be479a9 Compare May 9, 2024 18:43
@devinmorgan devinmorgan force-pushed the devin/move-things-to-core-and-ecom branch from 6458699 to 1772e21 Compare May 9, 2024 18:43
@devinmorgan devinmorgan marked this pull request as ready for review May 10, 2024 14:39
Comment on lines +83 to +106
// This extension splits the path by "/" and adds each segment individually to the path.
// This is to prevent the URL from getting corrupted through internal OKHttp URL encoding.
internal fun HttpUrl.Builder.addPathSegmentsSafe(path: String): HttpUrl.Builder {
path.split("/").forEach { segment ->
if (segment.isNotEmpty()) {
this.addPathSegment(segment)
}
}
return this
}

/**
* [JSONObject.optString] has trouble falling back to `null` and seems to fallback to `"null"` (string) instead
*/
internal fun JSONObject.getStringOrNull(fieldName: String): String? {
if (!has(fieldName) || isNull(fieldName)) {
return null
}
return optString(fieldName)
}

internal fun JSONObject.hasNonNull(fieldName: String): Boolean {
return has(fieldName) && !isNull(fieldName)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved forage.android.Utils.kt to forage.android.core.services.Utils.kt

The second step in the public ecommerce repo that needs to take
place in order to make sharing code between the private pos
repo and this repo pain free; all while allowing for both repos
to evolve independently

Signed-off-by: Devin Morgan <[email protected]>
@devinmorgan devinmorgan force-pushed the devin/fx-1322-organize-public-ecom-repo-into-ecom-and-core-packages branch from be479a9 to 0bb7834 Compare May 15, 2024 17:55
@devinmorgan devinmorgan force-pushed the devin/move-things-to-core-and-ecom branch from 1772e21 to ee43184 Compare May 15, 2024 17:56
@devinmorgan
Copy link
Contributor Author

As discussed in the rollout planning, I merged #248 directly into main to avoid git and graphite drama. Therefore we can close this PR

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.

1 participant