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

RichText Annotation object does not include background color if text color is specified #538

Open
heyitsOK opened this issue Dec 21, 2024 · 0 comments

Comments

@heyitsOK
Copy link

Describe the bug
When both text color and background color are set, the RichText Annotation object only provides the text color and leaves out background color. The documentation clearly lists possible values of the color property as a list of all text colors and background colors.

With the color property only being able to specify one color, another property would be necessary to define text color and background color as separate options.

To Reproduce
Node version: v20.12.2
Notion JS library version: 2.2.15

Steps to reproduce the behavior:

  1. Set the color of a RichText annotation to Blue Background in Notion.
  2. Set the color of the same RichText annotation to Orange Text.
  3. Observe that Orange Text and Blue Background can be applied at the same time.
  4. Make a request to retrieve RichText content with annotations.
  5. Check the color property of the annotation object in the response.
  6. Observe the color property returning "orange" and nothing else.

Expected behavior
The text color and background color should exist as two different properties in the RichText Annotation object since they are capable of being applied at the same time. Since color currently prioritizes text color anyways, a background color property should be added and allowing background color to be specified.

Screenshots

The documentation:
image

What it looks like on notion

image image

What the annotation object looks like for the text

image

Additional context
Add any other context about the problem here.

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

No branches or pull requests

1 participant