Commit Graph

11846 Commits

Author SHA1 Message Date
Jarrod Flesch
bbe0fa38ae Merge branch 'beta' into rsc-schemaPaths 2024-10-25 10:06:38 -04:00
Jarrod Flesch
d32798a2a0 removes unused props, threads readOnly through to missing fields 2024-10-25 09:20:56 -04:00
Jarrod Flesch
11c505930d undo test in array config 2024-10-25 00:52:58 -04:00
Jarrod Flesch
0dcb109101 Merge remote-tracking branch 'refs/remotes/origin/rsc-schemaPaths' into rsc-schemaPaths 2024-10-25 00:26:38 -04:00
Jarrod Flesch
95a2bc4d1e wires up field permissions 2024-10-25 00:18:25 -04:00
Elliot DeNolf
1b1dc82cfb feat!: rename @payloadcms/plugin-cloud (#8828)
BREAKING CHANGE: Rename `@payloadcms/plugin-cloud` to
`@payloadcms/payload-cloud`. Anyone using the existing plugin will need
to switch to using the new package.

## Why?

Since v3 will be using _fixed versioning_, all versions of `^3` must be
available. Unfortunately, the `@payloadcms/plugin-cloud` version has
already breached that version number. Renaming will allow it to be on
the same version as other monorepo packages.

Additionally, the name `plugin-cloud` is quite ambiguous and sometimes
is confused with `plugin-cloud-storage`, so using `payload-cloud` feels
like a good move to make this more evident.
2024-10-24 21:19:15 -04:00
Paul
2df8f94a75 fix(plugin-search): issues with overriding the search collection slug consistently across hooks (#8847)
Fixes https://github.com/payloadcms/payload/issues/8842
2024-10-25 00:29:39 +00:00
Paul
e72e81c3da fix(ui): upload buttons being hidden at mobile screen widths (#8860) 2024-10-24 22:29:29 +00:00
Alessio Gravili
3f9c7e2acd remove console log 2024-10-24 15:33:18 -06:00
Alessio Gravili
50a1770d7e fix buildFormState for partial schema paths (fixes adding array rows) 2024-10-24 15:32:37 -06:00
Alessio Gravili
9bf24c0379 fix schema path handling in createClientConfig 2024-10-24 15:13:54 -06:00
Alessio Gravili
2429f64f3a fix faulty logic in buildPathSegments 2024-10-24 15:09:24 -06:00
Alessio Gravili
5adcff3e76 fix usage of createClientField 2024-10-24 14:52:37 -06:00
Elliot DeNolf
b1b571d53e ci: do not run pr-title on synchronize event 2024-10-24 16:48:05 -04:00
Paul
085e127217 fix(ui): leave without saving when changing /account theme (#8724)
Fixes an annoying instance where on the /account page if you change your
theme then navigate away the Leaving without save popup is triggered
even though you don't need to submit a form or trigger a save in order
to change your admin theme.
2024-10-24 16:46:19 -04:00
Alessio Gravili
bc155c4a87 use array paths / schema paths where possible, add _index- path segments to server-side operation paths / schema paths, merge generatePath and getFieldPaths 2024-10-24 14:45:40 -06:00
Anders Semb Hermansen
4d44c378ed feat: sort by multiple fields (#8799)
This change adds support for sort with multiple fields in local API and
REST API. Related discussion #2089

Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2024-10-24 15:46:30 -04:00
Sasha
6e919cc83a perf: index globals versions timestamps by default (#8821) 2024-10-24 14:58:59 -04:00
Elliot DeNolf
1a15425b59 fix(cpa): properly detect if pnpm exists on windows (#8855)
Use `where <command>` if using windows when detecting package manager
2024-10-24 14:53:11 -04:00
Sasha
9069bd3fac fix(db-postgres): sort by localized fields (#8839)
### What?
Fixes https://github.com/payloadcms/payload/issues/5152 issue related to
sorting by a localized field with SQLite / Postgres database adapters.

### Why?
It was an incorrect behaviour.


### How?
Modifies the `getTableColumnFromPath` file to have correct join
conditions. Previously if you had this structure in the _locales table
_locale title parent
en          A    1
es          B     1
we sorted by everything that's here, but we need to sort only by the
passed locale.

Additionally fixes a typescript error in `dev.ts` that I added here
https://github.com/payloadcms/payload/pull/8834

Also, removes the condition with `joins.length` in `countDistinct`. It
was there as for this issue
https://github.com/payloadcms/payload/issues/4889 because sorting by a
localized property caused duplication. This can simnifically improve
performance for `.find` with nested querying/sorting on large data sets,
because `count(*)` is faster than `count(DISTINCT id)`
2024-10-24 14:47:58 -04:00
Jarrod Flesch
b3021b559a fix row styling 2024-10-24 14:35:09 -04:00
Jarrod Flesch
1bc7d91c4f remove path path debug paragraph text 2024-10-24 14:27:57 -04:00
Jarrod Flesch
42dd173986 Merge remote-tracking branch 'refs/remotes/origin/rsc-schemaPaths' into rsc-schemaPaths 2024-10-24 14:26:02 -04:00
Jarrod Flesch
d9b188061d feat: working arrays 2024-10-24 14:25:02 -04:00
Hristiyan Dodov
2e11068f49 feat(richtext-slate): add useElement hook to richtext-slate client exports (#8856)
I'm extending the Slate editor with a custom component and everything
works great, except I have to import `useElement()` like this:

```tsx
import { useElement } from 'node_modules/.pnpm/@payloadcms+richtext-slate@3.0.0-beta.113_monaco-editor@0.51.0_next@15.0.0-canary.191_@babel+_qmdxs6s5hpzjhuopohgawpvl6i/node_modules/@payloadcms/richtext-slate/dist/field/providers/ElementProvider.js'

export function Element() {
	const { attributes, children } = useElement()
	return (
		<p {...attributes} className="rich-text-preheading">
			{children}
		</p>
	)
}
```

That's because it's not in the `@payloadcms/richtext-slate/client`
module. This PR fixes this and would allow me to do:

```tsx
import { useElement } from '@payloadcms/richtext-slate/client'
```
2024-10-24 11:50:09 -06:00
Elliot DeNolf
749a7d9131 chore(cpa): remove beta from postgres selection 2024-10-24 13:07:38 -04:00
Alessio Gravili
8e5ec02037 ensure form state always includes _index, ensure _index is always stripped away from DATA 2024-10-24 10:19:19 -06:00
Alessio Gravili
e51067ccaf fix: remove _index- from data before sending it to the server, as it's not processed by the server 2024-10-23 22:55:26 -06:00
Alessio Gravili
d48cb1b8eb fix schemaPath handling for collapsibles and rows 2024-10-23 22:22:51 -06:00
Alessio Gravili
acc4432a99 fix partial schema path handling 2024-10-23 22:06:58 -06:00
Alessio Gravili
be5772b71c fix buildStateFromSchema path input 2024-10-23 21:59:46 -06:00
Alessio Gravili
c1222b5e06 fixes 2024-10-23 21:49:10 -06:00
Jarrod Flesch
24d5bc88f6 dont render if hidden 2024-10-23 23:24:12 -04:00
Alessio Gravili
06750e1f4a remove schemaAccessor 2024-10-23 21:20:20 -06:00
Alessio Gravili
0aaa4fe643 throw proper error if block data contains unknown block slug 2024-10-23 20:54:34 -06:00
Alessio Gravili
cb6a0249fb fix array error 2024-10-23 20:54:16 -06:00
Elliot DeNolf
b482da63c6 chore(release): v3.0.0-beta.118 [skip ci] v3.0.0-beta.118 2024-10-23 22:07:05 -04:00
Jarrod Flesch
06536eb275 chore: almost working 2024-10-23 17:07:34 -04:00
MotorcycleEnjoyer
0fcbce3a01 feat(templates): add a copy button to website template code blocks (#8794)
## WHAT
- Adds a copy code button to the Code Blocks in V3 Beta Website
Template.
- Uses the existing button from `@/components/ui/button`
- SVG from this website: https://uxwing.com/copy-icon/


https://github.com/user-attachments/assets/2f6e720a-de37-40b5-a3bf-c748a69502b5

## WHY
- Copy-Code button is convenient for users looking at code blocks in
tutorials/documentation/etc

## ISSUES
- Button color invert isn't immediate on refresh in darkmode


https://github.com/user-attachments/assets/f1093a27-73dd-47cb-8fc9-2f4bc301b80c
2024-10-23 20:47:15 +00:00
Sasha
1caa383608 fix: reduce import map diff when config changes (#8846)
### What?
Reduces difference in the `importMap.js` file when config changes.

### How?
Instead of appending the length, appends the hash of the path.

#### Before: 
Example of the diff when 1 component gets removed
<img width="374" alt="image"
src="https://github.com/user-attachments/assets/7aff02bd-ef55-4e40-963f-1cc3890e5957">
output:
```ts
import { TestComponent as TestComponent_84 } from 'test/admin/components/TestComponent.js'
```

#### After:
Targets only necessary for this component lines:
<img width="359" alt="image"
src="https://github.com/user-attachments/assets/99ba0ebd-cff4-4169-9622-e4c491e23eef">

Output:
```ts
import { TestComponent as TestComponent_d010fadde249c7cd3feed0eef58fe83c } from 'test/admin/components/TestComponent.js'
```

Fixes https://github.com/payloadcms/payload/issues/8841
2024-10-23 23:33:53 +03:00
Jessica Chowdhury
03c07026c5 feat: add localized indicator to field label (#8602)
On any localized field, appends `locale` on the end of the label.
2024-10-23 15:06:30 -04:00
Jarrod Flesch
67acde45e6 not working 2024-10-23 14:08:55 -04:00
Jacob Fletcher
d6498e442f explores fields in form state 2024-10-22 17:56:27 -04:00
Jarrod Flesch
7e50fc51f1 Merge remote-tracking branch 'refs/remotes/origin/feat/on-demand-rsc' into feat/on-demand-rsc 2024-10-22 16:48:04 -04:00
Jarrod Flesch
b49f9f92be chore: rendering rows 2024-10-22 16:47:34 -04:00
Jacob Fletcher
9ffbb3f7f9 poc list view 2024-10-22 16:25:05 -04:00
Jacob Fletcher
54301c9088 renders cells in column state 2024-10-22 16:25:05 -04:00
Jacob Fletcher
809df54cf0 progress to ssr tables 2024-10-22 16:25:04 -04:00
Jacob Fletcher
d254a6e622 begins server rendering list cells 2024-10-22 16:25:04 -04:00
Sasha
9f66114577 chore: jest reporter log failed tests count (#8810)
for example 3 tests passed but 1 failed, shows:
> 1 FAILED

instead of

> 4 FAILED

example of the previous behaviour

![image](https://github.com/user-attachments/assets/78c4bc76-caa4-4bf8-943f-2b6b690ce763)

![image](https://github.com/user-attachments/assets/7f261ac3-17dd-474d-87a3-47ad6cbacd68)
2024-10-22 23:22:20 +03:00