Elliot DeNolf
d88e0617d6
chore: sort release note sections
2024-10-06 09:59:51 -07:00
Jacob Fletcher
2ba40f3335
chore: removes duplicative join field test ( #8558 )
...
There are two of the exact same e2e tests for the join field, which
throws an error when running these tests locally because they have
identical names.
2024-10-05 09:13:43 -04:00
Elliot DeNolf
463490f670
fix(templates): await params/cookies properly ( #8560 )
2024-10-04 18:38:27 -07:00
Jacob Fletcher
d564cd44e9
chore: deflakes lexical e2e test ( #8559 )
...
This has caused me great pain. The problem with this test is that the
page was waiting for a URL which includes a search query that never
arrives. This moves the check into a regex pattern for a more accurate
catch.
2024-10-04 21:29:38 +00:00
Paul
7c62e2a327
feat(ui)!: scope all payload css to payload-default layer ( #8545 )
...
All payload css is now encapsulated inside CSS layers under `@layer
payload-default`
Any custom css will now have the highest possible specificity.
We have also provided a new layer `@layer payload` if you want to use
layers and ensure that your styles are applied after payload.
To override existing styles in a way that the existing rules of
specificity would be respected you can use the default layer like so
```css
@layer payload-default {
// my styles within the payload specificity
}
```
2024-10-04 13:02:56 -06:00
Sasha
400293b8ee
fix: duplicate with upload collections ( #8552 )
...
Fixes the duplicate operation with uploads
Enables duplicate for upload collections by default
2024-10-04 21:46:41 +03:00
Elliot DeNolf
e4a413eb9a
chore(release): v3.0.0-beta.111 [skip ci]
v3.0.0-beta.111
2024-10-04 11:31:06 -07:00
Sasha
b99590f477
chore(templates): update templates with next.js promises ( #8547 )
...
Updates templates according to this PR
https://github.com/payloadcms/payload/pull/8489
2024-10-04 21:28:43 +03:00
Alessio Gravili
0d3416c96d
fix(db-postgres): missing types for db.pool by moving @types/pg from devDependencies to dependencies ( #8556 )
...
Fixes lack of types in installed project:

Since we expose stuff from @types/pg to the end user, we need it to be
installed in the end users project => move to dependencies.
2024-10-04 17:39:03 +00:00
Sasha
0128eedf70
fix(drizzle)!: make radio and select column names to snake_case ( #8439 )
...
Fixes https://github.com/payloadcms/payload/issues/8402 and
https://github.com/payloadcms/payload/issues/8027
Before DB column names were camelCase:

After this change, they are snake_case:

#### Breaking SQLite / Postgres ⚠️
If you had any select (not `hasMany: true`) or radio fields with the
name in camelCase, for example:
```ts
{
name: 'selectReadOnly',
type: 'select',
admin: {
readOnly: true,
},
options: [
{
label: 'Value One',
value: 'one',
},
{
label: 'Value Two',
value: 'two',
},
],
},
```
This previously was mapped to the db column name `"selectReadOnly"`. Now
it's `select_read_only`.
Generate a new migration to rename your columns.
```sh
pnpm payload migrate:create
```
Then select "rename column" for targeted columns and Drizzle will handle
the migration.
---------
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com >
2024-10-04 16:25:05 +00:00
Sasha
414030e1f1
fix(drizzle): row / collapsible inside of localized fields ( #8539 )
...
Fixes https://github.com/payloadcms/payload/issues/8405
2024-10-04 11:48:54 -04:00
Jacob Fletcher
f6eb027f23
chore: repairs auto-generated file comments ( #8549 )
...
The comments injected into auto-generated files have gotten misformatted
due to linting. Here is the proper format, where both comments are
adjacent to one another:
```js
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
```
Some comments were also written with casing issues, here's an example:
```js
/* DO NOT MODIFY it because it could be re-written at any time. */
```
2024-10-03 23:37:08 -04:00
Sasha
cf8347f208
fix(ui): disableBulkEdit on ui fields, defaults to true ( #8540 )
...
Fixes https://github.com/payloadcms/payload/issues/8534
UI fields are now excluded by default from the bulk edit view fields
options.
If you need to have the UI field there, you can provide:
```ts
admin: {
disableBulkEdit: false
}
```
2024-10-04 01:07:47 +00:00
Paul
157b1e13ac
fix(plugin-seo): now respects serverURL and api routes configuration ( #8546 )
2024-10-04 00:04:20 +00:00
Sasha
a735f40310
docs: change req.params to req.routeParams ( #8380 )
...
`req.params` is an old notation, now we use `req.routeParams`
2024-10-04 02:59:05 +03:00
Alessio Gravili
e306c927a8
docs: fix broken link ( #8543 )
2024-10-03 18:46:23 +00:00
Paul
dffdb22a69
fix(templates): dark and light mode not correctly working on website template's header ( #8542 )
2024-10-03 17:42:20 +00:00
Alessio Gravili
8789b0b20d
chore: enable databaseAdapter writing again for pnpm dev ( #8532 )
2024-10-02 23:08:49 +00:00
Paul
eb4e3711ac
fix(templates): add no search results text to website template search page ( #8531 )
2024-10-02 22:16:29 +00:00
Paul
132131a4b9
fix(templates): static generation from incorrect params provided ( #8530 )
2024-10-02 21:36:46 +00:00
Dan Ribbens
9ef4fab65d
fix: ui crashes editing doc with deleted upload ( #8526 )
...
fix #8133
UI of a deleted item (will need another iteration).

2024-10-02 15:22:57 -04:00
Paul
65015aa750
fix(templates): add force-static to pages and posts ( #8527 )
2024-10-02 18:41:54 +00:00
Patrik
0f7d444e6d
fix(next): safely checks user within useEffect ( #8524 )
2024-10-02 14:17:15 -04:00
Jacob Fletcher
ca90d2b1c9
fix: properly resolves cjs withPayload export ( #8521 )
...
Importing `withPayload` as CommonJS using `require` does not properly
resolve. This was because the exported file path was using the `.cjs`
extension instead of `.js`.
2024-10-02 12:38:49 -04:00
Elliot DeNolf
ecfd90bc58
fix(templates): remove lock from website template ( #8520 )
...
Including this file was causing the dependency checker to error because
it was installing all `@lexical` packages on version 0.17.0, instead of
0.18.0.
![Uploading image.png…]()
2024-10-02 10:59:26 -04:00
Paul
86371449b8
fix(templates): fixed drafts not being unpublished in the frontend of the website template ( #8514 )
2024-10-01 23:01:06 +00:00
Paul
69203c5515
docs: fix formatting on join field specifying additional fields section ( #8509 )
2024-10-01 20:24:26 +00:00
Sasha
a8eceb03b6
fix(next): current published version label ( #8505 )
...
Fixes https://github.com/payloadcms/payload/issues/8502
includes `parent` to the `getLatestVersion` query
2024-10-01 21:22:00 +03:00
Sasha
fa59d4c0b2
feat!: update next@15.0.0-canary.173, react@19.0.0-rc-3edc000d-20240926 ( #8489 )
...
Updates the minimal supported versions of next.js to
[`15.0.0-canary.173`](https://github.com/vercel/next.js/releases/tag/v15.0.0-canary.173 )
and react to `19.0.0-rc-3edc000d-20240926`.
Adds neccessary awaits according to this breaking change
https://github.com/vercel/next.js/pull/68812
## Breaking Changes
The `params` and `searchParams` types in
`app/(payload)/admin/[[...segments]]/page.tsx` and
`app/(payload)/admin/[[...segments]]/not-found.tsx` must be changed to
promises:
```diff
- type Args = {
- params: {
- segments: string[]
- }
- searchParams: {
- [key: string]: string | string[]
- }
- }
+ type Args = {
+ params: Promise<{
+ segments: string[]
+ }>
+ searchParams: Promise<{
+ [key: string]: string | string[]
+ }>
+ }
```
2024-10-01 13:16:11 -04:00
Germán Jabloñski
d80410b228
fix(ui): admin.allowCreate in upload field ( #8484 )
...
The admin.allowCreate property on the upload field was not doing what it
was supposed to do. In fact, it was doing nothing.
From now on, when set to false, the option to create a new upload from
the UI disappears.



The tests cover:
- the create new button disappears.
- the option to create one by drag and drop disappears.
- the create new button inside the drawer disappears.
2024-09-30 18:54:34 -03:00
Dan Ribbens
27b1629927
fix(db-postgres, db-sqlite): joins relation name ( #8491 )
...
A join field on a relationship with a camelCase name would cause an
error from drizzle due to the relation name not matching.
2024-09-30 16:47:21 -04:00
Paul
dfdea0d4eb
chore: update vscode launch settings for debugging test suites ( #8399 )
2024-09-30 15:18:03 -04:00
Elliot DeNolf
96d99cb361
chore(release): v3.0.0-beta.110 [skip ci]
v3.0.0-beta.110
2024-09-30 13:19:32 -04:00
Dan Ribbens
3f375cc6ee
feat: join field on upload fields ( #8379 )
...
This PR makes it possible to use the new `join` field in connection with
an `upload` field. Previously `join` was reserved only for
relationships.
2024-09-30 13:12:30 -04:00
Dan Ribbens
3847428f0a
fix(db-*): make db.begintransactions required ( #8419 )
...
Changing the transcations functions on the db so that projects using
typescript `strict: true` do not need to type narrow before using it.
2024-09-30 13:12:07 -04:00
Sasha
7b6a760e97
fix(db-mongodb): duplicate versions with parent string ids ( #8487 )
...
Fixes https://github.com/payloadcms/payload/issues/8441
we may want to add a predifined migration that changes all what's needed
to ObjectIDs @DanRibbens
2024-09-30 13:06:48 -04:00
James Mikrut
0c1004537d
fix: draft status access control checks ( #8486 )
2024-09-30 16:41:54 +00:00
Sasha
e765a5e866
fix: reset password link extra slash and thread admin.routes.reset property ( #8448 )
...
Removes extra slash
from:
`http://host/admin//reset/token `
to:
`http://host/admin/reset/token `
Threads `admin.routes.reset`:
```ts
const config: Config = {
admin: {
routes: {
reset: '/custom-reset',
},
},
}
```
2024-09-30 19:06:19 +03:00
Ante
f543e8963e
chore(translations): croatian translation improvements ( #7413 )
...
Croatian translation is improved for better choice of words in given
context, typos, extra whitespaces and consistency of formal pronouns
use.
2024-09-30 12:04:34 -04:00
Alessio Gravili
163f3c0692
feat(richtext-lexical): export $createInlineBlockNode, $isInlineBlockNode and InlineBlockNode ( #8480 )
2024-09-30 13:42:49 +00:00
Dan Ribbens
4241811fa9
fix: sorting by id incorrectly orders by version.id ( #8442 )
...
fixes #7187
2024-09-30 09:16:41 -04:00
Patrik
8110cb9956
fix(db-mongodb): properly filters out number field values with the exists operator filter ( #8416 )
...
V2 PR [here](https://github.com/payloadcms/payload/pull/8415 )
2024-09-30 08:59:58 -04:00
Paul
e5ca476d7f
fix(ui): RTL not applying for localised textarea fields ( #8474 )
2024-09-29 19:25:09 +00:00
Alessio Gravili
161749bde9
chore: fix build by adding missing translation keys ( #8471 )
2024-09-29 10:56:36 +00:00
Mike Bailey
22f120dc85
feat(translations): add danish translations ( #7809 )
...
Added Danish (da-DK) translations for Beta
2024-09-28 18:13:31 -04:00
Alessio Gravili
e7b44dc545
chore: add workaround for unsettled top-level await script failures ( #8467 )
...
currently only for pnpm dev
2024-09-28 17:53:45 +00:00
Germán Jabloñski
8b44676b0d
feat(richtext-lexical)!: upgrade lexical from 0.17.0 to 0.18.0, make tables more reliable ( #8444 )
...
This PR
- Introduces multiline markdown transformers / mdx support
- Introduce `shouldMergeAdjacentLines` option in
`$convertFromMarkdownString`. If true, merges adjacent lines as per
commonmark spec. This would allow to close:
https://github.com/payloadcms/payload/issues/8049
- Many new features and bug fixes!
- Ports over changes from the lexical playground. Most notably:
- add support for enabling table row stripping
- make table resizing & table cell selection more reliable
**BREAKING**: This upgrades lexical from 0.17.0 to 0.18.0. If you have
any lexical packages installed in your project, please update them
accordingly. Additionally, if you depend on the lexical APIs, please
consult their changelog, as lexical may introduce breaking changes:
https://github.com/facebook/lexical/releases/tag/v0.18.0
---------
Co-authored-by: Alessio Gravili <alessio@gravili.de >
2024-09-28 13:10:44 -04:00
Sasha
613d3b090e
fix(drizzle): hasMany / poly relationships nested to localized fields / nested blocks to localized fields ( #8456 )
...
fixes https://github.com/payloadcms/payload/issues/8455 and
https://github.com/payloadcms/payload/issues/8462
- Builds the `_locale` column for the `_rels` when it's inside of a
localized group / tab
- Properly builds `sanitizedPath` for blocks in the transform-read
function when it's inside of a localized field. This fixes with fields
inside that have its own table (like `_rels`, select `hasMany: true`
etc)
Adds _more_ tests!
2024-09-28 17:33:50 +03:00
Paul
fb603448d8
feat(templates): add search functionality to the website template ( #8454 )
...
- adds a /search and search plugin example to website template
- adds an additional check for valid paths on /preview
- fixes a few bugs around the site
2024-09-27 18:01:58 -06:00
Germán Jabloñski
f50174f5b8
fix(richtext-lexical): match the indentation spacing of paragraphs and lists ( #8437 )
...
Before this, indented paragraphs, un/ordered list-items, and checkbox
list-items had 3 different sizes.
This PR unifies all 3 to match.
Related:
- https://github.com/payloadcms/payload/pull/8138
- https://github.com/facebook/lexical/pull/4025
List-items were using a custom indentation size, instead of the
browser's default. The reason I'm adapting list-items to this default
size and not the paragraphs to list-items, is because when
importing/exporting html in contexts where our CSS isn't present, visual
consistency is maintained.
Also, the browsers' default looks fine to me.
Note: Lexical's detection of whether the checkbox is clicked is a bit
hacky. I've made sure it doesn't break and added an explanatory comment
to prevent anyone from breaking it in the future.
## Before

## After

2024-09-27 13:28:36 -03:00