Skip to content

Appearance: the inline effect editor shows 3D, Warp, Rasterize and channel choices as dropdowns - #2796

Merged
bflatastic merged 1 commit into
storytold:mainfrom
dotCooCoo:fix/appearance-inline-3d-and-channel-dropdowns
Oct 18, 2026
Merged

bflatastic merged 1 commit into
storytold:mainfrom
dotCooCoo:fix/appearance-inline-3d-and-channel-dropdowns

Conversation

@dotCooCoo

Copy link
Copy Markdown
Contributor

What and why

After #2582, the Appearance panel's inline effect editor still showed eight choice parameters as text fields holding
the stored value. Apply Effect › 3D and Materials › Revolve… and open its row with the chevron: on main, Edge reads
left, where the dialog has a Left / Right dropdown. Extrude & Bevel's bevel, every Warp style's orientation,
Rasterize's Color Model, Background and Anti-aliasing, and the channel of Levels and Curves are text fields too. Their
dialogs built these lists in their own bodies, so effect::choices did not hold them. Nothing checked a channel's
value: effect.setParams stored channel: "alpha", and Levels drew it as RGB.

effect::own_choices now holds these lists, each label as its dialog passes it to its dropdown or radio buttons. The
dialogs read the lists from it (Rasterize's Anti-aliasing from the AntiAlias list it is built from), and the inline
editor shows each one as a dropdown with the dialog's translated labels; Rasterize's Color Model reads CMYK in a CMYK
document. effect.apply and effect.setParams refuse a channel that Levels or Curves does not read with "channel
must be one of rgb, red, green, blue", and the document and its undo history stay as they were.

How it was tested

New tests:

  • panels::appearance::tests::the_effect_editor_picks_choices_their_own_dialogs_list: each of the eight shows its
    dialog's label, and a pick stores the dialog's value as one undo step.
  • panels::appearance::tests::the_effect_editor_shows_those_choices_as_their_dialogs_do: RVB for the channel in
    French, the "3d" row for Rounded in Spanish, and CMYK for Rasterize in a CMYK document.
  • dialogs::effect::tests::lists_drawn_in_a_dialogs_body_are_the_documented_values: each list holds the effect's
    documented values, in order.
  • a_tone_curve_channel_it_does_not_have_is_refused (engine/tests/param_keys.rs): effect.apply,
    appearance.addEffect, effect.setParams and the parameter check refuse bad channels.
  • i18n::tests::effect_channel_param_error_is_translated: every message-complete language translates the error.

All but the documented-values test fail on main.

On Windows 11 (x86-64) with rustc 1.99.0, on top of main at f7de3d6:

  • CRAFT_FONTS_DIR=<craft-fonts checkout> cargo xtask ci passes its 10 steps: 7,931 tests passed, 0 failed, 11 ignored.

On the branch merged with main at e6aec06, which adds 3D lights to dialogs/revolve.rs, clippy on the effects,
engine and ui-egui crates passes, and the dialog, Appearance, plug-in and i18n tests (466), param_keys (5) and the
effects library tests (232) pass.

git merge-tree reports no conflicts with main at e6aec06. It conflicts with #2759 in
crates/ui-egui/src/i18n/tests.rs, where both add a test after effect_color_param_error_is_translated; keeping both
tests resolves it.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm).
  • No panics in shipped code: no unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md.

…annel choices as dropdowns

The Appearance panel's inline effect editor still showed eight choice
parameters as text fields holding the stored value: Revolve's edge,
Extrude & Bevel's bevel, every Warp style's orientation, Rasterize's
Color Model, Background and Anti-aliasing, and the channel of Levels
and Curves. Their dialogs built these lists in their own bodies, so
effect::choices did not hold them. Nothing checked a channel's value:
a typo was stored, and Levels or Curves drew it as RGB.

effect::own_choices now holds these lists, each label as its dialog
passes it to its dropdown or radio buttons. The dialogs read the lists
from it (Rasterize's Anti-aliasing from the AntiAlias list it is built
from), and the inline editor shows each one as a dropdown with the
dialog's translated labels; Rasterize's Color Model reads CMYK or RGB
by the document's mode. effect.apply and effect.setParams refuse a
Levels or Curves channel other than rgb, red, green or blue (r, g, b
and any letter case are read too) with "`channel` must be one of rgb,
red, green, blue", and the document and its undo history stay as they
were.

Docs: docs/mcp.md (effect params), docs/target-app-parity.md.
@bflatastic
bflatastic force-pushed the fix/appearance-inline-3d-and-channel-dropdowns branch from 55a816d to 22ce516 Compare October 18, 2026 06:20
@bflatastic
bflatastic merged commit 5646fa7 into storytold:main Oct 18, 2026
3 of 5 checks passed
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b7e5799f-26ca-4bfc-9f1f-45f019926f6a
📥 Commits

Reviewing files that changed from the base of the PR and between 545e935 and 22ce516.

📒 Files selected for processing: 13
  • crates/effects/src/adjust.rs
  • crates/effects/src/lib.rs
  • crates/engine/src/cmd/effectcmd.rs
  • crates/engine/src/cmd/params.rs
  • crates/engine/tests/param_keys.rs
  • crates/ui-egui/src/dialogs/effect.rs
  • crates/ui-egui/src/dialogs/raster_effects.rs
  • crates/ui-egui/src/dialogs/revolve.rs
  • crates/ui-egui/src/dialogs/warp_effect.rs
  • crates/ui-egui/src/i18n/tests.rs
  • crates/ui-egui/src/panels/appearance.rs
  • docs/mcp.md
  • docs/target-app-parity.md
+-----------------------------------------------------------------------------------------------------+
| Write code that writes code. Code generators increase your productivity and help avoid duplication. |
+-----------------------------------------------------------------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@bflatastic

Copy link
Copy Markdown
Member

Thanks @dotCooCoo, merged. It went through the full gate (fmt, clippy, tests, layers, wasm) in a batch with the other PRs landed today.

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.

2 participants