Commit Graph

11978 Commits

Author SHA1 Message Date
Elliot DeNolf
4f1a4a28a3 chore: remove changelog.md from git staging 2024-11-19 14:33:10 -05:00
Elliot DeNolf
41d2e64a3a ci(scripts): remove updating changelog.md 2024-11-19 14:31:55 -05:00
Jarrod Flesch
661f450c61 fix(ui): client side doc data not updating after save (#9340)
### What?
When a document is saved the data from useDocumentInfo was stale.

### Why?
Previously we would refresh the entire document by calling the
form-state endpoint, we no longer do that.

### How?
Adds a new variable accessible from useDocumentInfo,
`savedDocumentData`, that is updated when the document is successfully
saved and defaults to initialData.
2024-11-19 13:22:23 -05:00
Elliot DeNolf
69b7a11a28 ci: remove v3 tagging, assumed 2024-11-19 13:15:20 -05:00
Said Akhrarov
2c7ea6362a fix(ui): show required indicator for select fields (#9348)
### What?
Select field was not showing required indicator despite being marked
required in config.

### Why?
To give end-user feedback when editting required select fields.

### How?
Replacing hardcoded required prop with required prop passed in from
config.

[See
here.](https://github.com/payloadcms/payload/blob/main/packages/ui/src/fields/Select/Input.tsx#L100)
2024-11-19 12:55:26 -05:00
Jessica Chowdhury
077d3e7d16 chore: adjust api code preview indentation (#9114) 2024-11-19 12:42:36 -05:00
Jacob Fletcher
188baec34c fix(ui): proper permissions within version diff view (#9346)
Fixes #9337. The version view was not able to render its diff because of
an invalid permissions lookup. This was a result of a change to how
access results are returned from the API, which are now sanitized:
https://github.com/payloadcms/payload/pull/7335
2024-11-19 12:39:05 -05:00
Elliot DeNolf
d9c6288cb2 chore: update migration guide link 2024-11-19 12:25:35 -05:00
Jessica Chowdhury
037662d9f5 chore(examples): migrates custom-component example to latest beta [skip-lint] (#9170)
Updates the `Custom Components` example, including packages, readme,
lockfile, types and the custom fields.

---------

Co-authored-by: Patrik Kozak <patrik@payloadcms.com>
2024-11-19 11:40:20 -05:00
Patrik
389ef16a5f chore(examples): migrates whitelabel example to 3.0 (#9316) 2024-11-19 11:36:28 -05:00
Elliot DeNolf
cb3d7b37ef chore: remove v2 changelog 2024-11-19 11:29:15 -05:00
Marc Maceira
d542bd774d docs: fix broken links to release notes in migration guide (#9333) 2024-11-19 11:17:26 -05:00
Paul
7f65c83a98 fix(templates): website logo not showing (#9334) 2024-11-19 15:06:56 +00:00
Jacob Fletcher
0f3f6e73da fix(ui): addFieldRow set modified (#9324)
Fixes #9264. When externally updating array or block rows through the
`addFieldRow` or `replaceFieldRow` methods, nested rich text fields
along with any custom components within them are never rendered. This is
because unless the form is explicitly set to modified, as the default
array and blocks fields currently do, the newly generated form-state
will skip the rendering step. Now, the underlying callbacks themselves
automatically set the form to modified to trigger rendering.
2024-11-19 08:52:50 -05:00
James Mikrut
a50029f659 Update README.md 2024-11-19 08:44:22 -05:00
James Mikrut
197a22fb28 chore: uses payload.auth in website template seed function (#9331)
Uses `payload.auth` in the website template seed function, which is
better than manually verifying the JWT.
2024-11-19 08:36:53 -05:00
garrettgrohman
6d74fbc6cb docs: fixes generic grammar mistakes 2024-11-19 08:28:32 -05:00
Jarrod Flesch
f42b1e1e05 fix: could not save selection from upload has many drawer (#9325)
### What?
Could not finalize selection of `hasMany` uploads inside of the drawer.

### Why?
The Select component was not being rendered in the beforeActions prop of
the ListControls when row selections was enabled.

### How?
Renders the Select component when row selections are enabled and
onBulkSelect is present.
2024-11-19 08:23:02 -05:00
Sean Zubrickas
bb4f69fb0c chore: updates README banner 2024-11-19 07:00:19 -05:00
Paul
26cb1e1546 fix(templates): seeding in website template moved to a separate route so timeout can be customised (#9327) 2024-11-19 00:03:22 -06:00
Alessio Gravili
5d2b0b30b0 perf: significantly reduce HTML we send to the client. Up to 4x smaller (#9321)
The biggest difference comes from calling `RenderServerComponent` as a
function, instead of rendering it by using `<RenderServerComponent`.

This gets rid of wasteful blocks of codes sent to the client that look
like this:

![CleanShot 2024-11-18 at 20 41
20@2x](https://github.com/user-attachments/assets/edb67d72-f4a5-459b-93f4-68dc65aeffb6)


HTML size comparison:

## Admin test suite

| View | Before | After |
|------|---------|--------|
| Dashboard | 331 kB | 83 kB |
| collections/custom-views-one Edit | 285 kB | 76.6 kB |

## Fields test suite

| View | Before | After |
|------|---------|--------|
| collections/lexical Edit | 189 kB | 94.4 kB |
| collections/lexical List | 152 kB | 62.9 kB |

## Community test suite

| View | Before | After |
|------|---------|--------|
| Dashboard | 78.9 kB | 43.1 kB |
2024-11-19 04:30:21 +00:00
Alessio Gravili
1425d58b57 chore: make uploads e2e test suite not flaky (#9323)
The problem was that the uploads test suite was trying to log in to
payload before it was even initialized.

In the rare event where payload started up before the uploads test suite
was trying to log in, our tests passed.
2024-11-19 03:50:35 +00:00
Blain Maguire
d3b0a045be fix: allow setting admin path route from config (#8085) 2024-11-18 21:20:23 -05:00
Elliot DeNolf
7e41f17ec2 chore: update README for 3.0 2024-11-18 20:53:13 -05:00
Elliot DeNolf
763ccdcf00 chore(release): eslint/3.0.0 2024-11-18 20:39:54 -05:00
Elliot DeNolf
76286136ba chore(cpa): update init next to use latest 2024-11-18 20:29:07 -05:00
Elliot DeNolf
6145accb83 chore(templates): bump all templates to 3.0 2024-11-18 20:25:52 -05:00
Elliot DeNolf
6407e577d3 chore(release): v3.0.0 [skip ci] 2024-11-18 20:10:16 -05:00
Elliot DeNolf
7fe207937f ci: update release script for v3 2024-11-18 20:05:55 -05:00
Elliot DeNolf
cc04396a4f chore(cpa): unpin template version tag for release 2024-11-18 20:00:38 -05:00
Dan Ribbens
0d63dc9f9c chore: remove unused transaction in website seed (#9319) 2024-11-18 19:55:27 -05:00
Alessio Gravili
f7fc8a2ea0 perf(richtext-lexical): do not send default lexical editor config to client (#9318)
We can just get the default config from the client, if the server passes
undefined. This wasted bandwidth and unnecessarily increased the html
size
2024-11-18 17:28:55 -07:00
Elliot DeNolf
fade739f77 chore(release): v3.0.0-beta.135 [skip ci] 2024-11-18 19:19:55 -05:00
Said Akhrarov
1a31e63b4d fix(ui): safely accesses field in default filter component (#9276)
### What?
In the WhereBuilder Condition DefaultFilter component, there is a switch
statement that contains components to return based on the built filter
in the admin ui. Having a filter built out then navigating to another
collection list view causes an error to occur due to InternalField being
undefined but the DefaultFilter tries to access the field on it.

### Why?
To fix unexpected `cannot access property field of undefined` errors.

### How?
Adding a conditional chaining operator.

Odd thing here is that the `Text` component where this error originates
from doesn't actually make use of the passed `InternalField`. Might be
worth it to take a closer look at it.

Fixes #9179
2024-11-18 17:52:29 -05:00
Dan Ribbens
a25ddc5448 docs: migration guide more info (#9305) 2024-11-18 17:35:36 -05:00
Elliot DeNolf
ecbafbf181 fix(templates): remove req from seed script 2024-11-18 16:58:16 -05:00
Elliot DeNolf
7314990b0c chore(templates): add .npmrc files 2024-11-18 16:38:36 -05:00
Elliot DeNolf
58eeb6e47c chore(templates): bring back needed lock files 2024-11-18 16:35:56 -05:00
Germán Jabloñski
f1eab5d5d3 chore(richtext-lexical): re-export lexical (#9229)
Co-authored-by: Alessio Gravili <alessio@gravili.de>
2024-11-18 16:27:36 -05:00
James Mikrut
6873b139e2 chore(examples): removes nested docs, redirects, virtual fields, custom server, and hierarchy examples (#9112)
Removes examples that are now duplicative or unnecessary due to new
features in 3.0:

### Custom server

This one can be removed in favor of [Next.js
documentation](https://nextjs.org/docs/pages/building-your-application/configuring/custom-server)

### Hierarchy

The new `join` field can solve for many of the use cases for the
`hierarchy` example. Bi-directional relationships with the `join` field
should be preferred here.

### Nested Docs, Redirects

Our website template showcases how to use the `nested-docs` and
`redirects` plugins in-depth, with real-world examples.

### Virtual Fields

Virtual fields have gotten significantly easier and can now be defined
by specifying `virtual: true`. Not a big need for a full example any
longer.

---------

Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
2024-11-18 16:11:21 -05:00
Sophia Michelle Andren
54379eccf4 feat: new Payload logo (#9240)
Introducing the new Payload logo! 🎉


![Payload_Opengraph](https://github.com/user-attachments/assets/387e0841-9498-43df-bf01-f78adb7cdfcf)
2024-11-18 16:08:59 -05:00
Jarrod Flesch
7989563bc1 chore: updates multi tenant example to use baseListFilter (#9308)
### What?
Implements new `baseListFilter` into the multi-tenant example

---------

Co-authored-by: Patrik Kozak <patrik@payloadcms.com>
2024-11-18 15:59:54 -05:00
Patrik
7babe6bcf5 chore(examples): migrates multi-tenant example to latest beta (#9300) 2024-11-18 15:45:20 -05:00
Nate
bccb7c0ff7 chore: update README.md (#9304)
Fixes url to banner asset.
2024-11-18 15:44:42 -05:00
Elliot DeNolf
333da1bb42 fix(templates): seed from url (#9306)
Update website template seeding to use URLs instead of image assets.
Images are not available when deployed to vercel.
2024-11-18 15:41:20 -05:00
Elliot DeNolf
2b955a4aa3 chore(cpa): remove beta from vercel pg and sqlite 2024-11-18 15:40:18 -05:00
Elliot DeNolf
e796ff2330 chore(templates): add back payload cloud to plugins array 2024-11-18 15:31:45 -05:00
mattddean
0075b99eec fix(graphql): loading of polymorphic hasMany relationships (#9175)
### What?

Bug #9173

### Why?

`collectionSlug` is an array when `isRelatedToManyCollections` is true

### How?

Compare array to array

Fixes #9173

![Screenshot 2024-11-13 at 12 37
52 PM](https://github.com/user-attachments/assets/3eae497d-90d8-474a-afd0-baf69f017459)
2024-11-18 22:25:42 +02:00
Sasha
e40141b559 fix: queues types with strict: true (#9281)
Fixes types for workflows / jobs `input` and `output` when using
`strict: true` or `strictNullChecks: true` by ensuring that all
properties in generates types are requried
2024-11-18 21:49:08 +02:00
Jacob Fletcher
ec95ce8758 fix(next): passes doc through edit view handler (#9302)
The Edit and Live Preview views were duplicately making the same Local
API requests for document data. This is because while the top-level
document view handler makes these requests _before_ rendering the Live
Preview view, it wasn't passing it's data through as props. This has
also led to inconsistencies in the options being passed through the
requests themselves, such as `locale`, `user`, and `overrideAccess:
false`. Everything is now standardized as expected through the existing
`getDocumentData` utility.
2024-11-18 14:27:40 -05:00