Skip to content

Commit d494b53

Browse files
authored
Merge pull request #2844 from bobleer/bob/remote-target-label-consistency
fix(nav): prefer connection aliases in remote workspace badges
2 parents 64d8e27 + 5db9529 commit d494b53

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceItem.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const WorkspaceItem: React.FC<WorkspaceItemProps> = ({
252252
return {
253253
status,
254254
statusLabel,
255-
hostLabel,
255+
connectionLabel,
256256
/** A green dot already reads as "fine"; spell out only the states that need attention. */
257257
showStatusText: status !== 'connected',
258258
tooltip: t('nav.workspaces.remote.tooltip', {
@@ -261,7 +261,7 @@ const WorkspaceItem: React.FC<WorkspaceItemProps> = ({
261261
status: statusLabel,
262262
}),
263263
ariaLabel: t('nav.workspaces.remote.ariaLabel', {
264-
connection: hostLabel,
264+
connection: connectionLabel,
265265
status: statusLabel,
266266
}),
267267
};
@@ -1362,7 +1362,7 @@ const WorkspaceItem: React.FC<WorkspaceItemProps> = ({
13621362
aria-hidden="true"
13631363
/>
13641364
<span className="openbitfun-nav-panel__workspace-item-remote-host">
1365-
{remoteMeta.hostLabel}
1365+
{remoteMeta.connectionLabel}
13661366
</span>
13671367
{remoteMeta.showStatusText ? (
13681368
<span className="openbitfun-nav-panel__workspace-item-remote-status">

‎src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceListSectionLayout.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ describe('WorkspaceListSection layout styles', () => {
222222
expect(source).toContain('behavior="marquee"');
223223
expect(searchIndicatorStart).toBeGreaterThan(remoteNameStart);
224224
expect(remoteMetaStart).toBeGreaterThan(searchIndicatorStart);
225-
expect(remoteMetaMarkup).toContain('remoteMeta.hostLabel');
225+
expect(remoteMetaMarkup).toContain('remoteMeta.connectionLabel');
226226
expect(remoteMetaMarkup.indexOf('workspace-item-status-dot'))
227227
.toBeLessThan(remoteMetaMarkup.indexOf('workspace-item-remote-host'));
228228
expect(source).not.toContain('workspace-item-subtitle');

0 commit comments

Comments
 (0)