feat: support isolation mode tag#5600
Conversation
🦋 Changeset detectedLatest commit: 3280b2d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR adds an "Isolated" mode tag to the market table asset column and updates the supply asset-warning copy to surface E-mode and isolation-mode context to users.
Confidence Score: 5/5Safe to merge; all changed paths are UI-only and the logic for detecting isolated assets is well-guarded. The core detection logic in No files require special attention beyond the minor design-token nit in Important Files Changed
Reviews (3): Last reviewed commit: "feat: fix tooltip content & market show ..." | Re-trigger Greptile |
|
@greptile review again |
Coverage Report for ./apps/evm
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
b677802 to
d81df1d
Compare
| if (!isAvailableInCore) { | ||
| let i18nKey: string | undefined; | ||
|
|
||
| if (isAvailableInEMode && isAvailableInIsolation) { | ||
| // t('assetWarning.modeOnly.eModeAndIsolation') | ||
| i18nKey = 'assetWarning.modeOnly.eModeAndIsolation'; | ||
| } else if (isAvailableInEMode) { | ||
| // t('assetWarning.modeOnly.eMode') | ||
| i18nKey = 'assetWarning.modeOnly.eMode'; | ||
| } else if (isAvailableInIsolation) { | ||
| // t('assetWarning.modeOnly.isolation') | ||
| i18nKey = 'assetWarning.modeOnly.isolation'; | ||
| } | ||
|
|
||
| if (!i18nKey) { | ||
| return null; |
There was a problem hiding this comment.
addressed, thanks!
| return ( | ||
| <> | ||
| <Trans | ||
| // t('assetWarning.supplyDescription') |
There was a problem hiding this comment.
Unnecessary (the extract command will find this translation key automatically)
There was a problem hiding this comment.
addressed, thanks!
|
|
||
| {hasMode && ( | ||
| <Trans | ||
| // t('assetWarning.modeInfoHint') |
There was a problem hiding this comment.
Unnecessary (the extract command will find this translation key automatically)
There was a problem hiding this comment.
addressed, thanks!
| <SupplyNotification asset={asset} pool={pool} onShowAllMarkets={handleShowAssets} /> | ||
| ) : ( | ||
| <Trans | ||
| // t('assetWarning.borrowDescription') |
There was a problem hiding this comment.
Unnecessary (the extract command will find this translation key automatically)
There was a problem hiding this comment.
addressed, thanks!
| <Trans | ||
| i18nKey={i18nKey} | ||
| values={{ tokenSymbol }} | ||
| components={{ Button: showAllMarketsButton, ModeInfoButton: modeInfoButton }} |
There was a problem hiding this comment.
Since you've given a name to ModeInfoButton, I'd recommend also adding a prefix to Button).
| // t('assetWarning.modeOnly.eModeAndIsolation') | ||
| i18nKey = 'assetWarning.modeOnly.eModeAndIsolation'; | ||
| } else if (isAvailableInEMode) { | ||
| // t('assetWarning.modeOnly.eMode') | ||
| i18nKey = 'assetWarning.modeOnly.eMode'; | ||
| } else if (isAvailableInIsolation) { | ||
| // t('assetWarning.modeOnly.isolation') | ||
| i18nKey = 'assetWarning.modeOnly.isolation'; |
There was a problem hiding this comment.
Just to make sure no dev remove the comments in the future, I'd add a notice like this one before each comment:
// Translation key: do not remove this commentThere was a problem hiding this comment.
addressed, thanks!
| "modeInfoHint": "<LineBreak/>Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to explore more available groups.", | ||
| "modeOnly": { | ||
| "eMode": "{{tokenSymbol}} is only available in E-mode. Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to enable the group, or browse other assets in <Button>Show all markets</Button>.", | ||
| "eModeAndIsolation": "{{tokenSymbol}} is only available in E-mode and Isolation mode. Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to enable one of the groups, or browse other assets in <Button>Show all markets</Button>.", | ||
| "isolation": "{{tokenSymbol}} is only available in Isolation mode. Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to enable the group, or browse other assets in <Button>Show all markets</Button>." | ||
| }, | ||
| "supplyDescription": "Supplying {{tokenSymbol}} to the Core Pool lets you borrow tokens from this pool exclusively. <Button>Show all markets</Button>" |
There was a problem hiding this comment.
I know you grabbed the content from the designs, but I have told them multiple times that we shouldn't randomly capitalize words in sentences (AIs typically do that). Also, the sentences "browse other wassets in Show all markets" is quite odd. I suggest the following changes, let me know your thoughts:
| "modeInfoHint": "<LineBreak/>Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to explore more available groups.", | |
| "modeOnly": { | |
| "eMode": "{{tokenSymbol}} is only available in E-mode. Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to enable the group, or browse other assets in <Button>Show all markets</Button>.", | |
| "eModeAndIsolation": "{{tokenSymbol}} is only available in E-mode and Isolation mode. Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to enable one of the groups, or browse other assets in <Button>Show all markets</Button>.", | |
| "isolation": "{{tokenSymbol}} is only available in Isolation mode. Visit the <ModeInfoButton>Mode info</ModeInfoButton> section to enable the group, or browse other assets in <Button>Show all markets</Button>." | |
| }, | |
| "supplyDescription": "Supplying {{tokenSymbol}} to the Core Pool lets you borrow tokens from this pool exclusively. <Button>Show all markets</Button>" | |
| "modeInfoHint": "<LineBreak/>Visit the <ModeInfoButton>mode info</ModeInfoButton> section to explore more available groups.", | |
| "modeOnly": { | |
| "eMode": "{{tokenSymbol}} is only available in E-mode. Visit the <ModeInfoButton>mode info</ModeInfoButton> section to enable the group, or browse <Button>other assets</Button>.", | |
| "eModeAndIsolation": "{{tokenSymbol}} is only available in E-mode and Isolation mode. Visit the <ModeInfoButton>mode info</ModeInfoButton> section to enable one of the groups, or browse <Button>other assets</Button>.", | |
| "isolation": "{{tokenSymbol}} is only available in Isolation mode. Visit the <ModeInfoButton>mode info</ModeInfoButton> section to enable the group, or browse <Button>other assets</Button>." | |
| }, | |
| "supplyDescription": "Supplying {{tokenSymbol}} to the Core Pool lets you borrow tokens from this pool exclusively. <Button>Show all markets</Button>" |
Jira ticket(s)
VPD-1201
Changes