Skip to content

Skeleton catalog app #2404

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

Open
wants to merge 149 commits into
base: main
Choose a base branch
from
Open

Skeleton catalog app #2404

wants to merge 149 commits into from

Conversation

tintinthong
Copy link
Contributor

@tintinthong tintinthong commented Apr 9, 2025

Refer to https://linear.app/cardstack/issue/CS-8410/move-skeleton-catalog-app-into-feature-flagged-environment

What is changing

  • add skeleton catalog app into catalog-realm-dev, which under feature flagged environment
  • catalog app will not be shown in production
  • add new component spec type

Notes

  • some tests that check the exact number of cards have been removed, as catalog cards can grow and it's not feasible to maintain those checks

tintinthong and others added 30 commits March 19, 2025 09:43
extend cardContainer, but more customize compare to cardContainer, and i want default the height to auto
- extra: change the position of topbar-filter to catalog-content area (mid column)
* add fields title

* create app-listing-header & enhance card-listing-container cssvar

* create app listing embedded view & instances

- create embedded view
- create instances related

* remove stale
Allow listing to create card inside a particular workspace
* Rename card-listing-container to content-container

* improve app-listing-header

* create pricing plan & images-videos & example list skeleton

* add fields tittle to category & create category instances

* craete listing categories & instances

* add headerColor
* give a better name for cards-display section

* introduce intro blocks and content to card display section

* create showcase skeleton
@richardhjtan richardhjtan force-pushed the skeleton-catalog-app branch from 94df9d0 to 7528ea2 Compare April 14, 2025 04:06
@richardhjtan richardhjtan force-pushed the skeleton-catalog-app branch from 8e08213 to d7bbd6e Compare April 14, 2025 06:20
@richardhjtan richardhjtan force-pushed the skeleton-catalog-app branch from d7bbd6e to 6ff39d1 Compare April 14, 2025 06:42
@richardhjtan richardhjtan requested a review from a team April 14, 2025 07:24
@richardhjtan richardhjtan marked this pull request as draft April 14, 2025 09:43
@habdelra
Copy link
Contributor

This is marked as "Draft", do you still want us to review it or no?

@tintinthong tintinthong marked this pull request as ready for review April 14, 2025 14:50
@tintinthong
Copy link
Contributor Author

This is marked as "Draft", do you still want us to review it or no?

yes pls review it @habdelra

@richardhjtan
Copy link
Contributor

@habdelra I drafted it back due to adding some new tests, but there will be no significant changes to that - please feel free to review it. Thanks!

@@ -299,7 +299,7 @@ export class Realm {
this.#dbAdapter = dbAdapter;

this.#router = new Router(new URL(url))
.post('/', SupportedMimeType.CardJson, this.createCard.bind(this))
.post('(/|/.+/)', SupportedMimeType.CardJson, this.createCard.bind(this))
.patch(
Copy link
Contributor Author

@tintinthong tintinthong Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@habdelra there is this api change here. It opens the realm to creating card in a directory of their choice. I made this decision bcos I did not think that introducing a new directory api was a good idea since it may encourage empty directories (which we cant delete now)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to support the use-case that we copy examples into a single folder. And not just splate it all over the realm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this, but let's make sure that you can't escape out of the realm's file system, e.g. ../../../../etc/passwd

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ticketed this improvement in Linear, which can be easier to review later: https://linear.app/cardstack/issue/CS-8436/improve-file-system-handling-creating-a-card-in-a-directory

Copy link
Contributor

@burieberry burieberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Catalog app: change all bold font to use 600 or 500 font-weight
  • Let's change all official cardstack apps/components like Blog App to be published by "Cardstack" and not by individual team member names

Comment on lines +356 to +377
let catalogActions: CatalogActions = {
create: async (spec: Spec, targetRealm: string) => {
await here._createFromSpec.perform(spec, targetRealm);
},
copy: async (card: CardDef, targetRealm: string) => {
return await here._copy.perform(card, targetRealm);
},
copySource: async (fromUrl: string, toUrl: string) => {
return await here._copySource.perform(fromUrl, toUrl);
},
copyCards: async (
cards: CardDef[],
targetRealm: string,
directoryName?: string,
): Promise<CardDef[]> => {
return await here._copyCards.perform(cards, targetRealm, directoryName);
},
allRealmsInfo: async () => {
return await here.realm.allRealmsInfo;
},
};
return { ...actions, ...catalogActions };
Copy link
Contributor

@richardhjtan richardhjtan Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the API additions for interact submode, so listing card can consume these actions in context

@richardhjtan
Copy link
Contributor

  • Catalog app: change all bold font to use 600 or 500 font-weight
  • Let's change all official cardstack apps/components like Blog App to be published by "Cardstack" and not by individual team member names

Good catch @burieberry , addressed them in latest commit

@richardhjtan richardhjtan requested review from burieberry, habdelra and a team April 15, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants