Skip to content

✨ Add glyph-cell text backgrounds#93

Merged
rauhryan merged 7 commits into
mainfrom
rr/text-bg-support-76
Jun 9, 2026
Merged

✨ Add glyph-cell text backgrounds#93
rauhryan merged 7 commits into
mainfrom
rr/text-bg-support-76

Conversation

@rauhryan

@rauhryan rauhryan commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Packs a bg color into the pack string

after decoding the bg color, its pass through to the render text method properly

What does this PR do?

Add bg color option for text

Closes #73

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • All tests pass (pnpm test)
  • Files are formatted (pnpm format)
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

I generated the tests and the changes to the render-spec but I mostly hand coded the implemenation

rauhryan added 2 commits June 7, 2026 13:32
Packs a bg color into the pack string

after decoding the bg color, its pass through to the render text method
properly
@pkg-pr-new

pkg-pr-new Bot commented Jun 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/clayterm@93

commit: 746173a

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

Size Increased — +0.3 KB

107.8 KB unpacked

@codspeed-hq

codspeed-hq Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 99.25%

❌ 2 regressed benchmarks
✅ 21 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation printable ASCII (single char) 174.5 µs 1,417,946.8 µs -99.99%
Simulation long input burst (200 bytes) 576.2 µs 1,265.1 µs -54.46%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rr/text-bg-support-76 (746173a) with main (0c13b1e)

Open in CodSpeed

@natemoo-re natemoo-re left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Benchmark should be fixed by #91

I'd love for @cowboyd to weigh in as well, but this all looks great!

Comment thread test/color.test.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we're consolidating on test/color.test.ts for foreground/background behavior. feel free to rename this

@rauhryan

rauhryan commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author
image Added a demo to combine all the color features

@cowboyd cowboyd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great 🙌🏻

Only thing I'd change is that this should probably go into color.test.ts now that we have it?

@rauhryan rauhryan merged commit 9c1f6cd into main Jun 9, 2026
13 of 14 checks passed
@rauhryan rauhryan deleted the rr/text-bg-support-76 branch June 9, 2026 12:40
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.

💡 Main-axis space distribution (space-between / around / evenly)

3 participants