Skip to content
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

Use workspace instead of realm in UI #1093

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/base/catalog-entry.gts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class CatalogEntry extends CardDef {
<FieldContainer @label='Ref' data-test-field='ref'>
<@fields.ref />
</FieldContainer>
<FieldContainer @label='Realm Name' data-test-field='realmName'>
<FieldContainer @label='Workspace Name' data-test-field='realmName'>
<@fields.realmName />
</FieldContainer>
<FieldContainer @vertical={{true}} @label='Demo' data-test-field='demo'>
Expand Down
2 changes: 1 addition & 1 deletion packages/host/app/components/card-catalog/filters.gts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class CardCatalogFilters extends Component<Signature> {
disabled={{@disableRealmFilter}}
data-test-realm-filter-button
>
Realm:
Workspace:
{{this.realmFilterSummary}}
</button>
</:trigger>
Expand Down
8 changes: 4 additions & 4 deletions packages/host/app/components/editor/file-tree.gts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export default class FileTree extends Component<Signature> {
<IconPencil
width='18px'
height='18px'
aria-label='Can edit files in this realm'
aria-label='Can edit files in this workspace'
data-test-realm-writable
/>
</:trigger>
<:content>
Can edit files in this realm
Can edit files in this workspace
</:content>
</Tooltip>
{{else}}
Expand All @@ -62,12 +62,12 @@ export default class FileTree extends Component<Signature> {
<IconPencilCrossedOut
width='18px'
height='18px'
aria-label='Cannot edit files in this realm'
aria-label='Cannot edit files in this workspace'
data-test-realm-not-writable
/>
</:trigger>
<:content>
Cannot edit files in this realm
Cannot edit files in this workspace
</:content>
</Tooltip>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export default class EditFieldModal extends Component<Signature> {
<:ready as |realmInfo|>
<img
src={{realmInfo.iconURL}}
alt='Realm icon'
alt='Workspace icon'
data-test-realm-icon-url={{realmInfo.iconURL}}
/>
</:ready>
Expand Down
2 changes: 1 addition & 1 deletion packages/host/app/components/operator-mode/realm-icon.gts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class RealmIcon extends Component<Signature> {
<template>
<img
src={{@realmIconURL}}
alt='Icon for realm {{@realmName}}'
alt='Icon for workspace {{@realmName}}'
data-test-realm-icon-url={{@realmIconURL}}
...attributes
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/host/app/components/realm-dropdown.gts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class RealmDropdown extends Component<Signature> {
{{this.selectedRealm.name}}
</div>
{{else}}
Select a realm
Select a workspace
{{/if}}
<DropdownArrowDown class='arrow-icon' width='22px' height='22px' />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ module('Acceptance | code submode | create-file tests', function (hooks) {
);
assert
.dom('[data-test-code-mode-card-preview-header] img')
.hasAttribute('alt', 'Icon for realm Test Workspace A');
.hasAttribute('alt', 'Icon for workspace Test Workspace A');
assert.dom('[data-test-card-resource-loaded]').containsText('Card');
assert.dom('[data-test-field="title"] input').hasValue('');
assert.dom('[data-test-card-url-bar-input]').hasValue(`${fileURL}.json`);
Expand Down Expand Up @@ -487,7 +487,7 @@ module('Acceptance | code submode | create-file tests', function (hooks) {
await waitFor(`[data-test-code-mode-card-preview-header="${fileID}"]`);
assert
.dom('[data-test-code-mode-card-preview-header] img')
.hasAttribute('alt', 'Icon for realm Test Workspace B');
.hasAttribute('alt', 'Icon for workspace Test Workspace B');
assert.dom('[data-test-card-resource-loaded]').containsText('Card');
assert.dom('[data-test-field="title"] input').hasValue('');
assert.dom('[data-test-card-url-bar-input]').hasValue(`${fileID}.json`);
Expand Down Expand Up @@ -551,7 +551,7 @@ module('Acceptance | code submode | create-file tests', function (hooks) {
await waitFor(`[data-test-code-mode-card-preview-header="${fileID}"]`);
assert
.dom('[data-test-code-mode-card-preview-header] img')
.hasAttribute('alt', 'Icon for realm Test Workspace B');
.hasAttribute('alt', 'Icon for workspace Test Workspace B');
assert.dom('[data-test-card-resource-loaded]').containsText('Person');
assert.dom('[data-test-field="firstName"] input').hasValue('');
assert.dom('[data-test-card-url-bar-input]').hasValue(`${fileID}.json`);
Expand Down
4 changes: 2 additions & 2 deletions packages/host/tests/acceptance/code-submode/inspector-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ module('Acceptance | code submode | inspector tests', function (hooks) {
assert.dom('[data-test-card-resource-loaded]').containsText('Pet');
assert
.dom(`[data-test-code-mode-card-preview-header="${id}"] .icon`)
.hasAttribute('alt', 'Icon for realm Test Workspace B');
.hasAttribute('alt', 'Icon for workspace Test Workspace B');
assert.dom('[data-test-field="name"] input').hasValue('Van Gogh');
assert.dom('[data-test-card-url-bar-input]').hasValue(`${id}.json`);
});
Expand Down Expand Up @@ -932,7 +932,7 @@ module('Acceptance | code submode | inspector tests', function (hooks) {
assert.dom('[data-test-card-resource-loaded]').containsText('Pet');
assert
.dom(`[data-test-code-mode-card-preview-header="${id}"] .icon`)
.hasAttribute('alt', 'Icon for realm Test Workspace A');
.hasAttribute('alt', 'Icon for workspace Test Workspace A');
assert.dom('[data-test-field="name"] input').hasValue('Van Gogh');
assert.dom('[data-test-card-url-bar-input]').hasValue(`${id}.json`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ module('Acceptance | code submode | recent files tests', function (hooks) {
assert
.dom('[data-test-recent-file]:nth-child(1) [data-test-realm-icon-url]')
.hasAttribute('src', 'https://i.postimg.cc/L8yXRvws/icon.png')
.hasAttribute('alt', 'Icon for realm Test Workspace B');
.hasAttribute('alt', 'Icon for workspace Test Workspace B');

await waitFor(
'[data-test-recent-file]:nth-child(2) [data-test-realm-icon-url]',
Expand Down Expand Up @@ -515,7 +515,7 @@ module('Acceptance | code submode | recent files tests', function (hooks) {
assert
.dom('[data-test-recent-file]:nth-child(1) [data-test-realm-icon-url]')
.hasAttribute('src', 'https://i.postimg.cc/d0B9qMvy/icon.png')
.hasAttribute('alt', 'Icon for realm Base Workspace');
.hasAttribute('alt', 'Icon for workspace Base Workspace');

await waitFor(
'[data-test-recent-file]:nth-child(2) [data-test-realm-icon-url]',
Expand Down
12 changes: 6 additions & 6 deletions packages/host/tests/integration/components/card-catalog-test.gts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ module('Integration | card-catalog', function (hooks) {
assert
.dom('[data-test-realm="Base Workspace"] [data-test-card-catalog-item]')
.exists({ count: 1 });
assert.dom('[data-test-realm-filter-button]').hasText('Realm: All');
assert.dom('[data-test-realm-filter-button]').hasText('Workspace: All');

let localResults = [
...document.querySelectorAll(
Expand All @@ -194,7 +194,7 @@ module('Integration | card-catalog', function (hooks) {
await click(`[data-test-boxel-menu-item-text="Base Workspace"]`); // base realm is selected
assert
.dom('[data-test-realm-filter-button]')
.hasText(`Realm: Base Workspace`, 'Only base realm is selected');
.hasText(`Workspace: Base Workspace`, 'Only base realm is selected');
assert
.dom(`[data-test-realm="Base Workspace"] [data-test-card-catalog-item]`)
.exists({ count: 1 });
Expand All @@ -216,7 +216,7 @@ module('Integration | card-catalog', function (hooks) {

assert
.dom('[data-test-realm-filter-button]')
.hasText(`Realm: ${realmName}, Base Workspace`);
.hasText(`Workspace: ${realmName}, Base Workspace`);
assert
.dom('[data-test-realm]')
.exists({ count: 2 }, 'Both realms are selected');
Expand All @@ -241,7 +241,7 @@ module('Integration | card-catalog', function (hooks) {

assert
.dom('[data-test-realm-filter-button]')
.hasText(`Realm: Base Workspace`);
.hasText(`Workspace: Base Workspace`);
assert.dom(`[data-test-realm="${realmName}"]`).doesNotExist();
assert
.dom('[data-test-realm="Base Workspace"] [data-test-card-catalog-item]')
Expand All @@ -260,13 +260,13 @@ module('Integration | card-catalog', function (hooks) {
await click(`[data-test-boxel-menu-item-text="Base Workspace"]`);
assert
.dom('[data-test-realm-filter-button]')
.hasText(`Realm: ${realmName}, Base Workspace`); // all realms selected
.hasText(`Workspace: ${realmName}, Base Workspace`); // all realms selected
await click('[data-test-realm-filter-button]');
await click(`[data-test-boxel-menu-item-text="Base Workspace"]`);
await click('[data-test-realm-filter-button]');
await click(`[data-test-boxel-menu-item-text="${realmName}"]`); // all realms unselected

assert.dom('[data-test-realm-filter-button]').hasText('Realm: All');
assert.dom('[data-test-realm-filter-button]').hasText('Workspace: All');
assert
.dom('[data-test-realm]')
.exists(
Expand Down
Loading