Alessio Gravili
9f9db3ff81
chore: bump prettier, re-enable prettier for docs ( #11695 )
...
## Introducing Prettier for docs
Prettier [was originally disabled for our docs as it didn't support MDX
2.0](1fa636417f ),
outputting invalid MDX syntax.
This has since been fixed - prettier now supports MDX 2.0.
## Reducing print width
This also reduces the print width for the docs folder from 100 to 70.
Our docs code field are very narrow - this should help make code more
readable.
**Before**

**After**

**Before**

**After**

2025-03-14 17:13:08 +00:00
Sasha
d601300034
fix(db-mongodb): querying polymorphic relationships with the all operator ( #10704 )
...
Fixes https://github.com/payloadcms/payload/issues/10678
2025-01-23 18:23:50 +02:00
Alessio Gravili
bb0c8a8c62
docs: fix incorrect mdx ( #10201 )
2024-12-27 20:18:31 +00:00
Alessio Gravili
254d888b73
docs: add missing types, prefer pnpm, fix various typos, discourage using payload from import ( #9847 )
...
- Adds missing types, especially the `Where` type. Will be helpful for
people to see that they can type their queries like that
- Mention pnpm first and prefer pnpm > npm > yarn throughout docs
- Add `payload` to function arguments in examples to discourage people
from doing `import payload from 'payload'`
- PNPM => pnpm, NPM => npm
- Fix some typos
2024-12-09 19:05:09 -07:00
Said Akhrarov
0b9d5a5ae4
docs: fix links in operators table for within and intersects ( #9232 )
...
### What?
Fixes links in Queries/Operators table for `within` and `intersects`
operator descriptions.
### Why?
So that they point to the correct destination in the docs.
### How?
Changes to `docs/queries/overview.mdx`
See here:

2024-11-15 21:50:21 +02:00
Sasha
4509c38f4c
docs: add within and intersects operators documentation ( #9194 )
...
Adds documentation for `within` and `intersects` operators.
#### Querying - within
In order to do query based on whether points are within a specific area
defined in GeoJSON, you can use the `within` operator.
Example:
```ts
const polygon: Point[] = [
[9.0, 19.0], // bottom-left
[9.0, 21.0], // top-left
[11.0, 21.0], // top-right
[11.0, 19.0], // bottom-right
[9.0, 19.0], // back to starting point to close the polygon
]
payload.find({
collection: "points",
where: {
point: {
within: {
type: 'Polygon',
coordinates: [polygon],
},
},
},
})
```
#### Querying - intersects
In order to do query based on whether points intersect a specific area
defined in GeoJSON, you can use the `intersects` operator.
Example:
```ts
const polygon: Point[] = [
[9.0, 19.0], // bottom-left
[9.0, 21.0], // top-left
[11.0, 21.0], // top-right
[11.0, 19.0], // bottom-right
[9.0, 19.0], // back to starting point to close the polygon
]
payload.find({
collection: "points",
where: {
point: {
intersects: {
type: 'Polygon',
coordinates: [polygon],
},
},
},
})
```
2024-11-13 21:59:22 +00:00
Alessio Gravili
570c610eed
docs: fix queue docs examples, link to qs-esm instead of qs ( #9120 )
2024-11-11 23:35:51 +00:00
Jacob Fletcher
2d96a1f0b6
docs: misc improvements to high-level docs ( #7177 )
2024-07-16 15:47:56 -04:00
Jacob Fletcher
fac5425ec0
docs: improves queries docs ( #7122 )
2024-07-11 17:49:54 -04:00
Jacob Fletcher
e9adeecc7a
docs: more misc improvements ( #7115 )
2024-07-11 14:55:13 -04:00
Alessio Gravili
6c99326d59
feat: replace qs with qs-esm ( #6966 )
...
qs-esm is a qs fork I created and doesn't add bloated polyfills, is
ESM-only, has a smaller bundle size and comes with types included.
qs:
https://bundlephobia.com/package/qs@6.12.1 (11kb)
https://npm.anvaka.com/#/view/2d/qs (15 dependencies)
qs-esm:
https://bundlephobia.com/package/qs-esm@7.0.0 (4.2kb)
https://npm.anvaka.com/#/view/2d/qs-esm (1 dependency)
I don't agree with the backwards philosophy of qs:
https://github.com/ljharb/qs/issues/404#issuecomment-806392831 ("more
deps is better", lower bundle size as opt-in, maximum environment
compatibility as opt-out)
qs imports waaay too many useless dependencies
2024-07-09 14:33:38 +00:00
Jacob Fletcher
a20cf70105
docs: removes express
2024-05-13 10:29:59 -04:00
Alessio Gravili
19f8cbcf76
docs: new and improve lexical docs, hoist up all headings ( #6639 )
2024-06-05 17:08:15 -04:00
Alessio Gravili
6789e61488
chore: run lint & prettier on everything
2024-03-14 23:53:47 -04:00
Alessio Gravili
a81401cf77
feat: breaking: richtext adapter ( #3311 )
...
BREAKING: requires user to install @payloacms-richtext-slate and specify a `config.editor` property
* chore: move slate stuff into packages/richtext-slate
* chore: fieldTypes stuff
* chore: fix richtext-slate tsconfig
* chore: add clean:unix command
* chore: fix up things
* chore: undo subpath imports being hoisted up
* chore: fix incorrect imports
* chore: improve AdapterArguments type
* chore: remove unused richTextToHTML and stringifyRichText files
* fix: core-dev scss imports
* chore: fix publishConfig exports for richtext-slate
* chore: adjust joi schema for richtext field
* chore: various fixes
* chore: handle afterRead population in richText adapter
* chore: handle more after-read promise stuff
* chore: fix joi validation
* chore: add richtext adapter to tests
* chore: merge adapter props with field props
* chore: index.tsx => index.ts
* chore: rename `adapter` to `editor`
* chore: fix e2e tests not running due to importing a constant from a file (`Tabs`) which imports createSlate.
This fails because createSlate imports React components.
* chore: remove unnecessary import
* chore: improve various typings
* chore: improve typings for List view Cell components
* feat: richText adapter cell component
* chore: add missing types packages for packages/richtext-slate
* chore: add new adapter interface properties to joi schema
* chore: withMergedProps utility which replaces getSlateCellComponent and getSlateFieldComponent
* feat: added config.defaultEditor property which is now required. field.editor is no longer required and overrides config.defaultEditor
* docs: mention editor and defaultEditor property in the docs
* chore: fix incorrectly formatted JSX in docs files breaking mdx parser
* chore: fix various errors
* chore: auto-generated pointer files
2023-09-19 11:03:31 +02:00
Alessio Gravili
ae7d6f97d2
chore: formatting and linting ( #3261 )
...
* chore: lint packages/payload
* chore: lint packages/db-postgres
* chore: lint packages/db-mongodb
* chore: update eslintrc exclusion rules
* chore: update eslintrc exclusion rules
* chore: lint misc files
* chore: run prettier through packages
* chore: run eslint on payload again
* chore: prettier misc files
* chore: prettier docs
2023-09-01 17:39:44 +02:00
Dan Ribbens
5ef20e3440
docs: mention virtual fields cannot be sorted ( #3107 )
2023-08-01 05:10:02 -04:00
Jarrod Flesch
d112159d93
docs: fix mdx formatting
2023-07-05 15:26:10 -04:00
Jacob Fletcher
9b22c4b654
docs: fixes misc links ( #2971 )
2023-07-05 12:02:56 -04:00
Jarrod Flesch
a324feae9d
chore: fixes graphql overview mdx file
2023-06-06 21:37:41 -04:00
Jarrod Flesch
684c1a81a4
chore: exposes all operator in ts type ( #2777 )
2023-06-06 13:47:45 -04:00
Harrison-Blair
13179a9498
chore: misc documentation updates ( #2589 )
...
* chore: ensures example configs are being exported when necessary
* chore: adds note regarding updating of hidden fields
---------
Co-authored-by: Jessica Boezwinkle <jessica@trbl.design >
2023-05-01 16:28:13 -04:00
Jacob Fletcher
2074f63333
chore: corrects typo in queries overview documentation ( #2475 )
2023-04-17 16:45:03 -04:00
philipgher
ee06515ca9
Update overview.mdx
2023-02-23 22:01:55 +01:00
Elliot DeNolf
1ed867ce0c
docs: update examples with ts types
2022-08-23 11:43:24 -04:00
Dan Ribbens
e4affd4bf9
docs: updated links
2022-04-29 14:40:49 -04:00
James
ec91757257
feat: allows like to search by many words, adds contain to match exact strings
2022-04-05 16:22:57 -04:00
Dan Ribbens
34630757b9
docs: point field and near query
2021-08-25 16:55:47 -04:00
Jessica Boezwinkle
1ed189cfb9
fix: reverts ESLint syntax changes to mdx files
2021-02-04 11:36:09 -05:00
Jessica Boezwinkle
da61feb73b
feat: adds meta descriptions to docs
2021-02-04 11:04:18 -05:00
Elliot DeNolf
0575ab8125
docs: add desc and keywords
2021-01-09 10:32:22 -05:00
James
2b37bfd93e
docs: lowercases dir names
2021-01-06 08:37:29 -05:00