Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency @payloadcms/ui to v3.1.0 #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 1, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@payloadcms/ui (source) 3.0.0-beta.127 -> 3.1.0 age adoption passing confidence

Release Notes

payloadcms/payload (@​payloadcms/ui)

v3.1.0

Compare Source

🚀 Features
  • add skip and force accept flags to migration commands (#​8843) (fb3242d)
  • richtext-lexical: more powerful custom Block RSCs, improved selection handling (#​9422) (9e31e17)
  • richtext-lexical: allow customizing maxActiveItems for toolbar groups (#​9417) (38de760)
  • richtext-lexical: export lexical drawer hooks (#​9415) (3b68671)
  • templates: update website styles and new home hero image (#​9413) (2036a56)
🐛 Bug Fixes
  • invalid payload.collections type (#​9414) (91dcf6d)
  • unable to load documents with non-standard ids (#​9407) (ee1a91e)
  • error when opening admin panel without any permissions (#​9392) (9470f9b)
  • db-postgres: joins with versions and hasMany relationship (#​9370) (d499de1)
  • live-preview: client-side live preview cannot clear all array rows (#​9439) (ae6c71b)
  • next: threads server props to custom providers (#​9412) (f5683b0)
  • next: [email protected] compatibillity for turbopack warnings patch (#​9341) (f2205d1)
  • richtext-lexical: error when changing block collapsed state in rare cases (#​9421) (b9cc4d4)
  • richtext-lexical: slash menu from + button did not trigger item select action (#​9420) (a891e98)
  • richtext-lexical: slash menu query doesn't disappear after selecting slash menu item (#​9396) (3d0424b)
  • richtext-lexical: preserve indent and text-align when converting Lexical <-> HTML (#​9165) (0960290)
  • templates: website template breaking change by renaming hero image to jpg (#​9416) (18b139b)
  • ui: add disabled attribute to blocks drawer toggler (#​9424) (27acdae)
  • ui: stale server components when rows are moved (#​9410) (e3866c4)
  • ui: error when collapsing sidebar groups (#​9393) (90e37fe)
🤝 Contributors

v3.0.2

Compare Source

🐛 Bug Fixes
🤝 Contributors

v3.0.1

Compare Source

⚡ Performance
  • significantly reduce HTML we send to the client. Up to 4x smaller (#​9321) (5d2b0b3)
🐛 Bug Fixes
🤝 Contributors

v3.0.0

This is a major release that includes a re-architecture of Payload from an Express + React Router SPA to the Next.js App Router + RSCs. In addition to this architectural change, we've also shipped a ton of large features, miscellaneous fixes, and DX improvements.

Architectural changes
  • Payload now installs fully in any Next.js app router
  • You can now deploy your entire project (frontend and backend) in one app
  • Payload can now be deployed serverless on platforms like Vercel
  • Everything Payload does now works seamlessly within any Next.js project
  • You can now use the Payload Local API in Server Components and Server Functions
  • Postgres, Live Preview, and Lexical have been marked as stable
  • All Payload exports have been significantly cleaned up and organized
  • Payload is now an ESM project
  • Payload is now modular, and we now publish new packages ui, next, translations, and graphql
  • The Payload config is now server-side only, and works in any Node environment
  • Server-side HMR works out of the box - removing the need for nodemon
Large features
  • Join field - bi-directional relationships, more control over the database schema, and more
  • Select API - select specific fields when querying using Local API
  • Jobs Queue - background jobs fully supported in Payload with no third-party dependencies
  • Populate / DefaultPopulate API - determine which fields should be retrieved when Payload populates relationships
  • Lexical blocks and inline blocks - easily make Payload Blocks available in Lexical as custom rich text features
  • SQLite database adapter now available
  • Vercel Postgres database adapter released, specifically for serverless deploys on Vercel
  • Live Preview server components support
  • Admin UI has been refreshed
  • hasMany upload fields are now supported
  • Bulk upload has been added
  • Document Locking pattern has been implemented, which shows if someone is currently editing a document
  • Ability to publish individual locales one at a time has been added
  • Lexical now has Table support
Small but still important features
  • New Payload logo (thanks Candycode!)
  • New Resend email adapter is now available
  • Postgres now saves single, monomorphic relationships directly in a column rather than in _rels table
  • GraphQL has been abstracted into a specific Next.js route handler, and no longer affects Payload initialization at all
  • React Compiler has been introduced into Payload build pipeline
  • You can now run migrations on init, rather than only in CI (helpful for long-running servers)
  • New Local API operations - count, countVersions, countGlobalVersions, upsert
  • Adds baseListFilter function to allow enforced list view filters based on user
  • Lexical fixed toolbar option has been added
  • Optimized the way that relational DBs store relations
  • Postgres point field is now supported
  • Postgres deep JSON querying is now supported
  • Cuztomize Drizzle schema by passing in your own, which is handled outside of Payload
  • Fully typed i18n t function
  • Focal point data is now stored on uploads
  • Adds ability to login with username rather than email
  • New pattern for passing custom server / client props to custom components
  • Email adapter pattern, including optimized Resend HTTP client
  • Reduced / optimized the shape of /access permissions results
  • Allows sorting by multiple fields
  • MongoDB now saves ObjectID for relationships
  • Adds more control over log level customization
  • Downgrades common errors like NotFound or Forbidden to info
  • Swaps out react-toastify for sonner
  • True "virtual" fields via virtual: true
  • Adds ability to customize filenames before upload
  • Adds locale indicators to localized field labels
  • Scope all payload css to payload-default layer
  • Document duplicate / delete from drawers
⚠️ BREAKING CHANGES

This release includes breaking changes. In order to update from version 2 to 3, please review the migration docs.

🤝 Contributors

v3.0.0-beta.135

Compare Source

🚀 Features
⚡ Performance
  • removes unnecessary field styles from initial page response (#​9286) (30947d2)
🐛 Bug Fixes
⚠️ BREAKING CHANGES
  • removes unnecessary field styles from initial page response (#​9286) (30947d2)

    This only effects those who are importing Payload's field components
    into your own Custom Components or front-end application. The width
    prop no longer exists. It has been consolidated into the existing
    style prop. To migrate, simply move this prop as follows:

    import { TextInput } from '@&#8203;payloadcms/ui
    
    export const MyCustomComponent = () => {
      return (
        <TextInput 
    -      width="60%"
           style={{
    +        width: "60%,
           }}
        />
      )
    }
🤝 Contributors

v3.0.0-beta.134

Compare Source

🚀 Features
  • support relationship writes using objects instead of IDs (#​9253) (d21fca9)
  • deprecates getPayloadHMR in favor of simpler getPayload (#​9249) (31b32ef)
  • richtext-lexical: allow replacing entire blocks with custom components (#​9234) (63cc966)
⚡ Performance
  • richtext-lexical: significantly reduce lexical rerendering and amount of network requests from blocks (#​9255) (35917c6)
🐛 Bug Fixes
⚠️ BREAKING CHANGES
  • proper casing for default root views (#​9248) (ed21c1c)

    Custom account and dashboard views now defined as lowercase in the
    config.

    import { buildConfig } from 'payload'
    
    const config = buildConfig({
      // ...
      admin: {
        components: {
          // ...
          views: {
            // ...
    -       Account: ...
    -       Dashboard: ...
    +       account: ...
    +       dashboard: ...
          },
        },
      },
    })
  • richtext-lexical: significantly reduce lexical rerendering and amount of network requests from blocks (#​9255) (35917c6)

    The field RSC now provides an initial state for all lexical blocks. This
    completely obliterates any flashes and lexical block loading states when
    loading or saving a document.

    This removes the feature.hooks.load and feature.hooks.save
    interfaces from custom lexical features, as they weren't used internally
    and added unnecessary, additional overhead.

    If you have custom features that use those, you can migrate to using
    normal payload hooks that run on the server instead of the client.

🤝 Contributors

v3.0.0-beta.133

Compare Source

🚀 Features
🐛 Bug Fixes
  • corrects cases of false positive identification of custom id fields (#​9245) (9b00b59)
🤝 Contributors

v3.0.0-beta.132

Compare Source

🐛 Bug Fixes
  • templates: vercel website migrations (#​9235) (30d66bf)
  • ui: lexical was incorrectly set to readonly in blocks, groups, and tabs (#​9237) (131d1be)
🤝 Contributors

v3.0.0-beta.131

Compare Source

🚀 Features
⚡ Performance
🐛 Bug Fixes
⚠️ BREAKING CHANGES
  • db-mongodb: update mongoose to 8.8.1 (#​9115) (7c6f419)

    MongoDB projects need to run a migration after updating to this beta version, because all relationship IDs are now stored as ObjectID (as they should have always been saved) and we need to migrate your existing relationship data from string-based IDs to ObjectIDs.

    To create this migration, run:

    pnpm payload migrate:create --file @&#8203;payloadcms/mongodb/relationships-v2-v3
    

    And then run your migrations using:

    pnpm payload migrate
    

    In addition, if your project is heavily relying on using the Mongoose models directly, you may want to review the upgrade guides from v6 to v7 and v7 to v8, making
    adjustments as needed.

  • bumps date-fns to 4.1.0 (#​9221) (6845878)

  • improve collection / global slugs type-safety in various places (#​8311) (810c29b)

    Improves type-safety of collection / global slugs by using CollectionSlug / UploadCollectionSlug and GlobalSlug types instead of string in these places:
    Adds UploadCollectionSlug and TypedUploadCollection utility types

    This also changes how we suggest to add an upload collection to a cloud-storage adapter:
    Before:

    azureStorage({
      collections: {
        [Media.slug]: true,
      },
    })

    After:

    azureStorage({
      collections: {
        media: true,
      },
    })
  • re-order DefaultCellComponentProps generics (#​9207) (77c99c2)

    Changes the order of the DefaultCellComponentProps generic type,
    allowing us to infer the type of cellData when a ClientField type is
    passed as the first generic argument. You can override the cellData type
    by passing the second generic.

    Previously:

    type DefaultCellComponentProps<TCellData = any, TField extends ClientField = ClientField>

    New:

    type DefaultCellComponentProps<TField extends ClientField = ClientField, TCellData = undefined>

    You can override the cellData type by passing in the second argument
    to the generic. ie if you know the shape of your data differs than the
    inferred type then you can do something like:

    DefaultCellComponentProps<RelationshipFieldClient, { myShape: string, here: string }>
  • storage-uploadthing: upgrade to v7 (#​8346) (4690cd8)

    Upgrade uploadthing to v7

    The options that can be passed to the plugin now mirror the
    UTApiOptions of v7.

    The most notable change is to pass token with
    process.env.UPLOADTHING_TOKEN instead of apiKey with
    process.env.UPLOADTHING_SECRET.

    options: {
    - apiKey: process.env.UPLOADTHING_SECRET,
    + token: process.env.UPLOADTHING_TOKEN,
      acl: 'public-read',
    },

v3.0.0-beta.130

Compare Source

🚀 Features
  • adds ability to define base filter for list view (#​9177) (9da8543)
  • customize log levels and downgrade common errors to info (#​9156) (d628222)
  • next: initializes nav group prefs on the server and consolidates records (#​9145) (f6bdc0a)
  • templates: update config structure in website template to be more clear (#​9161) (5ac4e73)
🐛 Bug Fixes
  • add inline <style> to ensure the order of declared css layers as much as possible (#​9123) (cd95daf)
  • fallbackLocale not respecting default settings, locale specific fallbacks and not respecting 'none' or false (#​8591) (f4d526d)
  • expose server and client props to custom list slot components (#​9159) (a8e3095)
  • db-postgres: create relationship-v2-v3 migration (#​9178) (5b9cee6)
  • next: safely check for state when creating first user (#​9168) (3b55458)
🤝 Contributors

v3.0.0-beta.129

Compare Source

🐛 Bug Fixes
  • richtext-lexical: inline blocks drawer not rendering any fields due to incorrect schemapath suffix (#​9158) (a1c99c8)
🤝 Contributors

v3.0.0-beta.128

Compare Source

This is a significant release which overhauls the way that we render, and provide, custom React components to the Payload Admin UI. Now, custom server components receive contextual props, like data and value, so you can do considerably more with them on the server.

It also ships with a variety of performance improvements to the server-side rendering done for the admin panel.

There are a few relatively simple breaking changes outlined below.

🚀 Features
⚡ Performance
  • upgrade pino-pretty. This reduces bundle size and total amount of dependencies from 94 => 85 (#​9127) (7261faa)
🐛 Bug Fixes
  • allow specifying queue (#​9151) (e0309a1)
  • incorrectly looking for schema paths when upload is not enabled (#​9146) (a3ebf51)
  • empty publish dropdown when localization is false (#​9106) (3e954f4)
  • custom id field not shown depending on field and db types (#​9091) (9a970d2)
  • update README with new asset, image URL (#​9099) (d7fc944)
  • cpa: use proper branch tag (#​9141) (7cd805a)
  • db-mongodb: use dbName for mongodb model (#​9107) (09c41d5)
  • db-mongodb: destructuring error when trying to filter date fields by string query (#​9116) (6899a3c)
  • next: disable turbopack serverExternalPackages warnings (#​9147) (64967e4)
  • next, ui: respect access of user for document locking (#​9139) (48d0fae)
  • ui: pass correct relationTo to locked documents creation (#​9137) (3298113)
  • ui: error in filtered relationship field component while scrolling, if the select option label is a number (#​9117) (2ad9917)
⚠️ BREAKING CHANGES
  • on-demand rsc (#​8364) (c96fa61)

    1. Add the following to your root layout file, typically located at (app)/(payload)/layout.tsx:

      /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
      /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
      + import type { ServerFunctionClient } from 'payload'
      
      import config from '@&#8203;payload-config'
      - import { RootLayout } from '@&#8203;payloadcms/next/layouts'
      + import { handleServerFunctions, RootLayout } from '@&#8203;payloadcms/next/layouts'
      import React from 'react'
      
      import { importMap } from './admin/importMap.js'
      import './custom.scss'
      
      type Args = {
        children: React.ReactNode
      }
      
      + const serverFunction: ServerFunctionClient = async function (args) {
      +  'use server'
      +  return handleServerFunctions({
      +    ...args,
      +    config,
      +    importMap,
      +  })
      + }
      
      const Layout = ({ children }: Args) => (
        <RootLayout
          config={config}
          importMap={importMap}
      +    serverFunction={serverFunction}
        >
          {children}
        </RootLayout>
      )
      
      export default Layout
    2. If you were previously posting to the /api/form-state endpoint, it
      no longer exists. Instead, you'll need to invoke the form-state Server
      Function, which can be done through the new getFormState utility:

      - import { getFormState } from '@&#8203;payloadcms/ui'
      - const { state } = await getFormState({
      -   apiRoute: '',
      -   body: {
      -     // ...
      -   },
      -   serverURL: ''
      - })
      
      + const { getFormState } = useServerFunctions()
      +
      + const { state } = await getFormState({
      +   // ...
      + })
    3. Multiple layer of React Context were removed in favor of direct props. As a result, the following React hooks were removed:

      - useFieldProps()
      - useTableCell()

      If you were previously using any of these hooks, for example to access field path or cellData, you can now access that directly from the props object.

      - const { path } = useFieldProps();
      + const { path } = props;
      
      - const { cellData } = useTableCell();
      + const { cellData } = props;

      The field prop also no longer contains a _schemaPath property. Instead, this is now also accessed directly through props:

      - const { _schemaPath } = props.field
      + const { schemaPath } = props
  • db-mongodb: use dbName for mongodb model (#​9107) (09c41d5)

    If a dbName was previously provided, it will now be used as the
    MongoDB collection name instead of the collection slug.
    autoPluralization will not be applied to dbName.

  • richtext-lexical: upgrade lexical from 0.18.0 to 0.20.0 (#​9126) (7767c94)

    This upgrades our lexical dependencies from 0.18.0 to 0.20.0. If you
    have lexical dependencies installed in your project, you will have to
    upgrade those.

    Additionally, the lexical team may introduce breaking changes in this
    upgrade. If you use lexical APIs directly, please consult their
    changelog for more information:
    https://github.com/facebook/lexical/releases

🤝 Contributors

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/payloadcms-ui-3.x branch from c6b36ef to 90a6aca Compare October 7, 2024 11:29
@renovate renovate bot force-pushed the renovate/payloadcms-ui-3.x branch from 90a6aca to dc3ad75 Compare October 21, 2024 07:21
@renovate renovate bot force-pushed the renovate/payloadcms-ui-3.x branch 2 times, most recently from 39614be to 1f7d343 Compare November 19, 2024 03:12
@renovate renovate bot changed the title Update dependency @payloadcms/ui to v3.0.0-canary.ff8c8fd Update dependency @payloadcms/ui to v3.0.0 Nov 19, 2024
@renovate renovate bot force-pushed the renovate/payloadcms-ui-3.x branch from 1f7d343 to 4f59f31 Compare November 19, 2024 23:13
@renovate renovate bot changed the title Update dependency @payloadcms/ui to v3.0.0 Update dependency @payloadcms/ui to v3.0.1 Nov 19, 2024
@renovate renovate bot force-pushed the renovate/payloadcms-ui-3.x branch from 4f59f31 to e1162c0 Compare November 20, 2024 23:48
@renovate renovate bot changed the title Update dependency @payloadcms/ui to v3.0.1 Update dependency @payloadcms/ui to v3.0.2 Nov 20, 2024
@renovate renovate bot force-pushed the renovate/payloadcms-ui-3.x branch from e1162c0 to ab22933 Compare November 23, 2024 11:49
@renovate renovate bot changed the title Update dependency @payloadcms/ui to v3.0.2 Update dependency @payloadcms/ui to v3.1.0 Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants