Skip to content

Commit ab8a4b7

Browse files
committed
Merge branch 'main' into cs-8040-visual-bugs-while-code-is-streaming-1
2 parents b32ed75 + 88e77dd commit ab8a4b7

36 files changed

+1536
-1363
lines changed

.github/workflows/pr-boxel-host.yml

-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
AWS_S3_BUCKET: boxel-host-preview.stack.cards
6464
AWS_REGION: us-east-1
6565
AWS_CLOUDFRONT_DISTRIBUTION: EU4RGLH4EOCHJ
66-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: true
6766
with:
6867
package: boxel-host
6968
environment: staging
@@ -93,7 +92,6 @@ jobs:
9392
AWS_S3_BUCKET: boxel-host-preview.boxel.ai
9493
AWS_REGION: us-east-1
9594
AWS_CLOUDFRONT_DISTRIBUTION: E2PZR9CIAW093B
96-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: true
9795
with:
9896
package: boxel-host
9997
environment: production
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"data": {
3+
"type": "card",
4+
"attributes": {
5+
"instructions": "Boxel is a platform where people can create Cards, which under the hood are built out of glimmer components and ember.\n\nCards are independent linkable items that get an ID. Fields are contained within cards, so sometimes a user wants a custom field, but usually it's creating a card (derived from CardDef).\n\nUse glimmer templating and typescript for the code. Remember the limitations of logic within glimmer templating code. Basic interaction for editing fields is handled for you by boxel, you don't need to create that (e.g. StringField has an edit template that allows a user to edit the data). Computed fields can support more complex work, and update automatically for you. Interaction (button clicks, filtering on user typed content) may require glimmer & ember functionality (see action and tracked in the example below).\n\nCards you create have three templates. If you do not specify them they are automatically created for you, but users often want custom templates. Each template is a glimmer template and can use ember functionality. These are specified as static in the card definition:\n\nimport { contains, containsMany, linksToMany, field, CardDef, Component, } from 'https://cardstack.com/base/card-api'; \nimport StringField from 'https://cardstack.com/base/string'; \nimport NumberField from 'https://cardstack.com/base/number'; \nimport BooleanField from 'https://cardstack.com/base/boolean'; \n// Important, this is the tracked decorator \nimport { tracked } from '@glimmer/tracking'; \nimport { action } from '@ember/object'; \nimport { fn } from '@ember/helper'; \nimport { on } from '@ember/modifier';\n\nexport class MyCustomCard extends CardDef { \n\nstatic displayName = 'BoxelBuddyGuestList';\n\n// linksTo and linksToMany \n@field linkedData = linksToMany(() => AnotherCard);\n\n// A field that is computed from other data in the card \n@field computedData = contains(NumberField, { computeVia: function (this: MyCustomCard) { \n// implementation logic here \nreturn 1; }, \n});\n\n// Isolated templates are used when items are viewed on their own. Default to the isolated template \nstatic isolated = class Isolated extends Component { \n// Use tracked and action decorators to be able to use interactivity in the templates \n@tracked trackedValue = []; \n@action interactivity(event: InputEvent) {} \n\n// Glimmer template goes here, make sure the style tag is at the top level inside the template tag\n<template></template>\n}; \n\n// Embedded is when they appear in other cards \nstatic embedded = class Embedded extends Component { };\n\n// Fitted templates should be responsive to the size of the container they appear in \nstatic fitted = class Fitted extends Component { };\n\n// Edit is for the user editing the data. Use @fields let the field render itself \nstatic edit = class Edit extends Component { }; \n}\n\n@fields.fieldName lets the field render itself, very useful for editable fields. @model.fieldName gets the value out of the field.\n\nImportant:\n\nIt is extremely important you use the following imports for interactivity: \nimport { tracked } from '@glimmer/tracking'; \nimport { action } from '@ember/object'; \nimport { fn, get } from '@ember/helper'; \nimport { on } from '@ember/modifier';\n\nRemember to define a field the following syntax is used:\n\n@field fieldname = contains(FieldType); @field fieldname = containsMany(FieldType);\n\nIf user asks you to make something editable, use `contains` or `containsMany` syntax for adding a field.\n\nAnd for linking to other cards:\n\n@field fieldname = linksTo(() => CardType); \n@field fieldname = linksToMany(() => CardType);\n\nYou can ask followups\n\nYou can propose new/improved data structures\n\nWhen writing the glimmer template, ensure that the style tags appear within the template tag, as the last item in them. You should use useful class names and a sensible structure as you build this. Use single quotes for the class names.\n\nWhen writing this, take care to remember ember and glimmer oddities. Accessing a list by index should use this format:\n\n{{(get this.args.model.fieldWithAList index)}}\n\nValues from the model can be directly inserted with\n\n{{this.args.model.fieldName}}\n\nand you can delegate rendering to the field with\n\n<@fields.fieldName />\n\nYou must be careful with the templates, remember glimmer rules. Do not put a dollar sign ($) directly in front of the brackets.\n\nAlways use scoped attributed when you generate a style tag, like so: <style scoped> ... CSS code ... </style.\n\nUnless otherwise instructed, use a modern but stylish theme. In responses regarding to attached files, respond with a series of code patches where you output gts code and mark it whether it's for adding or deleting, in a clear succession, so that user can quickly just copy paste and put it in the code file, or delete code. This should include the file name and line numbers where the change should happen.",
6+
"title": "Code Module Editing",
7+
"description": null,
8+
"thumbnailURL": null
9+
},
10+
"meta": {
11+
"adoptsFrom": {
12+
"module": "../skill-card",
13+
"name": "SkillCard"
14+
}
15+
}
16+
}
17+
}

packages/experiments-realm/crm-app.gts

+10-10
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const CONTACT_FILTERS: LayoutFilter[] = [
111111
{
112112
displayName: 'All Contacts',
113113
icon: ContactIcon,
114-
cardTypeName: 'CRM Contact',
114+
cardTypeName: 'Contact',
115115
createNewButtonText: 'Create Contact',
116116
sortOptions: [
117117
{
@@ -124,33 +124,33 @@ const CONTACT_FILTERS: LayoutFilter[] = [
124124
{
125125
displayName: 'Leads',
126126
icon: TargetArrowIcon,
127-
cardTypeName: 'CRM Lead',
127+
cardTypeName: 'Lead',
128128
createNewButtonText: 'Create Lead',
129129
},
130130
{
131131
displayName: 'Customers',
132132
icon: HeartHandshakeIcon,
133-
cardTypeName: 'CRM Customer',
133+
cardTypeName: 'Customer',
134134
createNewButtonText: 'Create Customer',
135135
},
136136
{
137137
displayName: 'Representatives',
138138
icon: PresentationAnalytics,
139-
cardTypeName: 'CRM Representative',
139+
cardTypeName: 'Representative',
140140
createNewButtonText: 'Create Representative',
141141
},
142142
];
143143
const DEAL_FILTERS: LayoutFilter[] = [
144144
{
145145
displayName: 'All Deals',
146146
icon: ContactIcon,
147-
cardTypeName: 'CRM Deal',
147+
cardTypeName: 'Deal',
148148
createNewButtonText: 'Create Deal',
149149
},
150150
...DEAL_STATUS_VALUES.map((status) => ({
151151
displayName: status.label,
152152
icon: status.icon,
153-
cardTypeName: 'CRM Deal',
153+
cardTypeName: 'Deal',
154154
createNewButtonText: 'Create Deal',
155155
})),
156156
];
@@ -159,13 +159,13 @@ const ACCOUNT_FILTERS: LayoutFilter[] = [
159159
{
160160
displayName: 'All Accounts',
161161
icon: CalendarExclamation,
162-
cardTypeName: 'CRM Account',
162+
cardTypeName: 'Account',
163163
createNewButtonText: 'Create Account',
164164
},
165165
...URGENCY_TAG_VALUES.map((tag) => ({
166166
displayName: tag.label,
167167
icon: tag.icon,
168-
cardTypeName: 'CRM Account', // without cardTypeName, the filter is not applied
168+
cardTypeName: 'Account', // without cardTypeName, the filter is not applied
169169
createNewButtonText: 'Create Account',
170170
})),
171171
];
@@ -404,7 +404,7 @@ class CrmAppTemplate extends Component<typeof CrmApp> {
404404
},
405405
];
406406

407-
// filter field value by CRM Account
407+
// filter field value by Account
408408
const accountFilter =
409409
activeTabId === 'Account' && activeFilter.displayName !== 'All Accounts'
410410
? [
@@ -417,7 +417,7 @@ class CrmAppTemplate extends Component<typeof CrmApp> {
417417
]
418418
: [];
419419

420-
// filter field value by CRM Deal
420+
// filter field value by Deal
421421
const dealFilter =
422422
activeTabId === 'Deal' && activeFilter.displayName !== 'All Deals'
423423
? [

packages/experiments-realm/crm/account.gts

+8-28
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,6 @@ class IsolatedTemplate extends Component<typeof Account> {
567567
}
568568
.primary-contact-group {
569569
--entity-display-thumbnail-size: var(--boxel-icon-sm);
570-
--profile-avatar-icon-size: var(--boxel-icon-sm);
571-
--profile-avatar-icon-border: 0px;
572570
display: inline-flex;
573571
align-items: start;
574572
gap: var(--boxel-sp-xs);
@@ -634,15 +632,6 @@ class IsolatedTemplate extends Component<typeof Account> {
634632
color: var(--boxel-color-gray);
635633
margin-left: auto;
636634
}
637-
.avatar {
638-
--profile-avatar-icon-size: 25px;
639-
--profile-avatar-icon-border: 0px;
640-
flex-shrink: 0;
641-
}
642-
.info-atom {
643-
--profile-avatar-icon-size: var(--boxel-font-size);
644-
--profile-avatar-icon-border: 0px;
645-
}
646635
/* Skeleton Placeholder */
647636
.skeleton-placeholder-deal-summary-highlight {
648637
--skeleton-width: 50%;
@@ -900,7 +889,6 @@ class EmbeddedTemplate extends Component<typeof Account> {
900889
<@fields.primaryContact
901890
@format='atom'
902891
@displayContainer={{false}}
903-
class='info-atom'
904892
/>
905893
{{/if}}
906894
</:content>
@@ -955,12 +943,10 @@ class EmbeddedTemplate extends Component<typeof Account> {
955943
<article>
956944
<label>KEY CONTACT</label>
957945
{{#if @model.primaryContact}}
958-
<div class='contact-display'>
959-
<@fields.primaryContact
960-
@format='atom'
961-
@displayContainer={{false}}
962-
/>
963-
</div>
946+
<@fields.primaryContact
947+
@format='atom'
948+
@displayContainer={{false}}
949+
/>
964950
{{/if}}
965951
</article>
966952

@@ -1052,8 +1038,10 @@ class EmbeddedTemplate extends Component<typeof Account> {
10521038
flex-direction: column;
10531039
gap: var(--boxel-sp-xl);
10541040
}
1055-
article > * + * {
1056-
margin-top: var(--boxel-sp-xs);
1041+
article {
1042+
display: flex;
1043+
flex-direction: column;
1044+
gap: var(--boxel-sp-sm);
10571045
}
10581046
/* Summary */
10591047
.summary-highlight {
@@ -1070,10 +1058,6 @@ class EmbeddedTemplate extends Component<typeof Account> {
10701058
letter-spacing: var(--boxel-lsp-xxs);
10711059
margin: 0;
10721060
}
1073-
.contact-display {
1074-
--profile-avatar-icon-size: var(--boxel-icon-sm);
1075-
--profile-avatar-icon-border: 0px;
1076-
}
10771061
.next-steps-display {
10781062
--entity-display-icon-size: var(--boxel-icon-sm);
10791063
--entity-display-content-gap: var(--boxel-sp-xs);
@@ -1101,10 +1085,6 @@ class EmbeddedTemplate extends Component<typeof Account> {
11011085
--task-card-padding: var(--boxel-sp) 0;
11021086
border-top: 1px solid var(--boxel-200);
11031087
}
1104-
.info-atom {
1105-
--profile-avatar-icon-size: var(--boxel-font-size);
1106-
--profile-avatar-icon-border: 0px;
1107-
}
11081088
/* Skeleton Placeholder */
11091089
.skeleton-placeholder-task {
11101090
--skeleton-height: 55px;

packages/experiments-realm/crm/contact.gts

+2-2
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ class AtomTemplate extends Component<typeof Contact> {
476476
min-width: 0; /* Helps with text overflow */
477477
}
478478
.avatar {
479-
--avatar-thumbnail-size: 20px;
480-
--avatar-thumbnail-border: 0px;
479+
--profile-avatar-icon-size: 20px;
480+
--profile-avatar-icon-border: 0px;
481481
flex-shrink: 0;
482482
}
483483
</style>

0 commit comments

Comments
 (0)