[PR #304] [MERGED] fix: refactor asciifont and fix seg fault on color setters #436

Closed
opened 2026-03-02 23:46:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/304
Author: @msmps
Created: 11/11/2025
Status: Merged
Merged: 11/12/2025
Merged by: @msmps

Base: mainHead: fix/resolve-ascii-color-issue-20251111221423


📝 Commits (4)

  • 5a353a5 refactor: asciifont to use color inputs for foreground and background colors; update related properties and methods for consistency
  • 40a187e refactor: update ascii font and related examples to use 'color' and 'backgroundColor' properties for consistency
  • 5b2c390 docs: update readme to include new components <textarea> and <code> with descriptions
  • fa6d726 Merge branch 'main' into fix/resolve-ascii-color-issue-20251111221423

📊 Changes

10 files changed (+111 additions, -107 deletions)

View changed files

📝 packages/core/docs/getting-started.md (+1 -1)
📝 packages/core/src/examples/ascii-font-selection-demo.ts (+8 -8)
📝 packages/core/src/examples/fonts.ts (+26 -26)
📝 packages/core/src/examples/index.ts (+2 -2)
📝 packages/core/src/examples/scroll-example.ts (+2 -2)
📝 packages/core/src/lib/ascii.font.ts (+14 -8)
📝 packages/core/src/renderables/ASCIIFont.ts (+51 -44)
📝 packages/core/src/renderables/Select.ts (+2 -2)
📝 packages/react/README.md (+3 -7)
📝 packages/react/examples/ascii.tsx (+2 -7)

📄 Description

Summary

Refactors ASCIIFont to use color and backgroundColor properties instead of fg/bg, and updates examples and documentation.

Changes

  • API Refactor: ASCIIFont now accepts ColorInput | ColorInput[] for color and ColorInput for backgroundColor
  • Removed properties: fg and bg options removed from ASCIIFontOptions
  • Updated examples: All ASCII font examples migrated to new API
  • Documentation: Added missing <textarea> and <code> components to README

Breaking Changes

  • fg and bg properties removed - use color and backgroundColor instead
  • Color parsing handled internally - pass ColorInput types (string, RGBA, etc.) directly

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/304 **Author:** [@msmps](https://github.com/msmps) **Created:** 11/11/2025 **Status:** ✅ Merged **Merged:** 11/12/2025 **Merged by:** [@msmps](https://github.com/msmps) **Base:** `main` ← **Head:** `fix/resolve-ascii-color-issue-20251111221423` --- ### 📝 Commits (4) - [`5a353a5`](https://github.com/anomalyco/opentui/commit/5a353a5ab88687ba00b262d2d4400bef329e1469) refactor: asciifont to use color inputs for foreground and background colors; update related properties and methods for consistency - [`40a187e`](https://github.com/anomalyco/opentui/commit/40a187e553da8f09b69673db19e1214100475d08) refactor: update ascii font and related examples to use 'color' and 'backgroundColor' properties for consistency - [`5b2c390`](https://github.com/anomalyco/opentui/commit/5b2c3907e71a61e8fdea033575df8780588cc305) docs: update readme to include new components `<textarea>` and `<code>` with descriptions - [`fa6d726`](https://github.com/anomalyco/opentui/commit/fa6d726fdf3bf252123b0ee3503beafd99ecde12) Merge branch 'main' into fix/resolve-ascii-color-issue-20251111221423 ### 📊 Changes **10 files changed** (+111 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/docs/getting-started.md` (+1 -1) 📝 `packages/core/src/examples/ascii-font-selection-demo.ts` (+8 -8) 📝 `packages/core/src/examples/fonts.ts` (+26 -26) 📝 `packages/core/src/examples/index.ts` (+2 -2) 📝 `packages/core/src/examples/scroll-example.ts` (+2 -2) 📝 `packages/core/src/lib/ascii.font.ts` (+14 -8) 📝 `packages/core/src/renderables/ASCIIFont.ts` (+51 -44) 📝 `packages/core/src/renderables/Select.ts` (+2 -2) 📝 `packages/react/README.md` (+3 -7) 📝 `packages/react/examples/ascii.tsx` (+2 -7) </details> ### 📄 Description ## Summary Refactors `ASCIIFont` to use `color` and `backgroundColor` properties instead of `fg`/`bg`, and updates examples and documentation. ## Changes - **API Refactor**: `ASCIIFont` now accepts `ColorInput | ColorInput[]` for `color` and `ColorInput` for `backgroundColor` - **Removed properties**: `fg` and `bg` options removed from `ASCIIFontOptions` - **Updated examples**: All ASCII font examples migrated to new API - **Documentation**: Added missing `<textarea>` and `<code>` components to README ## Breaking Changes - `fg` and `bg` properties removed - use `color` and `backgroundColor` instead - Color parsing handled internally - pass `ColorInput` types (string, RGBA, etc.) directly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:46:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#436
No description provided.