npm @payloadcms/plugin-search 3.0.0-beta.108
v3.0.0-beta.108

10 hours ago

v3.0.0-beta.108 (2024-09-20)

🚀 Features

  • richtext-lexical: dropdown menu disabled status (#8177) (7d2022f)
  • upgrade next, react and react-dom, move react/next dependency checker from payload to next package (#8323) (1afcaa3)
  • join field (#7518) (6ef2bde)
  • adds overrideLock flag to update & delete operations (#8294) (9c3f863)
  • ui: hides lock icon when locked by current user (#8309) (879f690)
  • ui: threads collectionSlugs through useListDrawer (#8292) (405a6c3)
  • storage-vercel-blob: threads cacheControlMaxAge through static handler (#8065) (a94e40f)
  • ui: useTableColumns add abillity to reset columns state (#8296) (72995fc)
  • plugin-form-builder: new wildcards {{}} and {{:table}} are now supported in email bodies and emails fall back to a global configuration value in addition to base email configuration (#8271) (9821aeb)
  • lock documents while being edited (#7970) (f98d032)
  • plugin-seo: add vietnamese translation (#8179) (89601f1)
  • add virtual property to the fields config (#7621) (bf48af4)
  • add publish specific locale (#7669) (b7a0b15)

⚡ Performance

  • disable router cache refresh that occurs after every page transition or page load (#8318) (0cdd5b6)
  • optimizes admin ui loading by using react cache to memoize req / auth (#8315) (c6a7ad2)

🐛 Bug Fixes

  • ui: hide dot menu in read-only mode for locked documents (#8342) (493b121)
  • db-mongodb: treat empty strings as null / undefined for exists queries (#8337) (e916512)
  • ui: client side error when passing labels as functions for custom view tabs (#8339) (1f7d47a)
  • add logger to serverOnlyConfigProperties (#8325) (afb8805)
  • plugin-form-builder: emails array field has read access by authenticated users only by default now (#8338) (0789f4d)
  • drizzle: equals polymorphic querying with object notation (#8316) (265d7fa)
  • drizzle: nested arrays with localized items and versions (#8331) (2596b85)
  • ui: adjust list view table alignment (#8330) (b51d2bc)
  • only add snapshot to versions query when localization is enabled (#8293) (2d29b7e)
  • findByID adjust type to null if disableErrors: true is passed (#8282) (37e1adf)
  • richtext-slate: fix issue with richText field cell not being a link when used as a useAsTitle (#8272) (dd96f9a)
  • templates: optional chaining bug (#8268) (4d54cc6)
  • ui: code field adjusts its height to its content dynamically. Scrolling over the container is not prevented. (#8209) (f011e4f)
  • strongly types field validation args (#8263) (c0aad3c)
  • ui: mobile menu button sizing (#8264) (110fda7)
  • drizzle: in query on polymorphic relations across ID types (#8240) (31ffc57)
  • ui: filter collection crashes when navigating away (#8260) (9035467)
  • properly infers field validation args (#8243) (029eba5)
  • richtext-lexical: dropdown item disabled status (#8159) (67cd3b3)
  • ui: pass label as prop through to the textarea input (#8248) (a06458d)
  • ui: field alignment when labels overflow inside rows (#8246) (149b7cb)
  • ui: draft docs are now correctly provided in preview URL (#8245) (ccd0b1e)
  • error on forgot-password route (#8244) (d2eafdf)
  • ui: nav button height being stretched and navWrapper border on RTL (#8242) (a68f0ce)
  • drizzle: optimize count querying when no joins (#7749) (8520fd9)
  • plugin-seo: threads entity slug and document config through generation fn args (#8238) (aee76cb)
  • drizzle: localized fields uniqueness per locale (#8230) (b7db53c)

⚠️ BREAKING CHANGES

  • richtext-lexical: dropdown menu disabled status (#8177) (7d2022f)

    ToolbarDropdown no longer receives
    groupKey={group.key} and items={group.items} as props, but instead
    group={group}

  • plugin-form-builder: emails array field has read access by authenticated users only by default now (#8338) (0789f4d)

  • upgrade next, react and react-dom, move react/next dependency checker from payload to next package (#8323) (1afcaa3)

    • Upgrades minimum supported @types/react version from
      npm:types-react@19.0.0-rc.0 to npm:types-react@19.0.0-rc.1
    • Upgrades minimum supported @types/react-dom version from
      npm:types-react-dom@19.0.0-rc.0 to npm:types-react-dom@19.0.0-rc.1
    • Upgrades minimum supported react and react-dom version from
      19.0.0-rc-06d0b89e-20240801 to 19.0.0-rc-5dcb0097-20240918
    • Upgrades minimum supported Next.js version from 15.0.0-canary.104 to
      15.0.0-canary.160
  • join field (#7518) (6ef2bde)

    • Adds a new "join" field type to Payload and is supported by all database adapters
    • The UI uses a table view for the new field
    • db-mongodb changes relationships to be stored as ObjectIDs instead of strings (for now querying works using both types internally to the DB so no data migration should be necessary unless you're querying directly, see breaking changes for details
    • Adds a reusable traverseFields utility to Payload to make it easier to work with nested fields, used internally and for plugin maintainers
    export const Categories: CollectionConfig = {
        slug: 'categories',
        fields: [
            {
                name: 'relatedPosts',
                type: 'join',
                collection: 'posts',
                on: 'category',
            }
        ]
    }

    All mongodb relationship and upload values will be stored as MongoDB ObjectIDs instead of strings going forward. If you have existing data and you are querying data directly, outside of Payload's APIs, you get different results. For example, a contains query will no longer works given a partial ID of a relationship since the ObjectID requires the whole identifier to work.

  • drizzle: localized fields uniqueness per locale (#8230) (b7db53c)

    Previously, this worked with MongoDB but failed with Postgres / SQLite
    when the slug field has both localized: true and unique: true.

    await payload.create({
      collection: "posts",
      locale: "en",
      data: {
        slug: "my-post"
      }
    })
    
    await payload.create({
      collection: "posts",
      locale: "de",
      data: {
        slug: "my-post"
      }
    })

    Now, we build unique constraints and indexes in combination with the
    _locale column. This should also improve query performance for fields
    with both index: true and localized: true.

    Migration steps (Postgres/SQLite only)

    This change updates the database schema and requires a migration (if you
    have any localized fields). To apply it, run the following commands:

    pnpm payload migration:create locale_unique_indexes
    pnpm payload migrate

    Note that if you use db.push: true which is a default, you don't have
    to run pnpm payload migrate in the development mode, only in the
    production, as Payload automatically pushes the schema to your DB with
    it.

🤝 Contributors

Don't miss a new plugin-search release

NewReleases is sending notifications on new releases.