Skip to content

Commit

Permalink
rename type -> specType
Browse files Browse the repository at this point in the history
  • Loading branch information
tintinthong committed Jan 17, 2025
1 parent 453be4e commit 95235df
Showing 77 changed files with 120 additions and 122 deletions.
4 changes: 2 additions & 2 deletions packages/base/cards-grid.gts
Original file line number Diff line number Diff line change
@@ -377,7 +377,7 @@ class Isolated extends Component<typeof CardsGrid> {

private createCard = restartableTask(async () => {
let preselectedCardTypeQuery: Query | undefined;
let activeFilterRef = this.activeFilter?.query?.filter?.type;
let activeFilterRef = this.activeFilter?.query?.filter?.specType;
if (activeFilterRef) {
preselectedCardTypeQuery = {
filter: {
@@ -396,7 +396,7 @@ class Isolated extends Component<typeof CardsGrid> {
{
filter: {
on: catalogEntryRef,
every: [{ eq: { type: 'card' } }],
every: [{ eq: { specType: 'card' } }],
},
},
{ preselectedCardTypeQuery },
20 changes: 10 additions & 10 deletions packages/base/catalog-entry.gts
Original file line number Diff line number Diff line change
@@ -36,17 +36,17 @@ export class CatalogEntry extends CardDef {
@field readMe = contains(MarkdownField);

@field ref = contains(CodeRef);
@field type = contains(SpecType);
@field specType = contains(SpecType);

@field isField = contains(BooleanField, {
computeVia: function (this: CatalogEntry) {
return this.type === 'field';
return this.specType === 'field';
},
});

@field isCard = contains(BooleanField, {
computeVia: function (this: CatalogEntry) {
return this.type === 'card';
return this.specType === 'card';
},
});
@field moduleHref = contains(StringField, {
@@ -149,7 +149,7 @@ export class CatalogEntry extends CardDef {
{{@model.ref.name}}
</div>
<div class='exported-type' data-test-exported-type>
{{@model.type}}
{{@model.specType}}
</div>
</div>
</div>
@@ -249,8 +249,8 @@ export class CatalogEntry extends CardDef {
<p class='description'><@fields.description /></p>
</div>
<div class='pill-container'>
{{#if @model.type}}
<SpecTag @type={{@model.type}} />
{{#if @model.specType}}
<SpecTag @specType={{@model.specType}} />
{{/if}}
</div>
</div>
@@ -317,24 +317,24 @@ class CatalogEntryContainer extends GlimmerComponent<Signature> {
interface SpecTagSignature {
Element: HTMLDivElement;
Args: {
type: string;
specType: string;
};
}

export class SpecTag extends GlimmerComponent<SpecTagSignature> {
get icon() {
return getIcon(this.args.type);
return getIcon(this.args.specType);
}
<template>
{{#if this.icon}}
<Pill class='spec-tag-pill' ...attributes>
<:iconLeft>
<div class='spec-tagicon'>
<div>
{{this.icon}}
</div>
</:iconLeft>
<:default>
{{@type}}
{{@specType}}
</:default>
</Pill>

2 changes: 1 addition & 1 deletion packages/base/fields/base64-image.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Base64 Image Field",
"description": "A field capable of representing an image via base64 encoding.",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/base64-image",
"name": "Base64ImageField"
2 changes: 1 addition & 1 deletion packages/base/fields/biginteger-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Bigint Field",
"description": "A field that captures big int values",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/big-integer",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/boolean-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Boolean Field",
"description": "A field that captures boolean values (true/false)",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/boolean",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/code-ref-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Code Reference Field",
"description": "A field that captures a reference to a card or field type",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/code-ref",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/date-field.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"module": "https://cardstack.com/base/date",
"name": "default"
},
"type": "field"
"specType": "field"
},
"meta": {
"adoptsFrom": {
2 changes: 1 addition & 1 deletion packages/base/fields/datetime-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Date-time Field",
"description": "A field that captures date-time values",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/datetime",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/ethereum-address-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Ethereum Address Field",
"description": "A field that captures checksum ethereum addresses",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/ethereum-address",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "General Field",
"description": "A general field that can contain any field type.",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/card-api",
"name": "FieldDef"
2 changes: 1 addition & 1 deletion packages/base/fields/markdown-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Markdown Field",
"description": "A field that captures markdown values",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/markdown",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/number-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Number Field",
"description": "A field that captures number values",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/number",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/skill-card.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Skill Card",
"description": "A card with instructions to teach a skill to the AI bot",
"type": "card",
"specType": "card",
"ref": {
"module": "https://cardstack.com/base/skill-card",
"name": "SkillCard"
2 changes: 1 addition & 1 deletion packages/base/fields/string-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "String Field",
"description": "A field that captures string values",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/string",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/fields/text-area-field.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Text Area Field",
"description": "A field that can capture string values in a multi-line input format. Useful for capturing a large body of text.",
"type": "field",
"specType": "field",
"ref": {
"module": "https://cardstack.com/base/text-area",
"name": "default"
2 changes: 1 addition & 1 deletion packages/base/types/card.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "General Card",
"description": "A general card that can contain any card type.",
"type": "card",
"specType": "card",
"ref": {
"module": "https://cardstack.com/base/card-api",
"name": "CardDef"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/1.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Person",
"description": "Catalog entry for Person card",
"type": "card",
"specType": "card",
"ref": {
"module": "../person",
"name": "Person"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/10.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Friends from ../friends",
"description": "Catalog entry for Friends from ../friends",
"type": "card",
"specType": "card",
"ref": {
"module": "../friends",
"name": "Friends"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/11.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "ContactCard",
"description": "Catalog entry for ContactCard",
"type": "card",
"specType": "card",
"ref": {
"module": "../contact-card",
"name": "ContactCard"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/2.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"module": "../pet",
"name": "Pet"
},
"type": "card"
"specType": "card"
},
"meta": {
"adoptsFrom": {
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/6.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Friend from /friend",
"description": "Catalog entry for Friend from /friend",
"type": "card",
"specType": "card",
"ref": {
"module": "../friend",
"name": "Friend"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/7.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Booking Card",
"description": "Catalog entry for Booking Card",
"type": "card",
"specType": "card",
"ref": {
"module": "../booking",
"name": "Booking"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/app.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "AppCard",
"description": "Catalog entry for AppCard",
"type": "app",
"specType": "app",
"ref": {
"module": "../app-card",
"name": "AppCard"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/author.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"name": "Author",
"module": "../author"
},
"type": "card"
"specType": "card"
},
"meta": {
"adoptsFrom": {
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/blog-post.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "BlogPost",
"description": "Catalog entry for BlogPost",
"type": "card",
"specType": "card",
"ref": {
"module": "../blog-post",
"name": "BlogPost"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/blog.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"module": "../blog-app",
"name": "BlogApp"
},
"type": "card"
"specType": "card"
},
"meta": {
"adoptsFrom": {
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/crm-app.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "CrmApp",
"description": "Catalog entry for CRM App",
"type": "app",
"specType": "app",
"ref": {
"module": "../crm-app",
"name": "CrmApp"
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"type": "card",
"attributes": {
"title": "Contact Link Field",
"type": "field",
"specType": "field",
"ref": {
"module": "../../fields/contact-link",
"name": "ContactLinkField"
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Email Field",
"description": "Email string field",
"type": "field",
"specType": "field",
"ref": {
"module": "../../email",
"name": "EmailField"
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"type": "card",
"attributes": {
"title": "Featured Image Field",
"type": "field",
"specType": "field",
"ref": {
"module": "../../fields/featured-image",
"name": "FeaturedImageField"
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"type": "card",
"attributes": {
"title": "Rating Summary Field",
"type": "field",
"specType": "field",
"ref": {
"module": "../../ratings-summary",
"name": "RatingsSummary"
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Url Field",
"description": "Url string field with basic validation",
"type": "field",
"specType": "field",
"ref": {
"module": "../../url",
"name": "UrlField"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/plant-info.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Plant Info",
"description": "Catalog entry for Plant Info card",
"type": "card",
"specType": "card",
"ref": {
"module": "../plant-info",
"name": "PlantInfo"
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Product Requirement Document",
"description": "Catalog entry for product requirement documents",
"type": "card",
"specType": "card",
"ref": {
"module": "../product-requirement-document",
"name": "ProductRequirementDocument"
2 changes: 1 addition & 1 deletion packages/experiments-realm/CatalogEntry/puppy.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Puppy",
"description": "Catalog entry for Puppy card",
"type": "card",
"specType": "card",
"ref": {
"module": "../puppy-card",
"name": "PuppyCard"
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"attributes": {
"title": "Sprint Planner",
"description": "Catalog entry for Sprint Planner App card",
"type": "app",
"specType": "app",
"ref": {
"module": "../sprint-planner",
"name": "SprintPlanner"
Loading

0 comments on commit 95235df

Please sign in to comment.