Skip to content

A local-first personal finance app

deprecate rule action templating in favour of formulae (#7865)

Matt Fiddaman28f7770913e2
diff --git a/packages/desktop-client/src/components/rules/RuleEditor.tsx b/packages/desktop-client/src/components/rules/RuleEditor.tsx
index 3a85498f6c..8cca32ff43 100644
--- a/packages/desktop-client/src/components/rules/RuleEditor.tsx
+++ b/packages/desktop-client/src/components/rules/RuleEditor.tsx
@@ -541,6 +541,20 @@ function ActionEditor({
/>
)}
</View>
+ {templated && (
+ <Text
+ style={{
+ ...styles.smallText,
+ color: theme.warningText,
+ marginTop: 3,
+ }}
+ >
+ <Trans>
+ Templating is deprecated and will be removed in a future
+ release. Switch this action to a formula instead.
+ </Trans>
+ </Text>
+ )}
</View>
{/*Due to that these fields have id's as value it is not helpful to have templating here*/}
{isFormulaEnabled &&
diff --git a/packages/desktop-client/src/components/settings/Experimental.tsx b/packages/desktop-client/src/components/settings/Experimental.tsx
index 205fa4c2db..62aaccfd86 100644
--- a/packages/desktop-client/src/components/settings/Experimental.tsx
+++ b/packages/desktop-client/src/components/settings/Experimental.tsx
@@ -25,6 +25,7 @@ type FeatureToggleProps = {
error?: ReactNode;
children: ReactNode;
feedbackLink?: string;
+ note?: ReactNode;
};
function FeatureToggle({
@@ -33,6 +34,7 @@ function FeatureToggle({
feedbackLink,
error,
children,
+ note,
}: FeatureToggleProps) {
const enabled = useFeatureFlag(flagName);
const [_, setFlagPref] = useSyncedPref(`flags.${flagName}`);
@@ -68,6 +70,8 @@ function FeatureToggle({
{error}
</Text>
)}
+
+ {note && <Text style={{ color: theme.warningText }}>{note}</Text>}
</View>
</label>
);
@@ -177,6 +181,12 @@ export function ExperimentalFeatures() {
<FeatureToggle
flag="actionTemplating"
feedbackLink="https://github.com/actualbudget/actual/issues/3606"
+ note={
+ <Trans>
+ Deprecated: this feature will be removed in a future release.
+ Use Excel formula mode (Rule formulae) instead.
+ </Trans>
+ }
>
<Trans>Rule action templating</Trans>
</FeatureToggle>
diff --git a/packages/docs/docs/experimental/rule-templating.md b/packages/docs/docs/experimental/rule-templating.md
index 90f11ac674..5cc9a64f0a 100644
--- a/packages/docs/docs/experimental/rule-templating.md
+++ b/packages/docs/docs/experimental/rule-templating.md
@@ -1,5 +1,9 @@
# Rule Action Templating
+:::danger Deprecated
+Rule action templating is **deprecated** and will be removed in a future release. New rules should use [Rule formulae](/docs/experimental/formulas#rule-formulas) instead, which cover the same use cases with a more powerful Excel-style syntax. If you have existing rules that use templating, please migrate them to formulae.
+:::
+
:::warning
This is an **experimental feature**. That means we're still working on finishing it. There may be bugs, missing functionality or incomplete documentation, and we may decide to remove the feature in a future release. If you have any feedback, please [open an issue](https://github.com/actualbudget/actual/issues) or post a message in the Discord.
:::
diff --git a/upcoming-release-notes/7865.md b/upcoming-release-notes/7865.md
new file mode 100644
index 0000000000..fb38ce0edb
--- /dev/null
+++ b/upcoming-release-notes/7865.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [matt-fidd]
+---
+
+Deprecate rule action templating in favour of formulae