github keystonejs/keystone 2022-06-09
9 June 2022

latest releases: 2024-04-30, @keystone-6/core@6.1.0, @keystone-6/core@0.0.0-rc-20240429035832...
23 months ago
🦋  @keystone-ui/button@7.0.0
🦋  @keystone-ui/core@5.0.0
🦋  @keystone-ui/fields@7.0.0
🦋  @keystone-ui/icons@6.0.0
🦋  @keystone-ui/loading@6.0.0
🦋  @keystone-ui/modals@6.0.0
🦋  @keystone-ui/notice@6.0.0
🦋  @keystone-ui/options@6.0.0
🦋  @keystone-ui/pill@7.0.0
🦋  @keystone-ui/popover@6.0.0
🦋  @keystone-ui/segmented-control@7.0.0
🦋  @keystone-ui/toast@6.0.0
🦋  @keystone-ui/tooltip@6.0.0
🦋  @keystone-6/auth@3.0.0
🦋  @keystone-6/cloudinary@3.0.0
🦋  @keystone-6/core@2.0.0
🦋  @keystone-6/document-renderer@1.1.0
🦋  @keystone-6/fields-document@3.0.0
🦋  @keystone-6/session-store-redis@3.0.0

New Features

Array Fields and Components Blocks

Warning: This new feature includes breaking changes that may affect you

Changes to the underlying document-editor component block interfaces, with the addition of array fields. The breaking changes are only for defining components, no database migration is needed.

The breaking changes for @keystone-6/fields-document/component-blocks are:

  • ⚠️ For the arguments of the component function, rename component to preview
  • ⚠️ For the arguments of the component function, rename props to schema
  • ⚠️ For your component .schema (previously .props), rename props.{innerFieldName} to props.fields.{innerFieldName}.
  • ⚠️ When rendering child field React components, change props.{innerFieldName} to props.{innerFieldName}.element.

For example, use props.fields.title instead of props.title.
For a nested example, use props.fields.someObject.fields.title instead of props.someObject.title.

See pull request #7428 for information on how to upgrade and solutions to common problems. If you have any other questions, please don't hesitate to open a GitHub discussion.

Images and Files

Warning: This new feature includes breaking changes that may affect you

The image and files configuration options have been removed from Keystone's configuration, and a new storage configuration object introduced.

  • ➕ Amazon S3 (and other compatible providers) are now supported when uploading images and files
  • ➕ New Guide coming - see #7563 will be merged soon but check it out if you are keen
  • 🚨 Images and files are now - DELETED BY DEFAULT from the underlying storage provider when replaced or deleted from the database
    • Note: A preserve flag has been added to the new storage configurations to default back to the previous behaviour

  • ⚠️ If you were previously using refs in your application, you need to migrate your database

See pull request #7070 for information on how to upgrade and solutions to common problems.
If you have any other questions, please don't hesitate to open a GitHub discussion.

Other Improvements

Major Dependency Upgrades

If you can't upgrade your dependencies for any reason and you think Keystone might be able to help, please open a GitHub discussion so we can try and help you.

React 18.1.0

We have updated React to version 18 (pull request #7410).

Redis 4

Our @keystone-6/session-store-redis package has been upgraded to use @redis/client@v1.1.0/redis@4.1.0 (pull request #7051).

Configuration

Added support for body-parser options when configuring GraphQL #7591

Admin UI

The following changes include a number of accessibility and quality of life improvements for users of the admin interface.

  • List descriptions now display in the Admin UI - #7537
  • Fixed the viewport sometimes shifting when opening the date picker in the create drawer - #7543
  • Removed all Keystone Links, i.e. API explorer, GitHub repository and Keystone documentation, from the popover and replacing the popover button with Sign out button in production - #7546
  • Fixed document editor preventing tabbing out of the editor - #7547
  • The label shown for a text field in the Admin UI is now associated with the input so the label can be read by screen readers - #7548
  • The document editor label is now associated with the editable element so the label can be read by screen readers - #7549
  • Fixed z-index issues occurring when pop-overs in document editor text-area or the toolbar overlapped other fields and buttons - #7556
  • Alert dialogs are now centered in the Admin UI - #7561
  • The reset changes button on the item view now presents a confirmation modal before resetting changes and it has been moved to the right of the bottom bar so it is next to the delete button. - #7562
  • Fixed splitting text with marks/inlines into multiple list items when turning a paragraph into a list and splitting a single list item with marks/inlines into multiple paragraphs when turning a list into paragraphs - #7565
  • Replaced create item drawer with a page when creating an item from the list view or dashboard - #7594
  • Fixed the Admin UI crashing when saving an item with a relationship field using the cards display mode when another item is added to the relationship (e.g. by another user or a hook) since the item was initially loaded - #7598

Could not find prisma-fmt binaries

A number of users have reported problems with the Prisma binaries not being installed properly by their package manager.

As part of pull request #7595 the Prisma binaries are now downloaded just before they're needed.
Note this should not happen in production, they should still be downloaded before as part of your deployment step.

Acknowledgements

Big shoutout to the following community members for their help in improving our documentation with their contributions:

Enjoying Keystone?

Star this repo 🌟 ☝️ or connect with Keystone on Twitter and in Slack.

Changelog

You can also view the verbose changelog in this pull request.

Don't miss a new keystone release

NewReleases is sending notifications on new releases.