Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/menu-rework' into collap…
Browse files Browse the repository at this point in the history
…sed-menu
  • Loading branch information
jomunker committed Jan 3, 2024
2 parents d6dae21 + f06f4be commit 641ea70
Show file tree
Hide file tree
Showing 305 changed files with 4,655 additions and 2,330 deletions.
7 changes: 0 additions & 7 deletions .changeset/afraid-flies-train.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/angry-cheetahs-clean.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clean-pugs-obey.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["comet-admin-stories", "comet-demo-api", "comet-demo-admin", "comet-demo-site"],
"ignore": ["comet-admin-stories", "comet-demo-api", "comet-demo-admin", "comet-demo-site", "comet-docs"],
"snapshot": {
"useCalculatedVersion": true
}
Expand Down
5 changes: 0 additions & 5 deletions .changeset/cuddly-kings-build.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cyan-cycles-care.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/dry-papayas-happen.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/dull-vans-mate.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/fair-clouds-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-api": patch
---

API Generator: Use correct type for `where` when `getFindCondition` service method is not used
8 changes: 0 additions & 8 deletions .changeset/forty-geese-wait.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/four-boats-joke.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/good-pots-beg.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/gorgeous-baboons-compete.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/long-cooks-kneel.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/neat-cougars-hope.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/new-falcons-deny.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nice-cups-develop.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ninety-spoons-decide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/perfect-vans-rhyme.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/polite-apes-visit.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/rude-starfishes-greet.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sharp-dragons-crash.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sharp-gifts-kneel.md

This file was deleted.

14 changes: 12 additions & 2 deletions .changeset/short-donkeys-double.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
"@comet/cms-admin": minor
"@comet/admin": minor
---

Add group section component for usage in menu
Add `MenuItemGroup` component to group menu items

**Example:**

```tsx
<MenuItemGroup title="Some item group title">
<MenuItemRouterLink primary="Menu item 1" icon={<Settings />} to="/menu-item-1" />
<MenuItemRouterLink primary="Menu item 2" icon={<Settings />} to="/menu-item-2" />
<MenuItemRouterLink primary="Menu item 3" icon={<Settings />} to="/menu-item-3" />
{ /* Some more menu items... */ }
</MenuItemGroup>
```
5 changes: 0 additions & 5 deletions .changeset/silent-olives-hug.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silly-news-work.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spotty-flowers-burn.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/stupid-turkeys-refuse.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twelve-chicken-design.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twenty-parents-behave.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/unlucky-files-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/eslint-config": major
---

Enable no-other-module-relative-import rule by default
8 changes: 0 additions & 8 deletions .changeset/warm-feet-flow.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/weak-pillows-appear.md

This file was deleted.

23 changes: 23 additions & 0 deletions .changeset/yellow-seahorses-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
"@comet/cms-admin": major
"@comet/cms-api": major
"@comet/eslint-config": minor
"@comet/cms-site": minor
---

Migrate site preview to Next.js Preview Mode

Requires following changes to site:

- Import `useRouter` from `next/router` (not exported from `@comet/cms-site` anymore)
- Import `Link` from `next/link` (not exported from `@comet/cms-site` anymore)
- Remove preview pages (pages in `src/pages/preview/` directory which call `createGetUniversalProps` with preview parameters)
- Remove `createGetUniversalProps`
- Just implement `getStaticProps`/`getServerSideProps` (Preview Mode will SSR automatically)
- Get `previewData` from `context` and use it to configure the GraphQL Client
- Add `SitePreviewProvider` to `App` (typically in `src/pages/_app.tsx`)
- Add `/api/preview` Next API route (see demo)

Requires following changes to API:

- Set `sitePreviewSecret` in `PageTreeModule`-options (make sure it's the same across multiple API-instances)
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ SITE_PORT=3000
SITE_URL=http://localhost:$SITE_PORT
SITE_PRELOGIN_ENABLED=false
SITE_PRELOGIN_PASSWORD=password
PREVIEW_URL=$SITE_URL/preview
# no gtm in dev mode
NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_SITE_DOMAIN=main
Expand Down
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@





- [ ] Add changeset (if necessary)
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
- synchronize
- reopened
- closed
branches:
- main
- next
push:
branches:
- main
Expand Down
16 changes: 16 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Security policy

## Supported versions

The versions of the project that are currently supported with security updates.

| Version | Supported |
| ------: | :---------------------------------- |
| 5.x | :white_check_mark: |
| 4.x | :white_check_mark: |
| 3.x | :white_check_mark: (until March 24) |
| < 3.0 | :x: |

## Reporting a vulnerability

You can report a vulnerability by contacting us via email at [security@vivid-planet.com](mailto:security@vivid-planet.com).
9 changes: 9 additions & 0 deletions demo/admin/intl-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh

cd "$(dirname "$0")" || exit

rm -rf ./lang/
mkdir -p ./lang

git clone https://github.com/vivid-planet/comet-demo-lang lang/comet-demo-lang
git clone https://github.com/vivid-planet/comet-lang.git lang/comet-lang
27 changes: 13 additions & 14 deletions demo/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"admin-generator": "rimraf 'src/*/generated' && comet-admin-generator generate crud-generator-config.ts",
"build": "run-s intl:update intl:compile && run-p gql:types generate-block-types && cross-env BABEL_ENV=production webpack --config ./webpack.config.ts --env production --mode production --progress",
"build": "run-s intl:compile && run-p gql:types generate-block-types && cross-env BABEL_ENV=production webpack --config ./webpack.config.ts --env production --mode production --progress",
"generate-block-types": "comet generate-block-types --inputs",
"generate-block-types:watch": "chokidar -s \"**/block-meta.json\" -c \"npm run generate-block-types\"",
"gql:types": "graphql-codegen",
Expand All @@ -14,24 +14,23 @@
"intl:compile:comet": "formatjs compile-folder --format simple --ast lang/comet-lang lang-compiled/comet-lang",
"intl:compile:comet-demo": "formatjs compile-folder --format simple --ast lang/comet-demo-lang lang-compiled/comet-demo-lang",
"intl:extract": "formatjs extract \"src/**/*.ts*\" --ignore ./**.d.ts --out-file lang-extracted/en.json --format simple",
"intl:update": "cd ./lang/comet-lang && git pull && cd ../comet-demo-lang && git pull",
"lint": "run-s intl:update intl:compile && run-p gql:types generate-block-types && run-p lint:eslint lint:tsc && $npm_execpath lint:generated-files-not-modified",
"lint": "run-s intl:compile && run-p gql:types generate-block-types && run-p lint:eslint lint:tsc && $npm_execpath lint:generated-files-not-modified",
"lint:eslint": "eslint --max-warnings 0 --config ./.eslintrc.cli.js --ext .ts,.tsx,.js,.jsx,.json,.md src/ package.json",
"lint:tsc": "tsc --project .",
"lint:generated-files-not-modified": "$npm_execpath admin-generator && git diff --exit-code HEAD --",
"start": "run-s intl:update intl:compile && run-p gql:types generate-block-types && dotenv -- cross-env BABEL_ENV=development webpack serve --config ./webpack.config.ts --mode development"
"start": "run-s intl:compile && run-p gql:types generate-block-types && dotenv -- cross-env BABEL_ENV=development webpack serve --config ./webpack.config.ts --mode development"
},
"dependencies": {
"@apollo/client": "^3.7.0",
"@babel/core": "^7.0.0",
"@comet/admin": "workspace:^4.5.0",
"@comet/admin-date-time": "workspace:^4.5.0",
"@comet/admin-icons": "workspace:^4.5.0",
"@comet/admin-react-select": "workspace:^4.5.0",
"@comet/admin-rte": "workspace:^4.5.0",
"@comet/admin-theme": "workspace:^4.5.0",
"@comet/blocks-admin": "workspace:^4.5.0",
"@comet/cms-admin": "workspace:^4.5.0",
"@comet/admin": "workspace:*",
"@comet/admin-date-time": "workspace:*",
"@comet/admin-icons": "workspace:*",
"@comet/admin-react-select": "workspace:*",
"@comet/admin-rte": "workspace:*",
"@comet/admin-theme": "workspace:*",
"@comet/blocks-admin": "workspace:*",
"@comet/cms-admin": "workspace:*",
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@fontsource/roboto": "^4.5.5",
Expand Down Expand Up @@ -89,8 +88,8 @@
"zen-observable": "^0.8.0"
},
"devDependencies": {
"@comet/cli": "workspace:^4.5.0",
"@comet/eslint-config": "workspace:^4.5.0",
"@comet/cli": "workspace:*",
"@comet/eslint-config": "workspace:*",
"@emotion/babel-plugin": "^11.0.0",
"@formatjs/cli": "^2.0.0",
"@gitbeaker/node": "^25.0.0",
Expand Down
4 changes: 2 additions & 2 deletions demo/admin/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { ContentScopeIndicator } from "./common/ContentScopeIndicator";
import { getMessages } from "./lang";
import { Link } from "./links/Link";
import { NewsLinkBlock } from "./news/blocks/NewsLinkBlock";
import News from "./news/News";
import { NewsPage } from "./news/generated/NewsPage";
import MainMenu from "./pages/mainMenu/MainMenu";
import { Page } from "./pages/Page";
import ProductCategoriesPage from "./products/categories/ProductCategoriesPage";
Expand Down Expand Up @@ -170,7 +170,7 @@ class App extends React.Component {
/>
<RouteWithErrorBoundary
path={`${match.path}/structured-content/news`}
component={News}
component={NewsPage}
/>
<RouteWithErrorBoundary
path={`${match.path}/assets`}
Expand Down
Loading

0 comments on commit 641ea70

Please sign in to comment.