Skip to content

A local-first personal finance app

docs: shared experimental warning component (#8174)

Matt Fiddaman248b163a899e
diff --git a/packages/docs/docs/advanced/bank-sync/enable-banking.md b/packages/docs/docs/advanced/bank-sync/enable-banking.md
index 2b21e22ecc..de6c3eadda 100644
--- a/packages/docs/docs/advanced/bank-sync/enable-banking.md
+++ b/packages/docs/docs/advanced/bank-sync/enable-banking.md
@@ -1,8 +1,7 @@
# Enable Banking Setup
-:::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.
-:::
+<ExperimentalFeatureWarning issueId="7799" />
+
:::warning
All functionality described here may not be available in the latest stable release. See [Experimental Features](../../experimental/index.md) for instructions to enable experimental features. Use the `nightly` images for the latest implementation.
:::
diff --git a/packages/docs/docs/experimental/balance-forecast-report.md b/packages/docs/docs/experimental/balance-forecast-report.md
index 3c514352a6..70f1ed39f0 100644
--- a/packages/docs/docs/experimental/balance-forecast-report.md
+++ b/packages/docs/docs/experimental/balance-forecast-report.md
@@ -1,8 +1,6 @@
# Balance Forecast Report
-:::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.
-:::
+<ExperimentalFeatureWarning issueId="7669" />
## What it is
diff --git a/packages/docs/docs/experimental/budget-analysis-report.md b/packages/docs/docs/experimental/budget-analysis-report.md
index 4979c410f3..bef5214b95 100644
--- a/packages/docs/docs/experimental/budget-analysis-report.md
+++ b/packages/docs/docs/experimental/budget-analysis-report.md
@@ -1,8 +1,6 @@
# Budget Analysis Report
-:::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 comment on the [dedicated issue](https://github.com/actualbudget/actual/issues/6742) or post a message in the Discord.
-:::
+<ExperimentalFeatureWarning issueId="6742" />
## What it is
diff --git a/packages/docs/docs/experimental/budget-automation.md b/packages/docs/docs/experimental/budget-automation.md
index 3d1dca9598..417a149724 100644
--- a/packages/docs/docs/experimental/budget-automation.md
+++ b/packages/docs/docs/experimental/budget-automation.md
@@ -1,8 +1,6 @@
# Budget Automation
-:::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 [use the feedback issue on github](https://github.com/actualbudget/actual/issues/7692) or post a message in the Discord.
-:::
+<ExperimentalFeatureWarning issueId="7692" />
:::warning
All functionality described here may not be available in the latest stable release. See [Experimental Features](./index.md) for instructions to enable experimental features. Use the `nightly` images for the latest implementation.
diff --git a/packages/docs/docs/experimental/formulas.md b/packages/docs/docs/experimental/formulas.md
index 081f663385..ae4faf0fa5 100644
--- a/packages/docs/docs/experimental/formulas.md
+++ b/packages/docs/docs/experimental/formulas.md
@@ -1,8 +1,6 @@
# Excel Formula Mode (Formula cards & Rule formulas)
-::::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 comment on [this feedback issue](https://github.com/actualbudget/actual/issues/5949) or post a message in the Discord.
-::::
+<ExperimentalFeatureWarning issueId="5949" />
::::warning
All functionality described here may not be available in the latest stable release. See [Experimental Features](./index.md) for instructions to enable experimental features. Use the `nightly` images for the latest implementation.
diff --git a/packages/docs/docs/experimental/goal-templates.md b/packages/docs/docs/experimental/goal-templates.md
index 8245e9b6cc..4f9013ccd7 100644
--- a/packages/docs/docs/experimental/goal-templates.md
+++ b/packages/docs/docs/experimental/goal-templates.md
@@ -1,8 +1,7 @@
# Budget Templates
-:::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.
-:::
+<ExperimentalFeatureWarning />
+
:::warning
All functionality described here may not be available in the latest stable release. See [Experimental Features](./index.md) for instructions to enable experimental features. Use the `nightly` images for the latest implementation.
:::
diff --git a/packages/docs/docs/experimental/monthly-cleanup.md b/packages/docs/docs/experimental/monthly-cleanup.md
index f53933f4ba..875de848f0 100644
--- a/packages/docs/docs/experimental/monthly-cleanup.md
+++ b/packages/docs/docs/experimental/monthly-cleanup.md
@@ -1,8 +1,6 @@
# End of Month Cleanup
-:::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. See [Experimental Features](./index.md) for instructions to enable experimental features.
-:::
+<ExperimentalFeatureWarning />
Create a template by adding a note to a category and adding a line that begins with `#cleanup`.
diff --git a/packages/docs/docs/experimental/rule-templating.md b/packages/docs/docs/experimental/rule-templating.md
index 4e4dbc7373..18d131896c 100644
--- a/packages/docs/docs/experimental/rule-templating.md
+++ b/packages/docs/docs/experimental/rule-templating.md
@@ -4,9 +4,8 @@
Rule action templating is **deprecated** and will be removed in a future release. New rules should use [Rule formulae](./formulas.md#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.
-:::
+<ExperimentalFeatureWarning issueId="3606" />
+
:::warning
All functionality described here may not be available in the latest stable release. See [Experimental Features](./index.md) for instructions to enable experimental features. Use the `nightly` images for the latest implementation.
:::
diff --git a/packages/docs/src/components/ExperimentalFeatureWarning.tsx b/packages/docs/src/components/ExperimentalFeatureWarning.tsx
new file mode 100644
index 0000000000..0dce74e2d7
--- /dev/null
+++ b/packages/docs/src/components/ExperimentalFeatureWarning.tsx
@@ -0,0 +1,44 @@
+import type { ReactNode } from 'react';
+
+import Admonition from '@theme/Admonition';
+
+type ExperimentalFeatureWarningProps = {
+ issueId?: string;
+ children?: ReactNode;
+};
+
+export function ExperimentalFeatureWarning({
+ issueId,
+ children,
+}: ExperimentalFeatureWarningProps) {
+ return (
+ <Admonition type="warning">
+ <p>
+ This is an <strong>experimental feature</strong>. 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{' '}
+ {issueId ? (
+ <>
+ comment on the{' '}
+ <a
+ href={`https://github.com/actualbudget/actual/issues/${issueId}`}
+ rel="noopener noreferrer"
+ >
+ dedicated feedback issue
+ </a>
+ </>
+ ) : (
+ <a
+ href="https://github.com/actualbudget/actual/issues"
+ rel="noopener noreferrer"
+ >
+ open an issue
+ </a>
+ )}{' '}
+ or post a message in the Discord.
+ </p>
+ {children}
+ </Admonition>
+ );
+}
diff --git a/packages/docs/src/theme/MDXComponents.js b/packages/docs/src/theme/MDXComponents.js
index 77a0cabdef..2c9ae8980f 100644
--- a/packages/docs/src/theme/MDXComponents.js
+++ b/packages/docs/src/theme/MDXComponents.js
@@ -1,9 +1,11 @@
import Image from '@site/src/components/Image';
import MDXComponents from '@theme-original/MDXComponents';
+import { ExperimentalFeatureWarning } from '../components/ExperimentalFeatureWarning';
import Key from '../components/Key';
export default {
...MDXComponents,
img: Image,
+ ExperimentalFeatureWarning,
Key,
};