Repository navigation
feat(fork): replace remaining T3 branding with no3y #475
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fdb94c9
feat(fork): replace remaining T3 branding with no3y
xxxxxxxxxxxxx 16ee3f5
Merge remote-tracking branch 'origin/custom' into t3/replace-t3-branding
xxxxxxxxxxxxx c976f5a
fix(fork): rename bare T3 by default and share one flower path
xxxxxxxxxxxxx 01b6ea4
fix(fork): rebrand native mobile copy and the Android notification icon
xxxxxxxxxxxxx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Fork display-name rewrite for Metro — see .fork/customizations.yaml#fork-brand-name. | ||
| // The same rewrite the web and desktop builds run (scripts/lib/fork-brand-name-core.ts), | ||
| // applied to each app module's source before the Babel transformer it wraps sees it. | ||
| const NodeCrypto = require("node:crypto"); | ||
| const NodeFS = require("node:fs"); | ||
| const NodePath = require("node:path"); | ||
|
|
||
| const brandNameSource = NodePath.resolve(__dirname, "../../../scripts/lib/fork-brand-name-core.ts"); | ||
| const { isRebrandedModule, rewriteUpstreamDisplayName } = require(brandNameSource); | ||
| // metro.config.js sets this: workers receive only this file's path, never a closure, so the | ||
| // transformer it wraps (Expo's, plus whatever Uniwind layers on) can only arrive this way. | ||
| const upstreamPath = process.env.NO3Y_UPSTREAM_BABEL_TRANSFORMER; | ||
| if (!upstreamPath) { | ||
| throw new Error("NO3Y_UPSTREAM_BABEL_TRANSFORMER is unset; load this through metro.config.js."); | ||
| } | ||
| const upstream = require(upstreamPath); | ||
|
|
||
| module.exports = { | ||
| ...upstream, | ||
| transform(props) { | ||
| const src = isRebrandedModule(props.filename) | ||
|
NoahHendrickson marked this conversation as resolved.
Resolved
|
||
| ? (rewriteUpstreamDisplayName(props.src) ?? props.src) | ||
| : props.src; | ||
| return upstream.transform(src === props.src ? props : { ...props, src }); | ||
|
NoahHendrickson marked this conversation as resolved.
Resolved
|
||
| }, | ||
| // Metro hashes this file in place of the transformer it wraps, and neither one's imports. | ||
| getCacheKey(options) { | ||
| const sources = NodeCrypto.createHash("sha1") | ||
| .update(NodeFS.readFileSync(brandNameSource)) | ||
| .update(NodeFS.readFileSync(require.resolve(upstreamPath))) | ||
| .digest("hex"); | ||
| return `${upstream.getCacheKey?.(options) ?? ""}:${sources}`; | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...bile/modules/t3-agent-notifications/android/src/main/res/drawable/agent_activity_mark.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| <!-- The T3 mark, full bleed, so it renders as large as other apps' status bar icons. --> | ||
| <!-- fork:begin fork-brand-name — see .fork/customizations.yaml#fork-brand-name --> | ||
| <!-- The no3y flower's outline cells, full bleed, so it renders as large as other apps' status bar icons. --> | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="24dp" android:height="24dp" | ||
| android:viewportWidth="120" android:viewportHeight="120"> | ||
| <group android:translateX="-2.5" android:translateY="-6"> | ||
| <path android:fillColor="#FFFFFFFF" | ||
| android:pathData="M33.4509,93V47.56H15.5309V37H64.3309V47.56H46.4109V93H33.4509ZM86.7253,93.96C82.832,93.96 78.9653,93.4533 75.1253,92.44C71.2853,91.3733 68.032,89.88 65.3653,87.96L70.4053,78.04C72.5386,79.5867 75.0186,80.8133 77.8453,81.72C80.672,82.6267 83.5253,83.08 86.4053,83.08C89.6586,83.08 92.2186,82.44 94.0853,81.16C95.952,79.88 96.8853,78.12 96.8853,75.88C96.8853,73.7467 96.0586,72.0667 94.4053,70.84C92.752,69.6133 90.0853,69 86.4053,69H80.4853V60.44L96.0853,42.76L97.5253,47.4H68.1653V37H107.365V45.4L91.8453,63.08L85.2853,59.32H89.0453C95.9253,59.32 101.125,60.8667 104.645,63.96C108.165,67.0533 109.925,71.0267 109.925,75.88C109.925,79.0267 109.099,81.9867 107.445,84.76C105.792,87.48 103.259,89.6933 99.8453,91.4C96.432,93.1067 92.0586,93.96 86.7253,93.96Z" /> | ||
| </group> | ||
| android:viewportWidth="15" android:viewportHeight="15"> | ||
| <path android:fillColor="#FFFFFFFF" | ||
| android:pathData="M6 0h3v1h-3zM5 1h1v1h-1zM7 1h1v1h-1zM9 1h1v1h-1zM4 2h1v1h-1zM7 2h1v1h-1zM10 2h1v1h-1zM4 3h2v1h-2zM7 3h1v1h-1zM9 3h2v1h-2zM2 4h7v1h-7zM10 4h3v1h-3zM1 5h1v1h-1zM4 5h1v1h-1zM7 5h1v1h-1zM10 5h2v1h-2zM13 5h1v1h-1zM0 6h1v1h-1zM5 6h1v1h-1zM8 6h1v1h-1zM10 6h1v1h-1zM14 6h1v1h-1zM0 7h15v1h-15zM0 8h1v1h-1zM5 8h1v1h-1zM8 8h1v1h-1zM10 8h1v1h-1zM14 8h1v1h-1zM1 9h1v1h-1zM4 9h1v1h-1zM7 9h1v1h-1zM11 9h1v1h-1zM13 9h1v1h-1zM2 10h11v1h-11zM4 11h2v1h-2zM7 11h1v1h-1zM9 11h2v1h-2zM4 12h1v1h-1zM7 12h1v1h-1zM10 12h1v1h-1zM5 13h1v1h-1zM7 13h1v1h-1zM9 13h1v1h-1zM6 14h3v1h-3z" /> | ||
| </vector> | ||
| <!-- fork:end fork-brand-name --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.