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

Added bottom margin to body element when inspector is collapsed. #127

Merged
merged 4 commits into from
Oct 15, 2021
Merged

Conversation

przemyslaw-zan
Copy link
Member

@przemyslaw-zan przemyslaw-zan commented Oct 8, 2021

Other: Added bottom margin to the <body> element when the inspector is collapsed to avoid covering the footer. Closes #126.

Copy link
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

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

LGTM, but there is one thing that could be improved.

image

The div.ck-inspector.ck-inspector_collapsed element contains the height:* style definition. The value is defined as const (30px).

The same value is also specified in the body[style] attribute:

<body <!-- ... --> style="--ck-inspector-collapsed-height:30px;>

Hence, the div element could read its height from the variable.

tests/inspector/ui.js Outdated Show resolved Hide resolved
tests/inspector/ui.js Outdated Show resolved Hide resolved
Co-authored-by: Kamil Piechaczek <pomek@users.noreply.github.com>
@przemyslaw-zan
Copy link
Member Author

przemyslaw-zan commented Oct 11, 2021

The height is already set using this variable. I fiddled around with it a bit, and i think we should leave it as it is, changing this seems to create more mess than necessary.

height: this.props.isCollapsed ? INSPECTOR_COLLAPSED_HEIGHT : this.props.height

Copy link
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

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

Yeah, you're right. Good. I'll check how these changes behave in our documentation, and if everything looks good, I'll merge.

@pomek pomek merged commit 0324c24 into master Oct 15, 2021
@pomek pomek deleted the i/126 branch October 15, 2021 13:25
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.

Add bottom margin to body element when inspector is collapsed
2 participants