Commit Graph

12195 Commits

Author SHA1 Message Date
Alessio Gravili
81a904af96 Merge remote-tracking branch 'origin/beta' into feat/on-demand-rsc 2024-11-07 10:42:39 -07:00
Tylan Davis
1267aedfd3 docs: closes <strong> tags properly on jobs queue documentation (#9067)
### What?

Fixes a formatting issue that prevents
payloadcms.com/docs/beta/jobs-queue/overview from displaying properly.
There were a couple `<strong>` tags in the `jobs-queue/overview` docs
that did not have proper closing `</strong>` tags.
2024-11-07 12:42:16 -05:00
Alessio Gravili
0d468ffc6c fix(richtext-lexical): cell: replace headless editor functions to get text content with good old recursive loop, and improve display of non-text node types.
Using the headless editor was very glitchy. If the server encounters any error anywhere, then any consecutive visit of the list view, where the headless editor will run, will throw a lexical error about no active editor being found when "parseEditorState" is run, despite parseEditorState initializing a new active editor. This is cached in module scope, and server-side errors in Next.js seem to break that behavior for some reason
2024-11-07 10:41:23 -07:00
Jarrod Flesch
c35b3164a4 Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-11-07 12:22:53 -05:00
Jarrod Flesch
f4517685df adjust list header rendering 2024-11-07 12:22:22 -05:00
Alessio Gravili
51ec6b2fa4 Merge remote-tracking branch 'origin/beta' into feat/on-demand-rsc 2024-11-07 10:17:40 -07:00
Alessio Gravili
fdbf86d394 fix document drawer abort controller madness 2024-11-07 09:52:38 -07:00
Elliot DeNolf
e907724af7 chore(cpa): use git tags for template urls (#9065)
`create-payload-app` will now use git tags when cloning down the
templates instead of using latest from a branch.

The mechanism is cpa will read its own package.json version and use that
as a git tag prefixed w/ `v`
2024-11-07 11:47:26 -05:00
Jacob Fletcher
b9c41ee095 fix existing doc drawer initialization 2024-11-07 11:37:14 -05:00
Alessio Gravili
652e6910c9 fix some lexical tests again 2024-11-07 09:11:52 -07:00
James
a749617a04 Merge branch 'feat/on-demand-rsc' of github.com:payloadcms/payload into feat/on-demand-rsc 2024-11-07 11:07:38 -05:00
James
f3cf304b6a chore: type fixes 2024-11-07 11:07:19 -05:00
Elliot DeNolf
320916f542 ci: build templates with packed deps (#8970)
Build templates using packed deps from the repo.
2024-11-07 10:49:21 -05:00
Alessio Gravili
9d5dd5a61a fix flakes 2024-11-07 08:40:23 -07:00
Alessio Gravili
aa5abeea7e fix: re-render entire field when removing a row. Otherwise, the array index in paths of RSC sibling fields will not change 2024-11-07 08:40:09 -07:00
James
e11ad3371b Merge branch 'feat/on-demand-rsc' of github.com:payloadcms/payload into feat/on-demand-rsc 2024-11-07 10:05:17 -05:00
James
d352c35c22 chore: type fixes 2024-11-07 10:04:35 -05:00
Jarrod Flesch
ac85bc4d04 Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-11-07 09:56:28 -05:00
Jarrod Flesch
4b2e86328a fix: upload allowCreate 2024-11-07 09:56:16 -05:00
Jarrod Flesch
5e3eab7db4 chore: revert list header classname to current beta css class name 2024-11-07 09:55:51 -05:00
Jacob Fletcher
cde1135106 fix relationship drawers 2024-11-07 09:38:31 -05:00
Jarrod Flesch
fcecad6b2f Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-11-07 09:16:53 -05:00
Jarrod Flesch
1e696bdbde chore: passing fields->relationships 2024-11-07 09:16:40 -05:00
Alessio Gravili
0c8debe71d fix some slate tests due to new class names 2024-11-06 22:19:07 -07:00
Alessio Gravili
2bba6c80c5 fix: ensure drawers increase editdepth 2024-11-06 22:18:13 -07:00
Alessio Gravili
301666006c reduce lexical flakes 2024-11-06 21:14:32 -07:00
Alessio Gravili
205650d26d reduce lexical flakes 2024-11-06 21:12:09 -07:00
Paul
015580aa32 feat(templates): add adminThumbnail to media in website template (#9059) 2024-11-07 03:25:27 +00:00
Jarrod Flesch
05b83f71de Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-11-06 21:10:34 -05:00
Jarrod Flesch
f097287c8c chore: passing fields->blocks 2024-11-06 21:08:47 -05:00
Jarrod Flesch
1caf5d9327 chore: passing fields->email 2024-11-06 21:07:43 -05:00
James
23afac9b01 chore: passing form-builder tests 2024-11-06 17:52:36 -05:00
James
4548d30f03 Merge branch 'feat/on-demand-rsc' of github.com:payloadcms/payload into feat/on-demand-rsc 2024-11-06 17:47:17 -05:00
James
b7a1f4c773 chore: passing plugin-seo 2024-11-06 17:47:03 -05:00
Patrik
f1ba9ca82a chore: updates flaky locked-documents e2e tests (#9055) 2024-11-06 16:49:06 -05:00
Elliot DeNolf
f878e35cc7 chore(release): v3.0.0-beta.126 [skip ci] v3.0.0-beta.126 2024-11-06 16:23:57 -05:00
Jacob Fletcher
6cc18e9a21 renames renderFieldMethod to renderFieldFn 2024-11-06 16:05:01 -05:00
Dan Ribbens
f0f96e7558 fix: allow workflows to be empty or undefined (#9039)
### What?

- Makes `jobs.workflows` optional
- Dynamically include the `workflowSlugs` select field in the jobs
collection as needed

### Why?

When configuring jobs, it should be possible to define `job` with just
some simple tasks and not be forced to define workflows.

### How?

Workflows type was made optional and optional chaining is added where
needed. The workflowSlugs field is added to the jobs collection if
workflows are defined.

Fixes #

When using postgres, the workflowSlugs being an empty enum cause an
error when drizzle fails to detect the enum already exists. This results
in the error `"enum_payload_jobs_workflow_slug" already exists`. Drizzle
tries to make the enum as: `enum_payload_jobs_workflow_slug as enum();`
and the check for existing enums only works when it has values.
2024-11-06 15:50:17 -05:00
Javier
0165ab8930 fix: replace console.error with logger.errors (#9044)
## Problem
When `PayloadRequest` objects are logged using `console.log`, it creates
unstructured, multiline entries in logging services like DataDog and
Sentry. This circumvents the structured logging approach used throughout
the rest of the codebase.

## Solution
Replace `console.x` calls with the structured logging system when
logging `payload.logger.x` objects. This ensures consistent log
formatting and better integration with monitoring tools.

## Changes
- Replaced instances of `console.log` with structured logging methods
only in `@payloadcms/next`
- Maintains logging consistency across the codebase
- Improves log readability in DataDog, Sentry, and other monitoring
services

## First

<img width="914" alt="Screenshot 2024-11-06 at 09 53 44"
src="https://github.com/user-attachments/assets/019b6f4b-40ed-4e54-a92a-8d1b50baa303">

## Then

<img width="933" alt="Screenshot 2024-11-06 at 00 50 29"
src="https://github.com/user-attachments/assets/0a339db4-d706-4ff9-ba8c-80445bbef5d0">
2024-11-06 15:49:27 -05:00
Sasha
213b7c6fb6 feat: generate types for joins (#9054)
### What?
Generates types for `joins` property.
Example from our `joins` test, keys are type-safe:
<img width="708" alt="image"
src="https://github.com/user-attachments/assets/f1fbbb9d-7c39-49a2-8aa2-a4793ae4ad7e">

Output in `payload-types.ts`:
```ts
 collectionsJoins: {
    categories: {
      relatedPosts: 'posts';
      hasManyPosts: 'posts';
      hasManyPostsLocalized: 'posts';
      'group.relatedPosts': 'posts';
      'group.camelCasePosts': 'posts';
      filtered: 'posts';
      singulars: 'singular';
    };
  };
```
Additionally, we include type information about on which collection the
join is, it will help when we have types generation for `where` and
`sort`.

### Why?
It provides a better DX as you don't need to memoize your keys.

### How?
Modifies `configToJSONSchema` to generate the json schema for
`collectionsJoins`, uses that type within `JoinQuery`
2024-11-06 22:43:07 +02:00
Jacob Fletcher
0a61160665 deflakes custom logout route e2e 2024-11-06 15:35:10 -05:00
Jarrod Flesch
3c288facda Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-11-06 15:12:49 -05:00
Jarrod Flesch
f9ea396955 chore: passing fields->array 2024-11-06 15:12:32 -05:00
Alessio Gravili
9cccbba2e1 increase expect timeout. 2.5s is sometimes not enough for saving document 2024-11-06 13:09:28 -07:00
Jacob Fletcher
29c9e45ce6 deflakes routing e2e 2024-11-06 15:05:19 -05:00
Jarrod Flesch
f70ef8dac3 Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-11-06 14:59:29 -05:00
Jarrod Flesch
d6d214b745 implement RowLabels 2024-11-06 14:59:14 -05:00
Jessica Chowdhury
7dc52567f1 fix: publish locale with autosave enabled and close dropdown (#8719)
1. Fix publish specific locale option when no published versions exist
2. Close the publish locale dropdown on click
2024-11-06 14:36:28 -05:00
Alessio Gravili
90d9d6e17d speed up reinitDB for mongodb by not waiting for index creation to be completed 2024-11-06 12:13:25 -07:00
Alessio Gravili
f2d2630336 log time for reInitializeDB 2024-11-06 11:57:53 -07:00