Conversation
hannessolo
left a comment
There was a problem hiding this comment.
Since you added icons to the code in this PR, I think it would be a good opportunity to switch the icon loading methods - load them directly from da.live/img/icons/... instead.
| @@ -1,2 +1 @@ | |||
| npx lint-staged | |||
| npm test | |||
| const ICONS = [ | ||
| `${nxBase}/blocks/loc/img/Smock_Checkmark_18_N.svg`, | ||
| `${nxBase}/blocks/loc/img/Smock_ChevronRight_18_N.svg`, | ||
| `${nx}/public/icons/Smock_Checkmark_18_N.svg`, |
There was a problem hiding this comment.
Optional: could update this to the new way of loading icons ( directly from da.live)
|
|
||
| const ICONS = [ | ||
| `${nxBase}/blocks/loc/img/Smock_ChevronRight_18_N.svg`, | ||
| `${nx}/public/icons/Smock_ChevronRight_18_N.svg`, |
| return { org, repo, pathname }; | ||
| }; | ||
|
|
||
| function replaceHtml(text, fromOrg, fromRepo, options = {}) { |
There was a problem hiding this comment.
Can you double-check whether we already have a similar function in nx2, and if yes move to a shared utils location?
| @@ -0,0 +1,11 @@ | |||
| button, | |||
There was a problem hiding this comment.
Could we potentially use the styles from nx2/styles/form.css instead?
| const ICONS = [ | ||
| `${nx}/blocks/loc/img/Smock_Close_18_N.svg`, | ||
| `${nx}/blocks/loc/img/Smock_Add_18_N.svg`, | ||
| `${nx}/public/icons/Smock_Close_18_N.svg`, |
There was a problem hiding this comment.
See comments about icons
| return strings.get(key) ?? key; | ||
| }; | ||
|
|
||
| export const loadStyle = (() => { |
There was a problem hiding this comment.
Is this move intentional?
| @@ -0,0 +1,14 @@ | |||
| const config = await (async () => { | |||
There was a problem hiding this comment.
What does this do? Is it just for testing or do we need it? The goal is for evertyhing to be nx2 only.
Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #532
Test URLs: