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

Fix field visilibity in AdminUI when omitted #8715

Merged
merged 19 commits into from
Jul 31, 2023
Merged

Fix field visilibity in AdminUI when omitted #8715

merged 19 commits into from
Jul 31, 2023

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Jul 25, 2023

Fixes #8714, and switches to verbose snapshot testing of the possibility space in https://github.com/keystonejs/keystone/pull/8715/files#diff-c56d1cc3cff659fd4ab13d4370524a79120c964e3279953eeb0782fc79a48ca5, that way we can track visibility changes easily moving forward.

@changeset-bot

This comment was marked as resolved.

@dcousens dcousens self-assigned this Jul 25, 2023
@dcousens dcousens added 🐛 bug Unresolved bug upcoming labels Jul 25, 2023
@dcousens dcousens requested a review from borisno2 July 25, 2023 02:17
? f.ui?.listView?.fieldMode ?? f.ui?.listView?.defaultFieldMode
: 'hidden',
},
},
Copy link
Member Author

@dcousens dcousens Jul 25, 2023

Choose a reason for hiding this comment

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

I have moved this behaviour from createAdminMeta.ts to logically group this near isEnabled - types-for-lists.ts is not an appropriate name

@@ -62,6 +62,8 @@ function getSudoGraphQLSchema(config: KeystoneConfig) {
const lists = initialiseLists(transformedConfig);
const adminMeta = createAdminMeta(transformedConfig, lists);
return createGraphQLSchema(transformedConfig, lists, adminMeta, true);
// TODO: adminMeta not required
// return createGraphQLSchema(transformedConfig, lists, null, true);
Copy link
Member Author

Choose a reason for hiding this comment

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

I can't think of a reason why a sudo context would have an adminMeta, but this would be a breaking change if someone was querying that using getContext or similar

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 25, 2023

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 5224880:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens changed the title Fix field visilibity in AdminUI when graphql.omit: true Fix field visilibity in AdminUI when omitted Jul 25, 2023
@dcousens dcousens removed the upcoming label Jul 26, 2023
@dcousens dcousens force-pushed the omit-test branch 3 times, most recently from 0c63b58 to 4493ff4 Compare July 26, 2023 02:41
@borisno2
Copy link
Member

Looks good, looks like a test is failing though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field visible when graphql.omit: true
2 participants