Appearance
Template Revert Button
Overview
Replace the orange "modified" dot on template buttons with a purple revert button, consistent with the existing override/revert pattern used in mass format child creatives.
What was done (March 2026)
TemplateButton.vue changes
- Removed the orange
modified-dotindicator - Added a purple Revert button (with reload icon) that appears when
modifiedis true - Button uses the same
$echo-*color scheme asOverrideControls.vue(purple theme) - Emits
@revertevent when clicked - Layout changed from
inline-blocktoflexwith gap between dropdown and revert button
Config files updated (all three)
- ButtonConfiguration.vue — wired
@reverttohandleTemplateRevert() - FormConfiguration.vue — same pattern
- HtmlConfiguration.vue — same pattern
Revert behavior
- User clicks Revert button
- Confirmation dialog appears: "Revert to template? This will discard all manual changes and reset to the original template."
- On confirm: re-applies the current
selectedTemplatevia the existingupdateButtonTemplate/updateFormTemplate/applyTemplatefunctions - This resets all block properties to the template defaults, clearing
templateModified
Switching templates when modified
- Still shows a confirmation dialog: "Apply template? You have made manual changes..."
- Uses the same dynamic
confirmActionpattern as revert
Implementation pattern
Each config file now uses a generic confirm dialog with dynamic title/description/action:
data: {
confirmDialogOpen: false,
confirmAction: null, // () => void
confirmDialogTitle: '',
confirmDialogDescription: '',
}1
2
3
4
5
6
2
3
4
5
6
Both handleTemplateSelect (when modified) and handleTemplateRevert set these, then open the dialog. confirmTemplateAction executes whichever action was set.
What needs to be done in animation system
AnimationEffectList.vue (on add-animation-system branch)
The animation preset selector currently uses the same orange modified-dot pattern. It should be updated to match:
- Replace the orange dot with a purple revert button (same styling as TemplateButton)
- Add revert functionality: when clicked, re-apply the matched preset (or clear effects if no preset was originally loaded)
- Confirmation dialog: already exists for switching presets when modified — extend it for revert
- The
isModifiedcomputed already detects when effects differ from a preset
Key differences from template system
- Animation presets don't have a
selectedTemplatefield — instead,matchedPresetis computed by comparing current effects JSON to all preset JSONs - Need to track the originally loaded preset name (currently not stored) so revert knows what to revert to
- Options:
- A) Store
selectedPresetin animation config data (likeselectedTemplatein blocks) — cleaner, enables revert - B) Only show revert when
matchedPresetwas previously set — requires tracking last-known preset
- A) Store
Recommended approach
Option A: Add selectedPreset: string to the animation config type and defaults. Set it when a preset is loaded. The revert button re-applies that preset. This mirrors the template system exactly.
Files to modify
AnimationEffectList.vue— replace dot with revert button, add revert handlertypes.ts— addselectedPresettoAnimationConfigtype (on animation branch)defaults.ts— addselectedPreset: ''to animation defaults
Design reference
Purple revert button styling (from OverrideControls.vue)
scss
.revert-button {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border: 1px solid $echo-85;
border-radius: 4px;
background-color: $echo-95;
color: $echo-50;
font-size: 0.7rem;
font-weight: 500;
cursor: pointer;
&:hover {
background-color: $echo-85;
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Related files
| File | Purpose |
|---|---|
Configuration/components/TemplateButton.vue | Shared template dropdown + revert button |
Configuration/configs/ButtonConfiguration.vue | Button template handling |
Configuration/configs/FormConfiguration.vue | Form template handling |
Configuration/configs/HtmlConfiguration.vue | HTML template handling |
OptionRow/OverrideControls.vue | Original revert pattern (mass format overrides) |
store/modules/blocks.ts | templateModified tracking in updateBlockValue mutation |
templates/index.ts | updateButtonTemplate, updateFormTemplate, getTemplate |
Border radius presets (also updated in this session)
Preset values changed to even numbers:
- Sharp:
0px - Curved:
6px(was5px) - Rounded:
16px(was15px) - Arched:
9999px(unchanged)
Behavior fix in BorderRadiusPresets.vue:
- Manual adjustment in custom mode no longer auto-snaps to a preset when the value happens to match
- Presets only activate when explicitly clicked