Skip to content

Conversation

@viktorrenkema
Copy link
Contributor

@viktorrenkema viktorrenkema commented Aug 26, 2025

This PR implements the GBO-side of allowing the object-fit property on cards. Table record fields for cover image now not only accept api.ContentRefFile | api.ContentRefURL, but also an object that contains record-level configurations like object-fit where then the content ref will be nested:

export type TableDefinitionImageRecord =
    | api.ContentRefFile
    | api.ContentRefURL
    | {
          ref: api.ContentRefFile | api.ContentRefURL;
          objectFit?: api.CardsImageObjectFit;
      };

If an object-fit is used that results in the background of the card being visible, we apply a subtle bg tint-color of the configured customization styles.

see https://github.com/GitbookIO/gitbook-x/pull/19221

Preview

CleanShot.2025-08-25.at.09.40.03.mp4

@linear
Copy link

linear bot commented Aug 26, 2025

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2025

⚠️ No Changeset found

Latest commit: 705ff63

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

@argos-ci
Copy link

argos-ci bot commented Aug 26, 2025

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

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 17 changed Sep 3, 2025, 6:41 AM
v2-cloudflare (Inspect) 👍 Changes approved 15 changed Sep 3, 2025, 6:44 AM
v2-vercel (Inspect) 👍 Changes approved 19 changed Sep 3, 2025, 6:43 AM

Copy link
Member

@nolannbiron nolannbiron left a comment

Choose a reason for hiding this comment

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

lgtm, just need to update the types once the API changes are released

@viktorrenkema viktorrenkema merged commit 5f6853d into main Sep 3, 2025
16 checks passed
@viktorrenkema viktorrenkema deleted the viktor/rnd-7202-card-covers-aspect-ratio-is-wrong branch September 3, 2025 07:11
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.

4 participants