Repository navigation
feat(adjustments): visibility toggles for every adjustment tool - #1833
lalibertemarc wants to merge 3 commits into
Conversation
879b414 to
6224122
Compare
|
I would suggest adding this to each and every tool, what do you think about this, @lalibertemarc ? Regards, |
i have no strong opinion on this. the motivation was so the white balance wasnt picked up by the visibility toggler of the Color panel. I dont mind adding it to every tool if CyberTimon wants it too. Though i feel like the Color Mixer and Color Grading tool benefit the most from this. |
6224122 to
9c61e6c
Compare
|
Yeah agree, but you know, the thing is that if there's something you can have for every tool, which is also beneficial and not troublesome, then why only have it for two and not all... Additionally, I have this kind of OCD and like it when a tool which could be universally available, is either universally available, or universally unavailable. But yeah CyberTimon's opinion matters significantly... so yeah... Let's wait for his opinion on this. Regards, |
9c61e6c to
310d8d6
Compare
done! |
|
Thanks :) |
The eye button that hides a panel's adjustments moves from CollapsibleSection into a reusable VisibilityToggle, together with the dimmed-content class, so adjustment tools can use the same control. CollapsibleSection also types its props and hover timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every tool in the Color, Details and Effects panels gets its own eye toggle, as do Lens Blur, Relight and Fog inside Spatial. Hiding a tool bypasses its effect while keeping its settings and controls. The frontend resolves all the eyes into a flat activeTools map (tool id -> yes/no, missing means active) stored on the edit and on each mask, and the engine only checks is_tool_active for each tool, so it knows nothing about how panels and menus are arranged. Panel and Spatial eyes switch all of their tools at once. Edits saved before activeTools existed still render exactly as before: the frontend converts their sectionVisibility flags when they are opened, and the engine falls back to those flags while activeTools is missing, so unopened edits keep their hidden panels in thumbnails and batch exports. Batch auto adjust builds the map from those flags before turning on the tools it writes. Auto adjust and picking a LUT turn on the tools they change, and a panel's reset or paste turns its tools back on. The Spatial effects share one SpatialEffect wrapper, and the Effects slider handlers use SliderChangeEvent instead of any. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ALL_ADJUSTMENT_TOOLS and ADJUSTMENT_TOOLS_BY_ID move from the panel customization menu into adjustments.ts so the active tool helpers reuse them, the visibility handlers take a tool id rather than a section name, and the legacy engine fallback only reads the section flags older edits actually contain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4714c4c to
eba61ed
Compare
Description
Each adjustment panel has an eye toggle that bypasses all of its tools at once. In the Color, Details and Effects panels, that makes it hard to judge what a single tool is doing. For example, the Color panel eye also turns off white balance. This PR gives every sub-tool its own eye toggle:
Hiding a tool bypasses only its effect on the render. Its settings and controls stay as they are, so you can flip it on and off to compare. A panel's eye (and Spatial's) now switches all of its tools at once, and shows as off when every tool in it is off. This works in the main adjustments panel and inside masks. (As suggested in the thread, this started with Color Grading and Color Mixer only.)
Following the review feedback, the engine no longer knows how panels and menus are arranged. The frontend reads every eye itself and stores one flat yes/no list of which tools run. The engine just checks that list.
Type of Change
Changes Made
activeTools: { colorMixer: false, fog: false, … }, keyed by tool id, where a missing key means the tool runs. It replacessectionVisibility. The frontend helpersisToolActive,setToolActiveandtoggleToolActiveexpand a panel or Spatial into its tools usingADJUSTMENT_SECTION_TOOLS, which stays the only place that hierarchy is defined. Lens Blur, Relight and Fog are listed assubToolsofspatial.is_tool_active(adjustments, tool)is the only check. The global and mask builders gate each value by its tool (get_val("colorPresence", "saturation", …)), as do white balance, color calibration and LUT.lens_blur.rs,relight.rs,fog.rsand the two effect hashes incache_utils.rsshareis_effect_enabled, which replaces five copies of an inlineeffectsvisibility lookup.normalizeLoadedAdjustmentsconverts itssectionVisibilityflags intoactiveTools(getActiveTools).activeToolsis missing. That legacy-onlyLEGACY_SECTION_TOOLStable is the one place the engine still knows the old sections, and it's only used for data saved before this change.mergeActiveTools).ControlsPanelandMasksPanelexposeactiveTools, their existing toggle handler and the panel id throughToolVisibilityContext.AdjustmentSubSectionreads them by itsid, so the Color, Details and Effects panels need no visibility code. A hidden tool is only dimmed while its panel is still on, so hiding a whole panel doesn't double-dim it. Masks keep their active-mask guard.CollapsibleSectionintoui/VisibilityToggle.tsx. Panels, tools and Spatial effects all use it, including the hover-reveal behaviour and the dimmed state (HIDDEN_CONTENT_CLASS). Tooltips reuse the existingui.collapsibleSection.disableSection/enableSectionkeys, so there are no new i18n strings.SpatialEffectcomponent that also carries the eye. Relight keeps itsdata-relight-lightsmarker forImageCanvas. Most of theEffects.tsxdiff is re-indentation, so "Hide whitespace" makes it much shorter.SliderChangeEventinstead ofany, the Relight light sliders sharehandleLightSliderChangeinstead of repeating the parse, andCollapsibleSectiontypes its props and hover timeout.ALL_ADJUSTMENT_TOOLS/ADJUSTMENT_TOOLS_BY_IDmove from the panel customization menu intoadjustments.tsso both can use them.activeToolsfrom an older sidecar's flags, so the panels that edit had hidden stay hidden.Screenshots/Videos
Testing
tsc, ESLint, Prettier,i18n:check,cargo fmtandcargo clippy --all-targets -- -D warningsshow no new errors or warnings compared withmain. ESLint goes from 38 to 0 warnings inEffects.tsxand from 6 to 0 inCollapsibleSection.tsx.Test Configuration:
Checklist
Additional Notes
AI Disclaimer:
Please state the involvement of AI in this PR:
🤖 Generated with Claude Code