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

Add field groups #8088

Merged
merged 3 commits into from
Nov 16, 2022
Merged

Add field groups #8088

merged 3 commits into from
Nov 16, 2022

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Nov 11, 2022

This adds the ability to group fields together in the Admin UI with a label and description

list({
  ...etc,
  fields: {
    ...group({
      label: "Some group",
      description: "Some group description"
      fields: {
        something: text(),
        ...etc,
      }
    }),
    ...etc,
  }
})

Keystone's Admin UI on an item with a group of fields expanded

Keystone's Admin UI on an item with a group of fields collapsed

@vercel
Copy link

vercel bot commented Nov 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Nov 16, 2022 at 3:35AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2022

🦋 Changeset detected

Latest commit: 1157235

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@keystone-6/core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 11, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1157235:

Sandbox Source
@keystone-6/sandbox Configuration

@vercel vercel bot temporarily deployed to Preview November 11, 2022 01:28 Inactive
@vercel vercel bot temporarily deployed to Preview November 11, 2022 01:34 Inactive
@vercel vercel bot temporarily deployed to Preview November 11, 2022 04:59 Inactive
@vercel vercel bot temporarily deployed to Preview November 14, 2022 01:19 Inactive
@emmatown emmatown marked this pull request as ready for review November 14, 2022 01:45
@emmatown emmatown requested review from a team and removed request for a team November 14, 2022 01:45
@emmatown emmatown marked this pull request as draft November 14, 2022 01:46
@vercel vercel bot temporarily deployed to Preview November 14, 2022 01:49 Inactive
@vercel vercel bot temporarily deployed to Preview November 14, 2022 03:08 Inactive
@vercel vercel bot temporarily deployed to Preview November 16, 2022 00:16 Inactive
@emmatown emmatown force-pushed the field-groups branch 2 times, most recently from 633796c to 179e152 Compare November 16, 2022 00:47
@vercel vercel bot temporarily deployed to Preview November 16, 2022 00:52 Inactive
initialSort: graphql.field({ type: KeystoneAdminUISort }),
...contextFunctionField('isHidden', graphql.Boolean),
isSingleton: graphql.field({ type: graphql.Boolean }),
isSingleton: graphql.field({ type: graphql.nonNull(graphql.Boolean) }),
Copy link
Member Author

@emmatown emmatown Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated thing I noticed when re-generating the types for the admin meta query, I don't think it was intentionally nullable. Types elsewhere assumed it was non-nullable so I've made it non-nullable.

@vercel vercel bot temporarily deployed to Preview November 16, 2022 01:31 Inactive
@vercel vercel bot temporarily deployed to Preview November 16, 2022 01:32 Inactive
@emmatown emmatown marked this pull request as ready for review November 16, 2022 01:47
@emmatown emmatown requested a review from a team November 16, 2022 01:48
@vercel vercel bot temporarily deployed to Preview November 16, 2022 03:25 Inactive
@vercel vercel bot temporarily deployed to Preview November 16, 2022 03:35 Inactive
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.

2 participants