Skip to content

✨ Add glyph-cell text backgrounds#93

Open
rauhryan wants to merge 5 commits into
mainfrom
rr/text-bg-support-76
Open

✨ Add glyph-cell text backgrounds#93
rauhryan wants to merge 5 commits into
mainfrom
rr/text-bg-support-76

Conversation

@rauhryan
Copy link
Copy Markdown
Collaborator

@rauhryan rauhryan commented Jun 7, 2026

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
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 7, 2026

Open in StackBlitz

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

commit: dd496b4

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

Size Increased — +0.3 KB

107.8 KB unpacked

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented Jun 7, 2026

Merging this PR will not alter performance

✅ 23 untouched benchmarks


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

Open in CodSpeed

Copy link
Copy Markdown
Member

@natemoo-re natemoo-re left a comment

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!

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
Copy link
Copy Markdown
Collaborator Author

rauhryan commented Jun 8, 2026

image Added a demo to combine all the color features

Copy link
Copy Markdown
Collaborator

@cowboyd cowboyd left a comment

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?

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