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

Restore borders on embed blocks with Captions #2755

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

viktorrenkema
Copy link
Contributor

Fixes oversight in commit 994eb.
The Caption block wraps a couple other blocks to enable captions. In a prior PR the border on the Caption block was removed as we wanted it removed on images and drawings, as these can function as diagrams with white backgrounds, and a border adds more noise than utility then.

However, this also removed the border on the Embed block, which is an external link block.

This PR:

  • restores the bordering for Embed blocks
  • also improves consistency by having the Files block adhere to the same bordering styles from Caption, it was using its own but these were a bit different

Before (url embed block & files block)
CleanShot 2025-01-17 at 10 26 25@2x

After:

CleanShot 2025-01-17 at 10 25 41@2x

Fixes oversight in commit 994eb, the border in Caption should be removed when the Caption wraps image blocks, but embed blocks should be bordered
Copy link

changeset-bot bot commented Jan 17, 2025

⚠️ No Changeset found

Latest commit: cd4d835

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Comment on lines 23 to 27
return (
<Caption {...props} wrapperStyle={[]}>
<Caption {...props}>
<Link
href={file.downloadURL}
download={file.name}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SamyPesse I removed the styles and empty wrapperStyle that was passed to Caption in the Files block. As also mentioned in the PR description: "improves consistency by having the Files block adhere to the same bordering styles from Caption, it was using its own but these were a bit different"

Let me know if you added explicitly different bordering styles on the Files block on purpose, but if not, I think its nice to streamline these styles while i'm at it.

Copy link
Contributor

github-actions bot commented Jan 17, 2025

GitBook Preview
Latest commit: https://4f581392.gitbook-open.pages.dev
PR: https://pr2755.gitbook-open.pages.dev

Copy link

argos-ci bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 21 changed Jan 17, 2025, 10:41 AM

@viktorrenkema viktorrenkema force-pushed the viktor/fix-border-styling-links branch from 2dad85f to cd4d835 Compare January 17, 2025 10:17
@viktorrenkema viktorrenkema force-pushed the viktor/fix-border-styling-links branch from cd4d835 to b5f5463 Compare January 17, 2025 10:33
@viktorrenkema viktorrenkema merged commit 38de9eb into main Jan 17, 2025
9 checks passed
@viktorrenkema viktorrenkema deleted the viktor/fix-border-styling-links branch January 17, 2025 11:50
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