-
Notifications
You must be signed in to change notification settings - Fork 42
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
🌱 Setup branding to be configurable during the build #1664
Merged
Merged
Conversation
This file contains 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
sjd78
force-pushed
the
branding-overrides
branch
from
January 17, 2024 23:57
17d9897
to
f26c53e
Compare
sjd78
changed the title
Setup build time externalizable branding
Setup branding to be configurable during the build
Jan 17, 2024
sjd78
force-pushed
the
branding-overrides
branch
from
January 18, 2024 00:14
f26c53e
to
a61a3e3
Compare
sjd78
changed the title
Setup branding to be configurable during the build
🌱 Setup branding to be configurable during the build
Jan 18, 2024
sjd78
force-pushed
the
branding-overrides
branch
from
January 18, 2024 03:11
a61a3e3
to
011db01
Compare
Tested and working great with downstream mock dir passed to the branding path var. |
ibolton336
approved these changes
Jan 18, 2024
sjd78
force-pushed
the
branding-overrides
branch
from
January 18, 2024 20:38
011db01
to
a6e6698
Compare
sjd78
force-pushed
the
branding-overrides
branch
from
January 19, 2024 15:05
2902da1
to
354d071
Compare
sjd78
force-pushed
the
branding-overrides
branch
from
February 9, 2024 18:43
354d071
to
3153211
Compare
sjd78
added
the
cherry-pick/release-0.3
This PR should be cherry-picked to release-0.3 branch.
label
Feb 9, 2024
sjd78
force-pushed
the
branding-overrides
branch
from
February 12, 2024 19:05
3153211
to
f36b20b
Compare
sjd78
removed
the
cherry-pick/release-0.3
This PR should be cherry-picked to release-0.3 branch.
label
Feb 14, 2024
sjd78
force-pushed
the
branding-overrides
branch
from
February 27, 2024 18:59
f36b20b
to
b82c156
Compare
Refactor and enhance branding capabilities. Now branding is included from a single directory that contains at least `strings.json`, `manifest.json`, and `favicon.ico`. Any other assets may be placed in the directory and will be copied to the bundled app. Change summary: - Move Konveyor branding assets to a project top-level branding directory - Remove MTA branding assets - Remove profile/branding constants from `env` and client module - Embed branding strings and assets in the common module - `strings.json` is templated to allow the build to adjust asset URL path roots as necessary - `brandingAssetPath()` - server's index.html generation sources the template strings from the common module's branding strings - HeaderApp support brand definitions - client about and masthead to use 'useBranding' hook - `BRANDING` as a relative path is computed from the project root - webpack build source branding assets directly from the common module - Unit tests, snapshots and jest configs updated as necessary Jest changes: - Use `react-i18next` mock from `client/__mocks__` as a more robust mock borrowed from react-i18n repos - Move `setupTests.ts` into `client/src/app/test-config` to keep jest test config code all in the same directory Related changes: - Upgrade rollup to v4, add new rollup plugins (copy, virtual) Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
sjd78
force-pushed
the
branding-overrides
branch
from
March 1, 2024 21:07
b82c156
to
347728c
Compare
sjd78
added
the
cherry-pick/release-0.3
This PR should be cherry-picked to release-0.3 branch.
label
Mar 4, 2024
github-actions bot
pushed a commit
that referenced
this pull request
Mar 5, 2024
## Summary Refactor and enhance branding capabilities. Now branding is included from a single directory that contains at least `strings.json`, `manifest.json`, and `favicon.ico`. Any other assets may be placed in the directory and will be copied to the bundled app. Running the build as normal should show no difference. Running the build with `BRANDING=./some-other-brand npm run start:dev` will try to use a branding from the specified directory (that is relative to the project's source root). See `BRANDING.md` for more details. Resolves: #1682 ## Details Branding changes: - Move Konveyor branding assets to a project top-level branding directory - Remove MTA branding assets - Remove profile/branding constants from `env` and client module - Embed branding strings and assets in the common module - `strings.json` is templated to allow the build to adjust asset URL path roots as necessary - `brandingAssetPath()` - server's index.html generation sources the template strings from the common module's branding strings - `HeaderApp` and `AppAboutModal` components support branding by using the `useBranding` hook - `BRANDING` as a relative path is computed from the project root - webpack build source branding assets directly from the common module - Unit tests, snapshots and jest configs updated as necessary Jest changes: - Use `react-i18next` mock from `client/__mocks__` as a more robust mock borrowed from react-i18n repos - Move `setupTests.ts` into `client/src/app/test-config` to keep jest test config code all in the same directory Related changes: - Upgrade rollup to v4, add new rollup plugins (copy, virtual) --------- Signed-off-by: Scott J Dickerson <[email protected]> Co-authored-by: Ian Bolton <[email protected]> Signed-off-by: Cherry Picker <[email protected]>
sjd78
added a commit
that referenced
this pull request
Mar 5, 2024
On merge to main, #1664 showed that the normal rollup package does not support the linux-ppc64 platform. This was not caught earlier as building on github actions always worked with the standard `rollup` package. The error message displayed on the multiarch build attempt is: > Error: Your current platform "linux" and architecture "ppc64" combination is not yet supported by the native Rollup build. Please use the WASM build "@rollup/wasm-node" instead. Swapping the package `rollup` to `@rollup/wasm-node` should enable the ppc64 build. Signed-off-by: Scott J Dickerson <[email protected]>
sjd78
added a commit
to sjd78/tackle2-ui
that referenced
this pull request
Mar 5, 2024
Following up on PRs konveyor#1664 and konveyor#1739, downgrade to `rollup@^3.0`. The v4 of rollup has "native" code that runs the build, and that code does not currently work with s390 builds [1]. Since konveyor is built for x86, arm, ppc, and s390, all of those need to work. When the s390 builds can work with the wasm bits, we can upgrade to `rollup@^4.0` again. [1] - rollup/rollup#5354 Signed-off-by: Scott J Dickerson <[email protected]>
sjd78
added a commit
that referenced
this pull request
Mar 5, 2024
Following up on PRs #1664 and #1739, downgrade to `rollup@^3.0`. The v4 of rollup has "native" code that runs the build, and that code does not currently work with s390 builds [1]. Since konveyor is built for x86, arm, ppc, and s390, all of those need to work. When the s390 builds can work with the wasm bits, we can upgrade to `rollup@^4.0` again. [1] - rollup/rollup#5354 Signed-off-by: Scott J Dickerson <[email protected]>
sjd78
added a commit
that referenced
this pull request
Mar 14, 2024
## Summary Refactor and enhance branding capabilities. Now branding is included from a single directory that contains at least `strings.json`, `manifest.json`, and `favicon.ico`. Any other assets may be placed in the directory and will be copied to the bundled app. Running the build as normal should show no difference. Running the build with `BRANDING=./some-other-brand npm run start:dev` will try to use a branding from the specified directory (that is relative to the project's source root). See `BRANDING.md` for more details. Resolves: #1682 ## Details Branding changes: - Move Konveyor branding assets to a project top-level branding directory - Remove MTA branding assets - Remove profile/branding constants from `env` and client module - Embed branding strings and assets in the common module - `strings.json` is templated to allow the build to adjust asset URL path roots as necessary - `brandingAssetPath()` - server's index.html generation sources the template strings from the common module's branding strings - `HeaderApp` and `AppAboutModal` components support branding by using the `useBranding` hook - `BRANDING` as a relative path is computed from the project root - webpack build source branding assets directly from the common module - Unit tests, snapshots and jest configs updated as necessary Jest changes: - Use `react-i18next` mock from `client/__mocks__` as a more robust mock borrowed from react-i18n repos - Move `setupTests.ts` into `client/src/app/test-config` to keep jest test config code all in the same directory Related changes: - Upgrade rollup to v4, add new rollup plugins (copy, virtual) --------- Signed-off-by: Scott J Dickerson <[email protected]> Co-authored-by: Ian Bolton <[email protected]> Signed-off-by: Cherry Picker <[email protected]>
sjd78
added a commit
that referenced
this pull request
Mar 14, 2024
Following up on PRs #1664 and #1739, downgrade to `rollup@^3.0`. The v4 of rollup has "native" code that runs the build, and that code does not currently work with s390 builds [1]. Since konveyor is built for x86, arm, ppc, and s390, all of those need to work. When the s390 builds can work with the wasm bits, we can upgrade to `rollup@^4.0` again. [1] - rollup/rollup#5354 Signed-off-by: Scott J Dickerson <[email protected]>
sjd78
pushed a commit
that referenced
this pull request
Mar 15, 2024
…1738) ## Summary Refactor and enhance branding capabilities. Now branding is included from a single directory that contains at least `strings.json`, `manifest.json`, and `favicon.ico`. Any other assets may be placed in the directory and will be copied to the bundled app. Running the build as normal should show no difference. Running the build with `BRANDING=./some-other-brand npm run start:dev` will try to use a branding from the specified directory (that is relative to the project's source root). See `BRANDING.md` for more details. Resolves: #1682 ## Details Branding changes: - Move Konveyor branding assets to a project top-level branding directory - Remove MTA branding assets - Remove profile/branding constants from `env` and client module - Embed branding strings and assets in the common module - `strings.json` is templated to allow the build to adjust asset URL path roots as necessary - `brandingAssetPath()` - server's index.html generation sources the template strings from the common module's branding strings - `HeaderApp` and `AppAboutModal` components support branding by using the `useBranding` hook - `BRANDING` as a relative path is computed from the project root - webpack build source branding assets directly from the common module - Unit tests, snapshots and jest configs updated as necessary Jest changes: - Use `react-i18next` mock from `client/__mocks__` as a more robust mock borrowed from react-i18n repos - Move `setupTests.ts` into `client/src/app/test-config` to keep jest test config code all in the same directory Related changes: - add new rollup plugins (copy, virtual) ## Downgrade to rollup v3 for multiarch builds (#1742) As a followup on PRs #1664 and #1739, it became necessary to downgrade back to `rollup@^3.0`. The v4 of rollup has "native" code that runs the build, and that code does not currently work with s390 builds [1]. Since konveyor is built for x86, arm, ppc, and s390, all of those need to work. When the s390 builds can work with the wasm bits, we can upgrade to `rollup@^4.0` again. [1] - rollup/rollup#5354 --------- Signed-off-by: Scott J Dickerson <[email protected]> Signed-off-by: Cherry Picker <[email protected]> Co-authored-by: Ian Bolton <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Refactor and enhance branding capabilities. Now branding is included from a single directory that contains at least
strings.json
,manifest.json
, andfavicon.ico
. Any other assets may be placed in the directory and will be copied to the bundled app.Running the build as normal should show no difference.
Running the build with
BRANDING=./some-other-brand npm run start:dev
will try to use a branding from the specified directory (that is relative to the project's source root).See
BRANDING.md
for more details.Resolves: #1682
Details
Branding changes:
Move Konveyor branding assets to a project top-level branding directory
Remove MTA branding assets
Remove profile/branding constants from
env
and client moduleEmbed branding strings and assets in the common module
strings.json
is templated to allow the build to adjust assetURL path roots as necessary
brandingAssetPath()
server's index.html generation sources the template strings from the common module's branding strings
HeaderApp
andAppAboutModal
components support branding by using theuseBranding
hookBRANDING
as a relative path is computed from the project rootwebpack build source branding assets directly from the common module
Unit tests, snapshots and jest configs updated as necessary
Jest changes:
Use
react-i18next
mock fromclient/__mocks__
as a more robust mock borrowed from react-i18n reposMove
setupTests.ts
intoclient/src/app/test-config
to keep jest test config code all in the same directoryRelated changes: