Skip to content

Commit

Permalink
Merge pull request #2884 from vivid-planet/merge-main-into-next
Browse files Browse the repository at this point in the history
Merge main into next
  • Loading branch information
thomasdax98 authored Dec 10, 2024
2 parents 3e5f004 + b1a12c7 commit 2b083c6
Show file tree
Hide file tree
Showing 272 changed files with 1,231 additions and 741 deletions.
7 changes: 0 additions & 7 deletions .changeset/odd-coins-think.md

This file was deleted.

115 changes: 9 additions & 106 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,118 +1,21 @@
<!--
PLEASE MAKE SURE TO KEEP THE PR SIZE AT A MINIMUM!
Smaller PRs are easier to review and tend to get merged faster.
Unrelated changes, refactorings, fixes etc. should be made in separate PRs.
--->

## Description

<!--
The description should describe the change you're making.
It will be used as the commit message for the squashed commit once the PR gets merged.
Therefore, make sure to keep the description up-to-date as the PR changes.
PLEASE DESCRIBE WHY YOU'RE MAKING THE CHANGE, NOT WHAT YOU'RE CHANGING.
Reviewers see what you're changing when reviewing the code.
However, they might not understand your motives as to why you're making the change.
Your description should include:
- The problem you're facing
- Your solution to the problem
- An example usage of your change
--->

<!--
Everything below this is intended to help ease reviewing this PR.
Remove all unrelated sections.
## Acceptance criteria

-->

## Example

<!--
Make sure to provide an example of your change if your change includes a new API.
This can be either:
- The implementation in Demo
- A dev story in Storybook
- A unit test
--->

- [ ] I have verified if my change requires an example
- [ ] I have verified if my change requires [an example](https://github.com/vivid-planet/comet/blob/HEAD/CONTRIBUTING.md#example): <!-- Unit test | Demo | Development story | No example needed --->
- [ ] I have verified if my change requires [a changeset](https://github.com/vivid-planet/comet/blob/HEAD/CONTRIBUTING.md#changeset)
- [ ] I have verified if my change requires [screenshots/screencasts](https://github.com/vivid-planet/comet/blob/HEAD/CONTRIBUTING.md#screenshotsscreencasts)

## Screenshots/screencasts

<!--
When making a visual change, please provide either screenshots or screencasts.
Hint: For before/after views, you can use a table:
| Before | After |
| -------- | ------- |
| Link | Link |
-->

## Changeset

<!--
When making a notable change, make sure to add a changeset.
See [CONTRIBUTING.md](https://github.com/vivid-planet/comet/blob/HEAD/CONTRIBUTING.md) for more information.
TL;DR
Add a changeset when:
- changing the package's public API (`src/index.ts`)
- fixing a bug
- making a visual change
Changeset writing guidelines:
- Use active voice: "Add new thing" vs. "A new thing is added"
- First line should be the title: "Add new alert component"
- Provide additional information in the description
- Use backticks to highlight code: Add new `Alert` component
- Use bold formatting for "headlines" in the description: **Example**
--->

- [ ] I have verified if my change requires a changeset

## Related tasks and documents

<!--
Link to related tasks and documents, for instance, https://vivid-planet.atlassian.net/browse/COM-XXX.
MAKE SURE THAT EVERYTHING REQUIRED TO UNDERSTAND YOUR CHANGE IS IN THE PR DESCRIPTION.
Reviewers shouldn't need to review tasks, JIRA conversations etc. to understand what you're doing.
-->
| Before | After |
| ------ | ----- |
| Link | Link |

## Open TODOs/questions

<!--
- [ ] Need to validate that this actually works
- [ ] Merge parent PR
-->
- [ ] Add changeset

## Further information

<!--
Further information that helps reviewing the PR, for instance:
- Alternative solutions you have considered
- Dependent PRs
- Links to relevant documentation, blog posts etc.
-->
- Task: https://vivid-planet.atlassian.net/browse/COM-XXX
55 changes: 54 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,44 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

Pull requests with minor or patch changes should target the [`main`](https://github.com/vivid-planet/comet/tree/main) branch, while major/breaking changes should target the [`next`](https://github.com/vivid-planet/comet/tree/next) branch.

### Changesets
## Pull requests

> [!WARNING]
> Please make sure to keep the pull request size at a minium!
> Smaller pull requests are easier to review and tend to get merged faster.
> Unrelated changes, refactorings, fixes etc. should be made in follow-up pull requests.
### Description

The description should describe the change you're making.
It will be used as the commit message for the squashed commit once the pull request gets merged.
Therefore, make sure to keep the description up-to-date as the pull request changes.

> [!WARNING]
> Please describe why you're making the change, not what you're changing.
> Reviewers see what you're changing when reviewing the code.
> However, they might not understand your motives as to why you're making the change.
Your description should include:

- The problem you're facing
- Your solution to the problem
- An example usage of your change

### Example

Make sure to provide an example of your change if your change includes a new API.
This can be either:

- A unit test (preferred)
- The implementation in Demo
- A development story in Storybook

### Screenshots/screencasts

When making a visual change, please provide either screenshots or screencasts.

### Changeset

Changes are documented using [changesets](https://github.com/changesets/changesets). Make sure to [add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) when making a notable change.

Expand Down Expand Up @@ -90,3 +127,19 @@ export function ErrorHandler({ children }: PropsWithChildren) {
}
```
````

### Open TODOs/questions

Anything that needs to be done before merging the pull request, for instance, add a changeset.

### Further information

Further information that helps reviewing the pull request, for instance:

- Alternative solutions you have considered
- Related pull requests
- Links to relevant tasks, documentation, blog posts etc.

> [!WARNING]
> Make sure that everything required to understand your change is in the pull request description.
> Reviewers shouldn't need to review tasks, JIRA conversations etc. to understand what you're doing.
1 change: 1 addition & 0 deletions demo/admin/src/products/ProductForm.gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const productFormFragment = gql`
min
max
}
lastCheckedAt
dimensions {
width
height
Expand Down
9 changes: 8 additions & 1 deletion demo/admin/src/products/ProductForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
useFormApiRef,
useStackSwitchApi,
} from "@comet/admin";
import { DateField } from "@comet/admin-date-time";
import { DateField, DateTimeField } from "@comet/admin-date-time";
import { BlockState, createFinalFormBlock } from "@comet/blocks-admin";
import {
DamImageBlock,
Expand Down Expand Up @@ -111,6 +111,7 @@ export function ProductForm({ id, width }: FormProps) {
id: filteredData.manufacturerCountry?.addressAsEmbeddable.country,
}
: undefined,
lastCheckedAt: filteredData.lastCheckedAt ? new Date(filteredData.lastCheckedAt) : null,
};
}, [data, width]);

Expand Down Expand Up @@ -140,6 +141,7 @@ export function ProductForm({ id, width }: FormProps) {
priceList: formValues.priceList ? formValues.priceList.id : null,
datasheets: formValues.datasheets?.map(({ id }) => id),
manufacturer: formValues.manufacturer?.id,
lastCheckedAt: formValues.lastCheckedAt ? formValues.lastCheckedAt.toISOString() : null,
};

if (mode === "edit") {
Expand Down Expand Up @@ -357,6 +359,11 @@ export function ProductForm({ id, width }: FormProps) {
fullWidth
layout="grid"
/>
<DateTimeField
label={<FormattedMessage id="product.lastCheckedAt" defaultMessage="Last checked at" />}
name="lastCheckedAt"
fullWidth
/>
</>
)}
</FinalForm>
Expand Down
6 changes: 5 additions & 1 deletion demo/admin/src/products/ProductsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ const ProductsPage = () => {
<StackPage name="add" title={intl.formatMessage({ id: "products.addProduct", defaultMessage: "Add product" })}>
<SaveBoundary>
<FormToolbar />
<ProductForm />
<StackMainContent>
<FieldSet>
<ProductForm />
</FieldSet>
</StackMainContent>
</SaveBoundary>
</StackPage>
</StackSwitch>
Expand Down
5 changes: 1 addition & 4 deletions demo/api/src/footer/generated/dto/footer.input.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file has been generated by comet api-generator.
// You may choose to use this file as scaffold by moving this file out of generated folder and removing this comment.
import { BlockInputInterface, isBlockInputInterface, PartialType, RootBlockInputScalar } from "@comet/cms-api";
import { BlockInputInterface, isBlockInputInterface, RootBlockInputScalar } from "@comet/cms-api";
import { Field, InputType } from "@nestjs/graphql";
import { Transform } from "class-transformer";
import { IsNotEmpty, ValidateNested } from "class-validator";
Expand All @@ -15,6 +15,3 @@ export class FooterInput {
@ValidateNested()
content: BlockInputInterface;
}

@InputType()
export class FooterUpdateInput extends PartialType(FooterInput) {}
2 changes: 2 additions & 0 deletions packages/admin/admin-babel-preset/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @comet/admin-babel-preset

## 7.10.0

## 7.9.0

## 7.8.0
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/admin-babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@comet/admin-babel-preset",
"version": "7.9.0",
"version": "7.10.0",
"repository": {
"type": "git",
"url": "https://github.com/vivid-planet/comet",
Expand Down
13 changes: 13 additions & 0 deletions packages/admin/admin-color-picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @comet/admin-color-picker

## 7.10.0

### Patch Changes

- Updated dependencies [8f924d591]
- Updated dependencies [aa02ca13f]
- Updated dependencies [6eba5abea]
- Updated dependencies [6eba5abea]
- Updated dependencies [bf6b03fe0]
- Updated dependencies [589b0b9ee]
- @comet/admin@7.10.0
- @comet/admin-icons@7.10.0

## 7.9.0

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/admin/admin-color-picker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@comet/admin-color-picker",
"version": "7.9.0",
"version": "7.10.0",
"repository": {
"type": "git",
"url": "https://github.com/vivid-planet/comet",
Expand All @@ -26,8 +26,8 @@
"start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput"
},
"dependencies": {
"@comet/admin": "workspace:^7.9.0",
"@comet/admin-icons": "workspace:^7.9.0",
"@comet/admin": "workspace:^7.10.0",
"@comet/admin-icons": "workspace:^7.10.0",
"clsx": "^1.1.1",
"react-colorful": "^5.5.1",
"tinycolor2": "^1.4.1",
Expand All @@ -36,8 +36,8 @@
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.20.12",
"@comet/admin-babel-preset": "workspace:^7.9.0",
"@comet/eslint-config": "workspace:^7.9.0",
"@comet/admin-babel-preset": "workspace:^7.10.0",
"@comet/eslint-config": "workspace:^7.10.0",
"@mui/material": "^6.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
Expand Down
13 changes: 13 additions & 0 deletions packages/admin/admin-date-time/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @comet/admin-date-time

## 7.10.0

### Patch Changes

- Updated dependencies [8f924d591]
- Updated dependencies [aa02ca13f]
- Updated dependencies [6eba5abea]
- Updated dependencies [6eba5abea]
- Updated dependencies [bf6b03fe0]
- Updated dependencies [589b0b9ee]
- @comet/admin@7.10.0
- @comet/admin-icons@7.10.0

## 7.9.0

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/admin/admin-date-time/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@comet/admin-date-time",
"version": "7.9.0",
"version": "7.10.0",
"repository": {
"type": "git",
"url": "https://github.com/vivid-planet/comet",
Expand All @@ -26,8 +26,8 @@
"start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput"
},
"dependencies": {
"@comet/admin": "workspace:^7.9.0",
"@comet/admin-icons": "workspace:^7.9.0",
"@comet/admin": "workspace:^7.10.0",
"@comet/admin-icons": "workspace:^7.10.0",
"@mui/utils": "^6.0.0",
"clsx": "^1.1.1",
"date-fns": "^2.28.0",
Expand All @@ -36,8 +36,8 @@
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.20.12",
"@comet/admin-babel-preset": "workspace:^7.9.0",
"@comet/eslint-config": "workspace:^7.9.0",
"@comet/admin-babel-preset": "workspace:^7.10.0",
"@comet/eslint-config": "workspace:^7.10.0",
"@mui/material": "^6.0.0",
"@types/react": "^17.0",
"@types/react-date-range": "^1.4.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/admin-icons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @comet/admin-icons

## 7.10.0

## 7.9.0

### Minor Changes
Expand Down
Loading

0 comments on commit 2b083c6

Please sign in to comment.