Skip to content

Commit

Permalink
Merge main into next
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 9, 2024
2 parents c5d9a47 + d210ef7 commit ea8c077
Show file tree
Hide file tree
Showing 33 changed files with 597 additions and 138 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-cups-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-api": patch
---

API Generator: Don't generate an update input for the single generator
5 changes: 5 additions & 0 deletions .changeset/chatty-spoons-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin-theme": minor
---

Rework `GridFilterPanel` to match the updated Comet CI
8 changes: 8 additions & 0 deletions .changeset/clever-jobs-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@comet/admin-theme": minor
---

Adapt `Chip` styling to align with Comet DXP design

- Fix hover styling
- Add new styling for `<Chip variant="filled" color="info">`
7 changes: 7 additions & 0 deletions .changeset/crafty-cats-copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@comet/cms-admin": minor
---

Add support for passing title and alt text to `useDamFileUpload`

This can be useful when importing files from an external DAM.
21 changes: 21 additions & 0 deletions .changeset/curvy-bulldogs-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@comet/admin": minor
---

Add new custom `Dialog`

The component extends the MUI `Dialog` component to enable common use cases:

- The `title` prop can be used to set the dialog title
- A close button is shown when the `onClose` is used

**Example**

```tsx
<Dialog
title="Dialog Title"
onClose={() => {
// Handle dialog closing here
}}
/>
```
5 changes: 5 additions & 0 deletions .changeset/fuzzy-mugs-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": patch
---

Remove vertical and horizontal scroll bars from block preview iframe
5 changes: 5 additions & 0 deletions .changeset/honest-vans-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin": patch
---

Prevent unintended layout shift after the initial render of `FieldContainer` when using the `horizontal` variant
7 changes: 7 additions & 0 deletions .changeset/long-trainers-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@comet/admin": minor
---

Add a `forceVerticalContainerSize` prop to `FieldContainer`

Use it to define below which container size the `vertical` styling is applied when using the `horizontal` variant.
5 changes: 5 additions & 0 deletions .changeset/nine-rings-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin": patch
---

Fix alignment of `Alert` icon with the title
5 changes: 5 additions & 0 deletions .changeset/poor-kings-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin-theme": patch
---

Adapt size of arrow in `Select` and `Autocomplete` fields according to Comet DXP design
35 changes: 7 additions & 28 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<!--
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.
Expand All @@ -22,49 +19,39 @@ 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.
-->

## 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

## 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 |
| 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.
Expand All @@ -81,38 +68,30 @@ Changeset writing guidelines:
- 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.
-->

## Open TODOs/questions

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

## 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.
-->
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
8 changes: 5 additions & 3 deletions demo/api/src/footer/generated/dto/footer.input.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// 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.
<<<<<<< HEAD
import { BlockInputInterface, isBlockInputInterface, PartialType, RootBlockInputScalar } from "@comet/cms-api";
=======
import { BlockInputInterface, isBlockInputInterface } from "@comet/blocks-api";
import { RootBlockInputScalar } from "@comet/cms-api";
>>>>>>> main
import { Field, InputType } from "@nestjs/graphql";
import { Transform } from "class-transformer";
import { IsNotEmpty, ValidateNested } from "class-validator";
Expand All @@ -15,6 +20,3 @@ export class FooterInput {
@ValidateNested()
content: BlockInputInterface;
}

@InputType()
export class FooterUpdateInput extends PartialType(FooterInput) {}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export const getMuiAutocomplete: GetMuiComponentTheme<"MuiAutocomplete"> = (comp
"&:hover": {
backgroundColor: "transparent",
},
"& .MuiSvgIcon-root": {
fontSize: "12px",
},
},
}),
});
22 changes: 13 additions & 9 deletions packages/admin/admin-theme/src/componentsTheme/MuiChip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Clear } from "@comet/admin-icons";
import { chipClasses } from "@mui/material";

import { mergeOverrideStyles } from "../utils/mergeOverrideStyles";
import { GetMuiComponentTheme } from "./getComponentsTheme";
Expand Down Expand Up @@ -98,18 +97,23 @@ export const getMuiChip: GetMuiComponentTheme<"MuiChip"> = (component, { palette
},
filledDefault: {
backgroundColor: palette.grey["100"],
"&.MuiChip-clickable": {
"&:hover": {
backgroundColor: palette.grey["200"],
},
},
},
filledInfo: {
backgroundColor: "#fff",
"&.MuiChip-clickable": {
"&:hover": {
backgroundColor: palette.grey["50"],
},
},
},
outlinedDefault: {
borderColor: palette.grey["100"],
},
clickableColorDefault: {
[`&.${chipClasses.filled}:hover`]: {
backgroundColor: palette.grey["200"],
},
[`&.${chipClasses.outlined}:hover`]: {
backgroundColor: palette.grey["50"],
},
},
}),
defaultProps: {
deleteIcon: <Clear />,
Expand Down
Loading

0 comments on commit ea8c077

Please sign in to comment.