github keystonejs/keystone 2022-03-25
⚙️ 25 March 2022

latest releases: 2024-11-07, create-keystone-app@10.0.3, @keystone-6/fields-document@9.1.1...
2 years ago

Maintenance release.

"@keystone-6/auth": "2.0.0",
"@keystone-6/cloudinary": "2.0.0",
"@keystone-6/core": "1.1.0",
"@keystone-6/fields-document": "2.0.0",
"@keystone-6/session-store-redis": "2.0.0",

⚠️   This release contains a breaking change! Please read the instructions below.

Core ⚙️

Date Selection Issue

When selecting a date, the date picker sometimes changed to the previous day, this is now resolved.

The root of the problem as highlighted in #6115 is the inconsistency in how browsers handle new Date(value) where value is some string representation of a Date.

Year, month, and day to Date is now explicitly passed in for more deterministic behaviour.

Thanks @ChuckJonas and community members for reporting this issue.

Relationships in Component Blocks

⚠️   Breaking change! Please follow the guidance below.

We've moved the configuration for relationships in component blocks, if you have relationships in component blocks, you'll need to update your configuration.

This configuration has moved so that it's configured at the relationship prop rather than in the relationships key on the document field config.

The relationships key in the document field config now exclusively refers to inline relationships.

We have also added documentation for child fields and early validation for checking that relationships in the document field (both inline relationships and props in component blocks) refer to lists that actually exist.

Before:

import { config, list } from '@keystone-6/core';
import { document } from '@keystone-6/fields-document';
export default config({
  lists: {
    ListName: list({
      fields: {
        fieldName: document({
          relationships: {
            featuredAuthors: {
              kind: 'prop',
              listKey: 'Author',
              selection: 'id name posts { title }',
              many: true,
            },
          },
          /* ... */
        }),
        /* ... */
      },
    }),
    /* ... */
  },
  /* ... */
});
import { fields } from '@keystone-6/fields-document/component-blocks';
fields.relationship({ label: 'Authors', relationship: 'featuredAuthors' });

After:

import { fields } from '@keystone-6/fields-document/component-blocks';
fields.relationship({
  label: 'Authors',
  listKey: 'Author',
  selection: 'id name posts { title }',
  many: true,
});

Miscellaneous

  • Added support for extending the underlying Node.js http server, thanks @lachieh!
  • Fixed issues with float field filtering when the field is required with default value, thanks @gautamsi!
  • Bumped Next.js from 12.0.7 to 12.1.0, which fixed using require.resolve to get the paths to views not working with newer versions of Next.js
  • Updated Prisma to 3.9.2

Admin UI 👀

  • Fixes a bug where headings would appear in shortcut menu even when they were disabled
  • Fixes a bug where the shortcuts menu would clip behind the styles menu - it is now always above the styles menu
  • Fixed Popover component to toggle open and closed on click of the trigger, previously trigger click would only open the dialog. This is necessary because the Admin UI has limited usability on mobile phones, and when certain dialogs open, it is difficult to close by clicking outside. This adds the option of closing it by clicking the menu button again.
  • Fixed cards view in the relationship field not showing up for many relationships in the create view
  • Improved how stacking contexts are organised in the Admin UI
  • Minor a11y improvement to table browsing

Documentation ✏️

  • Fixed invalid field value for Selection in docs for Component Block Relationship Fields, thanks @nizhu!

Enjoying Keystone?

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

Changelog

You can also view the verbose changelog in the related PR (#7219) for this release.

Don't miss a new keystone release

NewReleases is sending notifications on new releases.