-
Notifications
You must be signed in to change notification settings - Fork 207
PMM-14995 Update existing PMM branding assets and styles #5292
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
Open
pmcf-percona
wants to merge
6
commits into
v3
Choose a base branch
from
PMM-14995-Update_existing_PMM_assets_and_styles
base: v3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
43ffad8
PMM-14995 Update existing PMM branding assets and styles
freenandes cde77fd
PMM-14995 Bump percona-ui library
matejkubinec 218fe32
PMM-14995 Update favicon
matejkubinec 1364cf1
Merge branch 'v3' into PMM-14995-Update_existing_PMM_assets_and_styles
matejkubinec a0b86a0
Remove stray node_modules symlink
freenandes 2dd1db0
Merge branch 'v3' into PMM-14995-Update_existing_PMM_assets_and_styles
fabio-silva 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| --- | ||
| description: Link/unlink the local @percona/percona-ui package into the pmm app for live development. Use when the user wants to develop percona-ui changes against pmm locally. | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # Link `@percona/percona-ui` for local development | ||
|
|
||
| Sibling repos required: | ||
|
|
||
| ``` | ||
| pmm-dev/ | ||
| ├── percona-ui/ # source of @percona/percona-ui (pnpm + rollup) | ||
| └── pmm/ui/apps/pmm/ # consumer (yarn 1 + vite) | ||
| ``` | ||
|
|
||
| `percona-ui` ships `dist/` (rollup). Watch rebuilds dist → vite HMR picks up symlinked node_module. | ||
|
|
||
| ## Link | ||
|
|
||
| ```bash | ||
| # 1. percona-ui — install, build, register link, start watch | ||
| cd percona-ui | ||
| pnpm install | ||
| pnpm build | ||
| yarn link | ||
| pnpm build:watch # leave running | ||
|
|
||
| # 2. pmm app — consume link | ||
| cd pmm/ui/apps/pmm | ||
| yarn link "@percona/percona-ui" | ||
| ``` | ||
|
|
||
| Then in `pmm/ui/apps/pmm/vite.config.ts` uncomment: | ||
|
|
||
| ```ts | ||
| optimizeDeps: { | ||
| exclude: ['@percona/percona-ui'], | ||
| force: true, | ||
| }, | ||
| ``` | ||
|
|
||
| Start pmm: | ||
|
|
||
| ```bash | ||
| cd pmm/ui/apps/pmm | ||
| yarn dev | ||
| ``` | ||
|
|
||
| ## Unlink | ||
|
|
||
| ```bash | ||
| # 1. pmm app | ||
| cd pmm/ui/apps/pmm | ||
| yarn unlink "@percona/percona-ui" | ||
| yarn install --check-files | ||
|
|
||
| # 2. percona-ui | ||
| cd percona-ui | ||
| yarn unlink | ||
| ``` | ||
|
|
||
| Re-comment the `exclude: ['@percona/percona-ui']` line in `vite.config.ts`. | ||
|
|
||
| ## Verify | ||
|
|
||
| ```bash | ||
| # inside pmm/ui/apps/pmm | ||
| ls -la node_modules/@percona/percona-ui | ||
| # linked → symlink to ../../../../../../percona-ui | ||
| # unlinked → real directory from registry | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - `yarn link` (not `pnpm link`) — package-manager agnostic global symlink; pmm is yarn 1. | ||
| - Run `yarn link "@percona/percona-ui"` from the **app** dir (`apps/pmm`), not the workspace root. | ||
| - React/MUI duplication avoided: `percona-ui` declares them as `peerDependencies`; vite `dedupe` enforces single copies. | ||
| - Stale dist = stale UI. Keep the `pnpm build:watch` terminal visible to catch build errors. | ||
| - Hard refresh / restart vite with `--force` if HMR misses a change. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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
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
29 changes: 11 additions & 18 deletions
29
ui/apps/pmm/src/components/syntax-highlighter/SyntaxHighlighter.utils.ts
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.