[PR #7296] [MERGED] Port map: a style keeps its shadow colour #7473

Closed
opened 2026-11-03 06:39:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7296
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/vol-a-rest-011


📝 Commits (1)

  • 55c77de port_map: a style keeps its shadow colour, so withShadowColor is ported

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/port_map/rest-011.tsv (+1 -1)

📄 Description

One row in tools/port_map/rest-011.tsv: a style's shadow colour is kept now,
so Style.withShadowColor is no longer missing.

row before after
Style.withShadowColor missing ("Style has no shadow colour, so a component's shadow_color is dropped") crates/horizon-client-core/src/component.rs::shadow_color

Citations checked in the tree

  • Style.shadow_color: Option<u32> is at crates/horizon-client-core/src/text.rs:92,
    packed ARGB, with zero documented as suppressing the shadow.
  • component::shadow_color reads the JSON value either as a packed int
    (-16711936) or as a normalized RGBA array ([1, 0, 0.5, 1]), and
    component.rs:272 puts it on the span's style; Style::inherit carries it
    down a parent style and text.rs:557 writes it back out as shadow_color, so
    the value survives a round trip instead of being dropped.

Map check

python3 tools/port_ledger.py map-check tools/port_map/rest-011.tsv
150 rows, no problems.

Proven: the field, the parser and the writer exist at those paths; the
component round trip is covered by the test at component.rs:496-501; the
map-check passes on the file.

Not proven: nothing was drawn in game, so whether the renderer honours the
colour beyond the field is not shown here. Rows left alone: FilterMask.apply
and applyWithFormatting (the mask is decoded in PlayerChat but never applied
to the text), ByteBufCodecs.registry's gap (an inline holder value is still
refused, play.rs:236), and the ObjectContents and AtlasSprite sprite-text
rows.


🔄 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/horizon-rust/horizon/pull/7296 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/vol-a-rest-011` --- ### 📝 Commits (1) - [`55c77de`](https://github.com/horizon-rust/horizon/commit/55c77de24baf381d2f25264ff73837e1f103194e) port_map: a style keeps its shadow colour, so withShadowColor is ported ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-011.tsv` (+1 -1) </details> ### 📄 Description One row in `tools/port_map/rest-011.tsv`: a style's shadow colour is kept now, so `Style.withShadowColor` is no longer missing. | row | before | after | | --- | --- | --- | | `Style.withShadowColor` | missing ("Style has no shadow colour, so a component's shadow_color is dropped") | `crates/horizon-client-core/src/component.rs::shadow_color` | **Citations checked in the tree** - `Style.shadow_color: Option<u32>` is at `crates/horizon-client-core/src/text.rs:92`, packed ARGB, with zero documented as suppressing the shadow. - `component::shadow_color` reads the JSON value either as a packed int (`-16711936`) or as a normalized RGBA array (`[1, 0, 0.5, 1]`), and `component.rs:272` puts it on the span's style; `Style::inherit` carries it down a parent style and `text.rs:557` writes it back out as `shadow_color`, so the value survives a round trip instead of being dropped. **Map check** ``` python3 tools/port_ledger.py map-check tools/port_map/rest-011.tsv 150 rows, no problems. ``` **Proven:** the field, the parser and the writer exist at those paths; the component round trip is covered by the test at `component.rs:496-501`; the map-check passes on the file. **Not proven:** nothing was drawn in game, so whether the renderer honours the colour beyond the field is not shown here. Rows left alone: `FilterMask.apply` and `applyWithFormatting` (the mask is decoded in `PlayerChat` but never applied to the text), `ByteBufCodecs.registry`'s gap (an inline holder value is still refused, `play.rs:236`), and the `ObjectContents` and `AtlasSprite` sprite-text rows. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:39:56 +07: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
horizon-rust/horizon#7473
No description provided.