Skip to content

fix: Timestamp cell tooltip renders dark text on the dark tooltip background - #10028

Open
nishantmonu51 wants to merge 1 commit into
mainfrom
nishant/fix-timestamp-tooltip-text-color
Open

nishantmonu51 wants to merge 1 commit into
mainfrom
nishant/fix-timestamp-tooltip-text-color

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

Hovering a timestamp cell in a model or source preview showed the value as near-black text on the dark tooltip, so it could not be read. This affects Rill Developer as well as cloud editing.

  • Timestamp.svelte baked text-fg-primary into its class list next to the color prop that the cell tooltip sets to text-fg-inverse. Tailwind emits the text-fg-* utilities alphabetically, so primary lands later in the stylesheet and wins. Only timestamp columns were affected because the other data-type components do not hardcode a color.
  • The fix drops the hardcoded class. Base.svelte already defaults to text-fg-primary when no color is passed, so timestamps outside the tooltip render exactly as before, in both light and dark mode.
  • Adds FormattedDataType.spec.ts, which asserts that a rendered value carries only the requested text-fg-* class. It fails on the old component.

Steps to reproduce:

  1. Open any model or source whose preview has a timestamp column, locally or in cloud editing.
  2. Hover a cell in that column.
  3. The first line of the tooltip (the full value) is unreadable, while the "Copy this value to clipboard" line below it is fine.

Closes APP-950

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

`Timestamp.svelte` baked `text-fg-primary` into its class list next to the
`color` prop. Tailwind emits the `text-fg-*` utilities alphabetically, so on
the preview table's cell tooltip `text-fg-primary` beat the requested
`text-fg-inverse` and the value was unreadable on the dark background.
`Base.svelte` already defaults the color to `text-fg-primary`, so passing it
only through `color` keeps every other timestamp unchanged.

Closes APP-950

This branch has not been deployed

No deployments
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.

1 participant