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 expand/collapse button in the document editor #7926

Merged
merged 1 commit into from
Sep 15, 2022
Merged

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Sep 15, 2022

Because of some problems with the current expanded view in the document editor (the auto-scrolling of the editor on selection changes scrolls to a broken position, the save button is hidden, etc.), this PR changes the expand/collapse button to switch between re-sizable to full height (while still being in the normal document flow).

This also reverts previous changes to the background colour based on focus because they don't work well since the editor can be conceptually focused (e.g. while updating where a link goes to, editing a form in a component block or etc.) even though the contenteditable element is not literally focused which creates a very strange experience of the editor looking blurred while you're still doing something inside of it.

Before: https://keystone-next-docs-3hjwvrtn8-thinkmill.vercel.app/docs/guides/document-field-demo
After: https://keystone-next-docs-82foenqiv-thinkmill.vercel.app/docs/guides/document-field-demo

@vercel
Copy link

vercel bot commented Sep 15, 2022

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

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Sep 15, 2022 at 0:54AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2022

🦋 Changeset detected

Latest commit: 42fbb25

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

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 42fbb25:

Sandbox Source
@keystone-6/sandbox Configuration

@emmatown emmatown marked this pull request as ready for review September 15, 2022 01:04
@emmatown emmatown requested a review from a team September 15, 2022 01:04
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