Jessica Chowdhury
6427b7eb29
fix: only show restore as draft option when drafts enabled ( #8066 )
...
## Description
In version comparison view, the `Restore as draft` button should only be
visible when `versions.drafts: true`.
Before:
<img width="1414" alt="Screenshot 2024-09-04 at 3 33 21 PM"
src="https://github.com/user-attachments/assets/1f96d804-46d7-443a-99ea-7b6481839b47 ">
After:
<img width="1307" alt="Screenshot 2024-09-04 at 3 38 42 PM"
src="https://github.com/user-attachments/assets/d2621ddd-2b14-4dab-936c-29a5521444de ">
- [X] I have read and understand the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md )
document in this repository.
## Type of change
- [X] Bug fix (non-breaking change which fixes an issue)
## Checklist:
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [X] Existing test suite passes locally with my changes
- [ ] I have made corresponding changes to the documentation
2024-09-04 19:54:34 +00:00
Sasha
3a657847f2
fix(db-postgres): query hasMany text/number in array/blocks ( #8003 )
...
## Description
Fixes https://github.com/payloadcms/payload/issues/7671
- [x] I have read and understand the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md )
document in this repository.
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
## Checklist:
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] Existing test suite passes locally with my changes
2024-09-04 11:53:43 -04:00
Elliot DeNolf
772f869cc6
chore(release): v3.0.0-beta.98 [skip ci]
2024-09-03 12:59:23 -04:00
Alessio Gravili
b6a8d1c461
perf(richtext-lexical)!: greatly simplify lexical loading and improve performance ( #8041 )
...
We noticed that we can bring functions down to the client directly
without having to wrap them in a component first. This greatly
simplifies the loading of all lexical client components
**BREAKING:**
- `createClientComponent` is no longer exported as it's not needed
anymore
- The exported `ClientComponentProps` type has been renamed to
`BaseClientFeatureProps`.
- The order of arguments in `sanitizeClientEditorConfig` has changed
2024-09-03 12:48:41 -04:00
Alessio Gravili
7fd736ea5b
chore: lint entire codebase including db packages
2024-09-03 11:19:19 -04:00
Germán Jabloñski
7a3507d597
fix(richtext-lexical): toolbar styles ( #7936 )
...
fix https://github.com/payloadcms/payload/issues/7925 .
The `active` style was not effective due to a typo in the CSS (`them`
instead of `theme`).
I took the opportunity to improve a few things:
- Now the colors on hover, active, and hover+active are slightly
different.
- Added a missing gap to the fixed toolbar buttons.
Gap changes: Before:

After:

Thanks @tylandavis for the help!
2024-09-03 00:04:12 -04:00
Paul
9bcdf0dc81
fix(plugin-seo): meta image selection not working ( #8024 )
...
Fixes https://github.com/payloadcms/payload/issues/8016
2024-09-02 05:11:27 +00:00
Paul
8203fe86cd
fix: padding on the right of the default padding when scrollbars are enabled in the browser ( #8023 )
2024-09-02 04:22:02 +00:00
Giuseppe Chiruzzi
1130a581c0
feat(plugin-seo): add Italian translations ( #8020 )
...
Added italian translation and updated index.ts
2024-09-01 23:03:12 +00:00
Riley Pearce
d9cccc7081
fix(richtext-lexical): incorrect error check in TableActionMenu ( #7964 )
...
Fixes #7961 and #8021
2024-09-01 18:29:02 -04:00
Elliot DeNolf
751803d4f4
chore(cpa): get templates using tar ( #8006 )
...
Remove `degit` in favor of tar files from codeload.
Degit is rather dated and has unfixed bugs such as #5402 and #7463 .
2024-08-30 22:51:32 -04:00
Paul
ee3d5856e3
fix: collection pagination limits being merged with defaults instead of overidden ( #8004 )
2024-08-30 23:29:20 +00:00
Paul
cf9e13aebb
fix(ui): radio fields are now selectable as options in filtering in query builder ( #8002 )
2024-08-30 23:04:31 +00:00
Elliot DeNolf
9816787fbf
chore: remove all unused imports ( #7999 )
...
Removes all unused imports.
Temporarily swapped in
https://github.com/sweepline/eslint-plugin-unused-imports to
differentiate between unused imports and unused vars. The default rule
does not differentiate.
2024-08-30 16:52:08 -04:00
Alessio Gravili
b5fb92530c
chore(eslint): change no-empty-object-type to warn instead of error ( #7998 )
2024-08-30 20:29:06 +00:00
Elliot DeNolf
2c1c0dae70
chore(release): eslint/3.0.0-beta.97
2024-08-30 16:11:29 -04:00
Paul
e25730f95c
fix(ui): list view crash when using a code field type ( #7994 )
2024-08-30 12:47:33 -06:00
Elliot DeNolf
7f6b0f087f
chore(release): v3.0.0-beta.97 [skip ci]
2024-08-30 14:21:21 -04:00
Elliot DeNolf
442d105841
fix: migrations exit code ( #7989 )
...
Migration command were not returning proper error codes on failure. This
caused issues with CI in particular.
Fixes #7031 for 3.0
2024-08-30 16:37:39 +00:00
Jarrod Flesch
b97dcc33c7
chore: hoist selection provider ( #7985 )
2024-08-30 11:02:58 -04:00
Elliot DeNolf
8202c3dee8
feat: move logger configuration to Payload config ( #7973 )
...
Removes `loggerOptions` and `loggerDestination` from `initOptions`
(these were not able to be used anyway).
Creates new `logger` property on the Payload config.
```ts
// Logger options only
logger: {
level: 'info',
}
// Logger options with destination stream
logger: {
options: {
level: 'info',
},
destination: process.stdout
},
// Logger instance
logger: pino({ name: 'my-logger' })
```
2024-08-30 09:37:51 -04:00
Paul
b6ae6890aa
fix(ui): upload field not showing admin.description ( #7978 )
2024-08-30 04:22:43 +00:00
Paul
e033488db7
fix(nested-docs-plugin): throw an error to the UI if children are not passing validation ( #7977 )
2024-08-30 02:48:38 +00:00
Elliot DeNolf
76dda13ca1
chore: significantly improve test suite eslint performance, lint and prettier everything ( #7975 )
...
Linting test/admin beta: > 3 minutes (stopped counting after 3 min)
Linting test/admin after my PR: 8s
Linting ui beta: 18s
Linting ui after my PR: 18s
2024-08-29 22:13:05 -04:00
Paul
e071382a79
fix(ui): upload with has many bulk select not working with postgres ( #7976 )
...
Fixes https://github.com/payloadcms/payload/issues/7921
2024-08-30 02:01:38 +00:00
Alessio Gravili
131f2def3c
chore: undo lint changes to db-* and drizzle
2024-08-29 22:01:37 -04:00
Alessio Gravili
86fdad0bb8
chore: significantly improve eslint performance, lint and prettier everything
2024-08-29 21:25:50 -04:00
Alessio Gravili
bc367ab73c
chore(eslint): upgrade to typescript-eslint v8, upgrade all eslint packages ( #7082 )
2024-08-29 16:27:58 -04:00
Jacob Fletcher
c0728220ff
fix(ui): propagates sort change events through list query provider ( #7968 )
2024-08-29 13:18:05 -04:00
Jacob Fletcher
6893f404ac
chore: removes duplicative loop over column state to determine linked cells ( #7958 )
2024-08-29 12:35:51 -04:00
Elliot DeNolf
2a8bd4c775
chore(release): v3.0.0-beta.96 [skip ci]
2024-08-29 11:25:10 -04:00
James Mikrut
ac10bad723
fix(db-postgres): nested localized arrays ( #7962 )
...
## Description
Fixes a bug with nested arrays within either localized blocks or arrays.
2024-08-29 15:01:53 +00:00
Elliot DeNolf
142616e6ad
chore(eslint): curly [skip-lint] ( #7959 )
...
Now enforcing curly brackets on all if statements. Includes auto-fixer.
```ts
// ❌ Bad
if (foo) foo++;
// ✅ Good
if (foo) {
foo++;
}
```
Note: this did not lint the `drizzle` package or any `db-*` packages.
This will be done in the future.
2024-08-29 10:15:36 -04:00
Jarrod Flesch
dd3d985091
chore: upload field style fix ( #7942 )
2024-08-29 00:11:56 -04:00
Jarrod Flesch
de3d7c95e7
fix: prevents duplicate active nav indicators ( #7943 )
2024-08-29 00:11:42 -04:00
Elliot DeNolf
570422ff9a
chore(db-mongodb): adjust default exports ( #7945 )
2024-08-29 04:09:44 +00:00
Elliot DeNolf
53c41bdfd8
chore(cpa): unused vars ( #7944 )
2024-08-29 03:59:44 +00:00
Elliot DeNolf
e5c34ead16
chore: plugin lint fixes ( #7947 )
2024-08-29 03:59:16 +00:00
Elliot DeNolf
6e561b11ca
chore(graphql): adjust default exports ( #7946 )
2024-08-29 03:51:03 +00:00
Jarrod Flesch
f7146362df
chore: brings back tests from has many PR ( #7917 )
2024-08-28 22:44:58 -04:00
Elliot DeNolf
ec9d1cda2d
chore(eslint): lint:fix on all packages ( #7941 )
...
- Run `lint:fix` on all packages to fix anything that may have slipped
through without being autofixed
- A few manual fixes as well.
2024-08-29 02:35:17 +00:00
Elliot DeNolf
657326b528
chore(eslint): remove unused .eslintignore files [skip ci]
2024-08-28 22:12:19 -04:00
James Mikrut
538b7ee616
feat!: auto-removes localized property from localized fields within other localized fields ( #7933 )
...
## Description
Payload localization works on a field-by-field basis. As you can nest
fields within other fields, you could potentially nest a localized field
within a localized field—but this would be redundant and unnecessary.
There would be no reason to define a localized field within a localized
parent field, given that the entire data structure from the parent field
onward would be localized.
Up until this point, Payload would _allow_ you to nest a localized field
within another localized field, and this might have worked in MongoDB
but it will throw errors in Postgres.
Now, Payload will automatically remove the `localized: true` property
from sub-fields within `sanitizeFields` if a parent field is localized.
This could potentially be a breaking change if you have a configuration
with MongoDB that nests localized fields within localized fields.
## Migrating
You probably only need to migrate if you are using MongoDB, as there,
you may not have noticed any problems. But in Postgres or SQLite, this
would have caused issues so it's unlikely that you've made it too far
without experiencing issues due to a nested localized fields config.
In the event you would like to keep existing data in this fashion, we
have added a `compatibility.allowLocalizedWithinLocalized` flag to the
Payload config, which you can set to `true`, and Payload will then
disable this new sanitization step.
Set this compatibility flag to `true` only if you have an existing
Payload MongoDB database from pre-3.0, and you have nested localized
fields that you would like to maintain without migrating.
2024-08-29 01:56:17 +00:00
Elliot DeNolf
828f5d866d
build(scripts): add lint scripts to all, turbo lint tasks [skip ci]
2024-08-28 21:55:51 -04:00
Alessio Gravili
e375f6e727
feat: significantly reduce payload install size by removing unnecessary monaco-editor dependency ( #7939 )
...
This reduces the total install size of `payload` from 115 MB to 34 MB.
We never used monaco-editor within payload - we were only using
`@monaco-editor/react` which is a lot smaller.
Since we expose its types to the end user, we have to add it to our
`dependencies`, not `devDependencies`.
Before:
https://npmgraph.js.org/?q=payload@3.0.0-canary.1a675ae#select=exact%3Apayload%403.0.0-canary.1a675ae&zoom=w
After:
https://npmgraph.js.org/?q=payload%403.0.0-canary.cdb9474#zoom=h&select=exact%3Apayload%403.0.0-canary.cdb9474
2024-08-28 23:24:42 +00:00
Paul
cc9b877e88
fix: improve validation errors for unique fields ( #7937 )
2024-08-28 16:10:54 -06:00
Alessio Gravili
dc12047723
feat: reduce package size and amount of dependencies by upgrading json-schema-to-typescript ( #7938 )
...
Closes https://github.com/payloadcms/payload/issues/7934
2024-08-28 21:59:32 +00:00
Jarrod Flesch
12fb691e4f
chore: upload dropzone style changes ( #7932 )
2024-08-28 15:49:14 -04:00
Alessio Gravili
0962850086
fix: incorrect config.upload types ( #7874 )
...
Fixes https://github.com/payloadcms/payload/issues/7698
Now exporting `FetchAPIFileUploadOptions` from payload, as that type is
now used in `config.upload`.
2024-08-28 15:39:51 -04:00
Elliot DeNolf
78c8bb81a1
chore(release): v3.0.0-beta.95 [skip ci]
2024-08-28 14:49:15 -04:00