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 selection for component blocks without child fields #8021

Merged

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Oct 20, 2022

Now you can actually put your text cursor in a component block (and therefore insert content below it or etc.) that doesn't have child fields and the bar on the side will change colour to indicate your selection is inside there.

Try navigating your caret to the carousel block on the docs site:
on this branch: https://keystone-next-docs-git-fix-selection-for-compo-824f49-thinkmill.vercel.app/docs/guides/document-field-demo
before this branch: https://keystone-next-docs-pm1f8fo8c-thinkmill.vercel.app/docs/guides/document-field-demo

@vercel
Copy link

vercel bot commented Oct 20, 2022

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

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Oct 20, 2022 at 2:41AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2022

🦋 Changeset detected

Latest commit: 2079513

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/fields-document Patch

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 Oct 20, 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 2079513:

Sandbox Source
@keystone-6/sandbox Configuration

@emmatown emmatown marked this pull request as ready for review October 20, 2022 02:15
@emmatown emmatown requested a review from a team October 20, 2022 02:15
@emmatown emmatown marked this pull request as draft October 20, 2022 02:34
@emmatown
Copy link
Member Author

(found a problem)

@vercel vercel bot temporarily deployed to Preview October 20, 2022 02:41 Inactive
@emmatown
Copy link
Member Author

The problem was that you would see all of the child fields after the form (yes, that could be desirable behavior but it would need to be presented well which this was not), I've fixed that by reverting the change for edit mode. So selection won't work right when in the edit mode of a component block, I think that's good enough since people can click done and then it'll work right again.

@emmatown emmatown marked this pull request as ready for review October 20, 2022 02:44
@emmatown emmatown enabled auto-merge (squash) October 20, 2022 02:44
@emmatown emmatown merged commit 8502b35 into main Oct 20, 2022
@emmatown emmatown deleted the fix-selection-for-component-blocks-without-child-fields branch October 20, 2022 02:48
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.

None yet

2 participants