32 Commits

Author SHA1 Message Date
Martín Lucas Golini
df3ac4508b Add plan to implement a more complete font-weight support. 2026-05-27 01:10:28 -03:00
Martín Lucas Golini
55e0fb9736 float and clear fixes 2026-05-26 21:57:32 -03:00
Martín Lucas Golini
85b706869e Float and text wrap fixes. 2026-05-25 02:42:55 -03:00
Martín Lucas Golini
b36ef2cf85 Fix background draw in atomic boxes.
Fix in selector parser.
2026-05-25 01:49:04 -03:00
Martín Lucas Golini
fa537eaaaa More WIP, several HTML fixes compatibility. 2026-05-24 15:29:00 -03:00
Martín Lucas Golini
c5e39f4c6d More fixes. 2026-05-24 13:43:29 -03:00
Martín Lucas Golini
bb7682dd8f CSS float improvements. 2026-05-24 02:21:53 -03:00
Martín Lucas Golini
c834f82566 Huge RichText refactor to improve inline-box support. Still WIP. 2026-05-21 12:22:49 -03:00
Martín Lucas Golini
8cfedc4590 Added alignment-baseline and vertical-align support in RichText and all its consumers. 2026-05-17 21:54:08 -03:00
Martín Lucas Golini
afe3df0650 Improve baseline aligment in inline-blocks.
Improved html architecture documentation.
2026-05-17 03:19:08 -03:00
Martín Lucas Golini
138c6eb30e Merge branch 'develop' into feature/system-font-resolver 2026-05-14 02:29:04 -03:00
Martín Lucas Golini
359dc8f157 block and inline-block layouter fixes, added a plan for a definitive fix in block layouter. 2026-05-14 01:33:00 -03:00
Martín Lucas Golini
828adf581d Initial work on the system font resolver. 2026-05-13 23:59:36 -03:00
Martín Lucas Golini
792bae6da2 Make UITextNode easily debuggable by setting its position and size. 2026-05-09 20:05:35 -03:00
Martín Lucas Golini
e94550a049 ui: Full HTML background property support + whitespace collapsing rewrite
Part 1: CSS background properties (UINodeDrawable, LayerDrawable)
Add `BackgroundMode` (Native / Html) to `UINodeDrawable`. When Html mode
is active, background rendering follows CSS/HTML semantics (repeat defaults
to repeat, clip plane always enabled, etc.). Native mode preserves the
original eepp behavior (no-repeat by default, clip only when repeating).
Add per-layer `background-origin`, `background-clip`, `background-attachment`
with `fromText` parsers and CSS property registration. `background-origin`
controls the reference box for position/percentage resolution.
`background-clip` enables per-layer content-box clipping.
`background-attachment: fixed` anchors the background to the scene root;
`local` is stubbed (needs per-widget scroll offset plumbing).
Replace the single `Repeat` enum with `RepeatX` / `RepeatY` enums supporting
two-value repeat (e.g. "repeat no-repeat", "space round"). Implement space
and round repeat rendering in `LayerDrawable::draw()`.
Fix `background-size: contain` to scale up (not just down) like HTML.
Rewrite the comma-separated multi-layer `background` shorthand parser with
`/size` separator, box keyword disambiguation, and attachment keywords.
UINode::{getBackground} detects `UI_HTML_ELEMENT` flag and lazily sets
`BackgroundMode::Html`.
Add golden image test: 20-tile image atlas via
`background: url(bnp.png) pos / size no-repeat` with browser-comparable HTML.
Part 2: HTML whitespace collapsing (HTMLFormatter → UIRichText)
Move whitespace collapsing from parse time to layout time. Previously
`HTMLFormatter::collapseXmlWhitespace` ran on the pugixml DOM before
CSS was resolved, using tag-name heuristics for inline/block detection.
This caused whitespace between elements with `display: inline-block`
(via CSS) to be incorrectly stripped.
The new pipeline preserves raw whitespace in `UITextNode` widgets (after
internal whitespace collapsing via `UIRichText::collapseInternalWhitespace`)
and defers boundary stripping to `UIRichText::rebuildRichText`, where every
widget's computed `CSSDisplay` is available via `UIWidget::isInlineDisplay()`.
- `UIWidget::isInlineDisplay()` returns true for text nodes and widgets
  with `CSSDisplay::Inline | InlineBlock`, used by boundary logic.
- `UITextNode::isWhitespaceOnly()` identifies collapsible text nodes.
- `findLogicalPrev/Next` walks up through inline ancestors to find the
  correct boundary element, matching HTML's whitespace transparency rule.
- Boundary stripping: leading/trailing spaces removed at block edges,
  preserved between inline-level siblings.
- Double-space prevention: when adding text that starts with a space,
  peeks at the last `SpanBlock` in RichText if it ends with a space,
  the leading space is stripped. This prevents consecutive spaces when
  whitespace nodes are separated by empty inline elements.
- `UITextNode::mLayoutCharCount` syncs the character index between
  `rebuildRichText` (where boundary-stripped text is added) and
  `positionRichTextChildren` (where widgets are mapped to render spans),
  fixing hitbox alignment for all text-bearing widgets.
Remove `HTMLFormatter::collapseXmlWhitespace`, `isInlineNode`,
`hasSignificantText`, `getLogicalPrev`, `getLogicalNext`, and the
`precomputeDisplayStyles` hack (~200 lines removed). `HTMLFormatter`
now only exposes `HTMLtoXML`.
Other fixes
- Remove `@import url(https://fonts.googleapis.com/css?family=Lato)`
  from ensoft.css (async HTTP use-after-free in test suite).
- `BlockLayouter::positionRichTextChildren` skips whitespace-only text
  nodes when advancing the character index.
- Fix in DrawableSearcher not finding already loaded textures.
2026-05-08 22:13:07 -03:00
Martín Lucas Golini
03a798820d Fix percentage resolution when parent is WrapContent (only for height's, for width we need to do some extra changes in layouters, added a plan to fix it later). 2026-05-03 12:32:27 -03:00
Martín Lucas Golini
ecf7c20262 Fix foreground-radius definition. 2026-05-03 00:48:13 -03:00
Martín Lucas Golini
936938b71f Added an option to set dynamic theming in the UICodeEditor. 2026-05-01 01:07:06 -03:00
Martín Lucas Golini
e1d9642dc6 Simulate content-box for HTML compat layer. 2026-04-29 00:28:11 -03:00
Martín Lucas Golini
24cf3ad6c7 Added UISvg (for embedded svg in XML) and UIHTMLImage (to handle HTML img, although still WIP). 2026-04-27 16:41:37 -03:00
Martín Lucas Golini
41e979d314 CSS Position (Out of Flow) implementation.
Added a few plan descriptions that I want to implement later.
2026-04-26 21:50:34 -03:00
Martín Lucas Golini
1970b8bbe9 WIP CSS Display support. 2026-04-25 18:55:39 -03:00
Martín Lucas Golini
dea87f345e Disable ASAN leak detection when run unit-tests with xvfb-run (because the tool leaks all X11 windows). 2026-04-24 12:00:45 -03:00
Martín Lucas Golini
fe815e97ac Added clear-indentation command (SpartanJ/ecode#854). 2026-03-27 16:04:38 -03:00
Martín Lucas Golini
0e923adea9 UI: Add UIDiffView for specialized diff/patch visualization
- Integrated dtl into thirdparty for native string diffing
- Implemented UIDiffView, a composite wrapper for UICodeEditor with a custom plugin (UIDiffEditorPlugin)
- Handles dynamic string diffing and standard .patch file parsing
- Automatically extracts target filename from patch headers for proper syntax highlighting
- Corrects line numbers in gutter to match the diff origins while hiding patch headers
- Wired into App::loadDiffFromPath and GitPlugin
- Added exhaustive unit tests in uidiffview_test.cpp
2026-03-23 18:50:26 -03:00
Martín Lucas Golini
5429b15e04 More ACP client WIP, finishing the protocol implementation. 2026-03-23 14:25:44 -03:00
Martín Lucas Golini
9c966ac427 ACP Improvements phase 2 ready. 2026-03-23 13:22:17 -03:00
Martín Lucas Golini
a5822268cb ACP Support Improvement for ecode (Terminal output, better error reporting). ACP plans.
Safety memory clean ups.
2026-03-23 02:48:04 -03:00
Martín Lucas Golini
c5b5203a6a Improved agent config. 2026-03-23 00:04:14 -03:00
Martín Lucas Golini
d45ffbfe23 Add basic HTML tables support, this allows us to display tables in Markdown files. 2026-03-08 21:51:30 -03:00
Martín Lucas Golini
9514b0fd73 Several general improvements and fixes across the UI: UIRichText, UITextSpan, UIImage, UIScrollView. 2026-03-08 03:05:17 -03:00
Martín Lucas Golini
e0bf0a23e5 Added a basic RichText class (and added tests and an example).
Fixed LineWrap when using initial X offset and the word does not fit in the current line but it fits in the next.
Added basic agent rules.
2026-02-08 13:35:16 -03:00