Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
66a4071
Demo: Add additional sizes to allowedImageSizes configuration (#3791)
SebiVPS Apr 23, 2025
21f95ad
DAM: Fix headers (#3535)
dkarnutsch Apr 23, 2025
32b2822
Add aria-hidden to SvgUse component to hide SVGs by default (#3797)
stekalt Apr 23, 2025
e9dde79
Docker-Compose: Bind ports on localhost instead of wildcard (#3784)
dkarnutsch Apr 23, 2025
caf0d53
Demo Site: Fix breakpoints (#3755)
johnnyomair Apr 23, 2025
652be3f
Remove youtube.com from and add player.vimeo.com to CSP (#3793)
thomasdax98 Apr 24, 2025
0adc7cc
Dev: Disable wildcard for Node.js services (#3785)
dkarnutsch Apr 28, 2025
cfacc86
Dev: use env var `SERVER_HOST` for host to allow a quicker change (#3…
dkarnutsch Apr 29, 2025
723ff53
Dev: Minor Server-Host fixes: Re-add comment about remote devices, us…
dkarnutsch Apr 29, 2025
e3d7840
Demo API: Add StatusModule from Starter (#3813)
dkarnutsch Apr 30, 2025
2d17265
Fix type of Dialog's title prop (#3814)
manuelblum Apr 30, 2025
99f904f
Close Dialog with ESC Key or Backdrop Click (#3811)
manuelblum Apr 30, 2025
415a831
Prevent form components used within `Field`/`FieldContainer` from ove…
juliawegmayr May 5, 2025
bd759c3
Check node version before starting services (#3763)
thomasdax98 May 5, 2025
f3b5b57
DAM: Set `cache-control: no-store` for folder download (#3819)
dkarnutsch May 6, 2025
557e311
AccessLog: Remove preview and DAM URLs (#3822)
dkarnutsch May 7, 2025
9996c72
Enable consistent-type-imports and consistent-type-exports in cms-sit…
thomasdax98 May 8, 2025
ea26f5d
Redirects: add activatedAt column (#3766)
juliawegmayr May 12, 2025
2af6bec
Version Packages (#3794)
github-actions[bot] May 13, 2025
dd273ab
Build cms-site with vite (#3825)
thomasdax98 May 13, 2025
70c19bd
Merge branch 'main' into merge-main-into-split-site-library
thomasdax98 May 13, 2025
0082b53
Merge pull request #3851 from vivid-planet/merge-main-into-split-site…
thomasdax98 May 13, 2025
67dad3c
Demo: Prevent responses to status requests from being cached (#3817)
dkarnutsch May 13, 2025
d267b1f
Remove mention of non-existent npm command (#3852)
jamesricky May 13, 2025
a05ea31
Replace styled-components with css modules in cms-site (#3828)
thomasdax98 May 14, 2025
904ff5f
Rename to site-nextjs and restore original cms-site (#3854)
thomasdax98 May 14, 2025
e67e14b
Docs: Extend Brevo documentation by sending contacts without DOI fea…
juliawegmayr May 15, 2025
06920eb
Fix GraphQL type for numbers (#3874)
dkarnutsch May 20, 2025
1a30eb8
Adapt DateTimePicker styling on mobile devices (#3765)
juliawegmayr May 20, 2025
f28e8be
Demo Site: Fix canonicalUrl (#3877)
dkarnutsch May 20, 2025
1b1f851
Dev: Change default server host to localhost and allow change via env…
manuelblum May 21, 2025
94c94a5
Accordion: prevent content from receiving focus when collapsed (#3879)
SebiVPS May 21, 2025
3e9ea61
Fix color of undo button in snackbar (#3878)
juliawegmayr May 21, 2025
93691e6
Demo: AccordionItemBlock: remove obsolete aria-hidden attribute (#3886)
SebiVPS May 22, 2025
150f188
Site: Use skip middleware instead semi working matcher and handle rob…
magdalenaxm May 22, 2025
ede4120
Split site-react from site-nextjs (#3880)
thomasdax98 May 22, 2025
d433d82
Fix package name in changeset (`@comet/site-nextjs` instead of `@come…
thomasdax98 May 22, 2025
e01910a
Merge branch 'main' into merge-main-into-split-site-library-2
thomasdax98 May 22, 2025
827e4ed
Merge pull request #3890 from vivid-planet/merge-main-into-split-site…
thomasdax98 May 22, 2025
2a370cb
Merge pull request #3888 from vivid-planet/feature/split-site-library
thomasdax98 May 22, 2025
b2e7484
Version Packages (#3876)
github-actions[bot] May 22, 2025
b771bd6
Fix delete dialog on close (#3887)
jomunker May 26, 2025
c84874e
Revert "Fix `PixelImageBlock` fixed height, auto width issue" (#3885)
SebiVPS May 26, 2025
cf628cd
Version Packages (#3899)
github-actions[bot] May 26, 2025
2cf573b
Adapt DAM styling (#3776)
juliawegmayr May 27, 2025
b3a2172
Merge main into next
invalid-email-address May 27, 2025
8dc4861
Resolve conflicts
johnnyomair May 27, 2025
61a2ecf
Fix all ESLint errors
johnnyomair May 27, 2025
9287507
Fix all TSC errors
johnnyomair May 27, 2025
98d59cc
Fix all Knip errors
johnnyomair May 27, 2025
8f30659
Add missing "use client" to useBlockPreviewFetch
johnnyomair May 27, 2025
046d6dc
Add missing "Apollo-Require-Preflight" header to createGraphQLFetch
johnnyomair May 27, 2025
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
5 changes: 5 additions & 0 deletions .changeset/beige-comics-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin": patch
---

Optimize responsive behavior of `CrudMoreActionsMenu`
5 changes: 5 additions & 0 deletions .changeset/gentle-boats-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": minor
---

Adapt styling of `DamTable` to align with Comet DXP design
5 changes: 0 additions & 5 deletions .changeset/hip-eagles-play.md

This file was deleted.

2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# node
NODE_ENV=development

SERVER_HOST=localhost # change me to 0.0.0.0 if you want to access the server from other devices

# project
PROJECT_NAME=comet-demo
DEV_DOMAIN_POSTFIX=demo
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Example for a good changeset:

````md
---
"@comet/cms-site": minor
"@comet/site-nextjs": minor
---

Add `ErrorHandlerProvider`
Expand All @@ -110,7 +110,7 @@ The `ErrorHandler` receives the errors in the application and can report them to
```tsx
"use client";

import { ErrorHandlerProvider } from "@comet/cms-site";
import { ErrorHandlerProvider } from "@comet/site-nextjs";
import { PropsWithChildren } from "react";

export function ErrorHandler({ children }: PropsWithChildren) {
Expand Down
2 changes: 2 additions & 0 deletions copy-schema-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const fs = require("fs");
fs.promises.copyFile("packages/api/cms-api/schema.gql", "packages/admin/cms-admin/schema.gql"),
fs.promises.copyFile("packages/api/cms-api/block-meta.json", "packages/admin/cms-admin/block-meta.json"),
fs.promises.copyFile("packages/api/cms-api/block-meta.json", "packages/site/cms-site/block-meta.json"),
fs.promises.copyFile("packages/api/cms-api/block-meta.json", "packages/site/site-nextjs/block-meta.json"),
fs.promises.copyFile("packages/api/cms-api/block-meta.json", "packages/site/site-react/block-meta.json"),

fs.promises.copyFile("demo/api/block-meta.json", "demo/admin/block-meta.json"),
fs.promises.copyFile("demo/api/block-meta.json", "demo/site/block-meta.json"),
Expand Down
4 changes: 3 additions & 1 deletion demo/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"lint:tsc": "tsc --project .",
"preview": "npm run build && vite preview",
"serve": "node server",
"start": "run-s admin-generator intl:compile && run-p gql:types generate-block-types && dotenv -e .env.secrets -e .env.local -e .env -e .env.site-configs -- vite"
"start": "$npm_execpath check-node-version && run-s admin-generator intl:compile && run-p gql:types generate-block-types && dotenv -e .env.secrets -e .env.local -e .env -e .env.site-configs -- vite",
"check-node-version": "check-node-version --node $(cat ../../.nvmrc)"
},
"dependencies": {
"@apollo/client": "^3.13.4",
Expand Down Expand Up @@ -76,6 +77,7 @@
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-react-swc": "^3.8.1",
"check-node-version": "^4.2.1",
"chokidar-cli": "^3.0.0",
"cosmiconfig-toml-loader": "^1.0.0",
"dotenv-cli": "^7.4.4",
Expand Down
6 changes: 4 additions & 2 deletions demo/admin/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { createProxyMiddleware } = require("http-proxy-middleware");

const app = express();
const port = process.env.APP_PORT ?? 3000;
const host = process.env.SERVER_HOST ?? "localhost";

let indexFile = fs.readFileSync("./build/index.html", "utf8");

Expand Down Expand Up @@ -38,6 +39,7 @@ app.use(
);

app.get("/status/health", (req, res) => {
res.setHeader("cache-control", "no-store");
res.send("OK!");
});

Expand Down Expand Up @@ -71,6 +73,6 @@ app.get("*", (req, res) => {
res.send(indexFile);
});

app.listen(port, () => {
console.log(`Admin app listening at http://localhost:${port}`);
app.listen(port, host, () => {
console.log(`Admin app listening at http://${host}:${port}`);
});
2 changes: 1 addition & 1 deletion demo/admin/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default defineConfig(({ mode }) => {
adminPackagesHotReloadPlugin,
],
server: {
host: true,
host: process.env.SERVER_HOST ?? "localhost",
port: Number(process.env.ADMIN_PORT),
proxy: process.env.API_URL_INTERNAL
? {
Expand Down
4 changes: 3 additions & 1 deletion demo/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"lint:tsc": "tsc --project ./tsconfig.lint.json",
"mikro-orm": "dotenv -e .env.secrets -e .env.local -e .env -e .env.site-configs -- mikro-orm",
"start": "$npm_execpath prebuild && dotenv -e .env.secrets -e .env.local -e .env -e .env.site-configs -- nest start --debug --watch --preserveWatchOutput",
"start:dev": "run-p dev:*",
"check-node-version": "check-node-version --node $(cat ../../.nvmrc)",
"start:dev": "$npm_execpath check-node-version && run-p dev:*",
"start:prod": "node dist/main"
},
"dependencies": {
Expand Down Expand Up @@ -75,6 +76,7 @@
"@types/inquirer": "^8.2.11",
"@types/node": "^22.15.21",
"@types/response-time": "^2.3.8",
"check-node-version": "^4.2.1",
"chokidar-cli": "^3.0.0",
"dotenv-cli": "^7.4.4",
"eslint": "^9.22.0",
Expand Down
3 changes: 2 additions & 1 deletion demo/api/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ type PageTreeNode {
category: PageTreeNodeCategory!
userGroup: UserGroup!
childNodes: [PageTreeNode!]!
numberOfDescendants: Float!
numberOfDescendants: Int!
parentNode: PageTreeNode
path: String!
parentNodes: [PageTreeNode!]!
Expand Down Expand Up @@ -647,6 +647,7 @@ type Redirect {
target: JSONObject!
comment: String
active: Boolean!
activatedAt: DateTime
generationType: RedirectGenerationType!
createdAt: DateTime!
updatedAt: DateTime!
Expand Down
2 changes: 2 additions & 0 deletions demo/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { PageTreeNode } from "./page-tree/entities/page-tree-node.entity";
import { ProductsModule } from "./products/products.module";
import { RedirectScope } from "./redirects/dto/redirect-scope";
import { RedirectTargetUrlService } from "./redirects/redirect-target-url.service";
import { StatusModule } from "./status/status.module";

@Module({})
export class AppModule {
Expand Down Expand Up @@ -152,6 +153,7 @@ export class AppModule {
File: DamFile,
Folder: DamFolder,
}),
StatusModule,
FileUploadsModule.register({
maxFileSize: config.fileUploads.maxFileSize,
directory: `${config.blob.storageDirectoryPrefix}-file-uploads`,
Expand Down
2 changes: 1 addition & 1 deletion demo/api/src/comet-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"maxFileSize": 15
},
"images": {
"deviceSizes": [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
"deviceSizes": [640, 750, 828, 1080, 1200, 1920, 2048, 2560, 3200, 3840],
"imageSizes": [16, 32, 48, 64, 96, 128, 256, 320, 384]
},
"imgproxy": {
Expand Down
1 change: 1 addition & 0 deletions demo/api/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function createConfig(processEnv: NodeJS.ProcessEnv) {
return {
...cometConfig,
debug: processEnv.NODE_ENV !== "production",
serverHost: processEnv.SERVER_HOST ?? "localhost",
helmRelease: envVars.HELM_RELEASE,
apiUrl: envVars.API_URL,
apiPort: envVars.API_PORT,
Expand Down
5 changes: 3 additions & 2 deletions demo/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ async function bootstrap(): Promise<void> {
}

const port = config.apiPort;
await app.listen(port);
console.log(`Application is running on: http://localhost:${port}/`);
const host = config.serverHost;
await app.listen(port, host);
console.log(`Application is running on: http://${host}:${port}/`);
}
bootstrap();
4 changes: 2 additions & 2 deletions demo/api/src/products/entities/manufacturer.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class AlternativeAddress {
@IsString()
street: string;

@Field(() => Number, { nullable: true })
@Field({ nullable: true })
@Property({ nullable: true })
@IsNumber()
@IsNullable()
Expand Down Expand Up @@ -51,7 +51,7 @@ export class AlternativeAddressAsEmbeddable {
@IsString()
street: string;

@Field(() => Number, { nullable: true })
@Field({ nullable: true })
@Property({ nullable: true })
@IsNumber()
@IsNullable()
Expand Down
31 changes: 31 additions & 0 deletions demo/api/src/status/status.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { DisableCometGuards } from "@comet/cms-api";
import { EntityManager } from "@mikro-orm/postgresql";
import { Controller, Get, Header } from "@nestjs/common";

@Controller("status")
@DisableCometGuards()
export class StatusController {
constructor(private readonly entityManager: EntityManager) {}

@Get("liveness")
@Header("cache-control", "no-store")
liveness(): string {
// If this controller returns a non 2xx status code, the pod is restarted by kubernetes
// see https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
return "OK";
}

@Get("readiness")
@Header("cache-control", "no-store")
async readiness(): Promise<string> {
// If this controller returns a non 2xx status code, the pod does not receive traffic
// If the database is not available, it does not make sense to restart the pod
// However, the pod should not receive traffic anymore as it can't handle it without the database
// see https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes
//
// If your application is not relying on the database, you can remove the next line
// If your application is relying on another service (e.g. redis), add a health-check here
await this.entityManager.execute("SELECT 1+1");
return "OK";
}
}
6 changes: 6 additions & 0 deletions demo/api/src/status/status.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Module } from "@nestjs/common";

import { StatusController } from "./status.controller";

@Module({ controllers: [StatusController] })
export class StatusModule {}
2 changes: 0 additions & 2 deletions demo/build-and-run-site.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Execute this script via `npm run build-and-run-site`
#
# This script builds the site like in the CI and starts it.
#
# Reasons why you want to do this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Root = styled.div`
flex-flow: row wrap;
gap: ${({ theme }) => theme.spacing.S300};

${({ theme }) => theme.breakpoints.sm.mediaQuery} {
${({ theme }) => theme.breakpoints.md.mediaQuery} {
gap: ${({ theme }) => theme.spacing.S400};
}
`;
6 changes: 3 additions & 3 deletions demo/site-pages/src/common/blocks/MediaGalleryBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ const PageLayoutContent = styled.div`
grid-column: 2 / -2;
position: relative;

${({ theme }) => theme.breakpoints.xs.mediaQuery} {
${({ theme }) => theme.breakpoints.sm.mediaQuery} {
grid-column: 5 / -5;
}

${({ theme }) => theme.breakpoints.md.mediaQuery} {
${({ theme }) => theme.breakpoints.lg.mediaQuery} {
grid-column: 6 / -6;
}

${({ theme }) => theme.breakpoints.lg.mediaQuery} {
${({ theme }) => theme.breakpoints.xl.mediaQuery} {
grid-column: 7 / -7;
}
`;
Expand Down
2 changes: 1 addition & 1 deletion demo/site-pages/src/common/blocks/RichTextBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const DisableLastBottomSpacing = styled.div`
> *:last-child {
margin-bottom: 0;

${theme.breakpoints.xs.mediaQuery} {
${theme.breakpoints.sm.mediaQuery} {
margin-bottom: 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo/site-pages/src/common/components/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export const Typography = styled.div.attrs<{
css`
margin-bottom: 0;

${theme.breakpoints.xs.mediaQuery} {
${theme.breakpoints.sm.mediaQuery} {
margin-bottom: 0;
}
`};
Expand Down
2 changes: 1 addition & 1 deletion demo/site-pages/src/common/helpers/SvgUse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface SvgUseProps extends SVGProps<SVGSVGElement> {
}

export const SvgUse = ({ href, ...props }: SvgUseProps) => (
<svg {...props}>
<svg aria-hidden="true" {...props}>
<use href={href} xlinkHref={href} />
</svg>
);
14 changes: 7 additions & 7 deletions demo/site-pages/src/documents/pages/blocks/BasicStageBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Content = styled.div<{ $alignItems: CSSProperties["alignItems"] }>`
const MediaPhone = styled.div`
height: 800px;

${({ theme }) => theme.breakpoints.xs.mediaQuery} {
${({ theme }) => theme.breakpoints.sm.mediaQuery} {
display: none;
}
`;
Expand All @@ -81,11 +81,11 @@ const MediaTablet = styled.div`
display: none;
height: 700px;

${({ theme }) => theme.breakpoints.xs.mediaQuery} {
${({ theme }) => theme.breakpoints.sm.mediaQuery} {
display: block;
}

${({ theme }) => theme.breakpoints.sm.mediaQuery} {
${({ theme }) => theme.breakpoints.md.mediaQuery} {
display: none;
}
`;
Expand All @@ -94,11 +94,11 @@ const MediaTabletLandscape = styled.div`
display: none;
height: 650px;

${({ theme }) => theme.breakpoints.sm.mediaQuery} {
${({ theme }) => theme.breakpoints.md.mediaQuery} {
display: block;
}

${({ theme }) => theme.breakpoints.md.mediaQuery} {
${({ theme }) => theme.breakpoints.lg.mediaQuery} {
display: none;
}
`;
Expand All @@ -107,11 +107,11 @@ const MediaDesktop = styled.div`
display: none;
height: 750px;

${({ theme }) => theme.breakpoints.md.mediaQuery} {
${({ theme }) => theme.breakpoints.lg.mediaQuery} {
display: block;
}

${({ theme }) => theme.breakpoints.lg.mediaQuery} {
${({ theme }) => theme.breakpoints.xl.mediaQuery} {
height: 800px;
}
`;
Loading