Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
d6afc85a
Unverified
Commit
d6afc85a
authored
7 months ago
by
Matiss Janis Aboltins
Committed by
GitHub
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
adding feedback links besides the feature flags (#3283)
parent
ee21155d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/desktop-client/src/components/settings/Experimental.tsx
+40
-14
40 additions, 14 deletions
...s/desktop-client/src/components/settings/Experimental.tsx
upcoming-release-notes/3283.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/3283.md
with
46 additions
and
14 deletions
packages/desktop-client/src/components/settings/Experimental.tsx
+
40
−
14
View file @
d6afc85a
import
{
type
ReactNode
,
useState
}
from
'
react
'
;
import
{
Trans
,
useTranslation
}
from
'
react-i18next
'
;
import
type
{
FeatureFlag
}
from
'
loot-core/src/types/prefs
'
;
...
...
@@ -17,11 +18,13 @@ type FeatureToggleProps = {
disableToggle
?:
boolean
;
error
?:
ReactNode
;
children
:
ReactNode
;
feedbackLink
?:
string
;
};
function
FeatureToggle
({
flag
:
flagName
,
disableToggle
=
false
,
feedbackLink
,
error
,
children
,
}:
FeatureToggleProps
)
{
...
...
@@ -40,7 +43,15 @@ function FeatureToggle({
<
View
style
=
{
{
color
:
disableToggle
?
theme
.
pageTextSubdued
:
'
inherit
'
}
}
>
{
children
}
<
View
style
=
{
{
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
,
gap
:
5
}
}
>
{
children
}
{
feedbackLink
&&
(
<
Link
variant
=
"external"
to
=
{
feedbackLink
}
>
<
Trans
>
(give feedback)
</
Trans
>
</
Link
>
)
}
</
View
>
{
disableToggle
&&
(
<
Text
style
=
{
{
...
...
@@ -57,6 +68,7 @@ function FeatureToggle({
}
function
ReportBudgetFeature
()
{
const
{
t
}
=
useTranslation
();
const
[
budgetType
=
'
rollover
'
]
=
useSyncedPref
(
'
budgetType
'
);
const
enabled
=
useFeatureFlag
(
'
reportBudget
'
);
const
blockToggleOff
=
budgetType
===
'
report
'
&&
enabled
;
...
...
@@ -64,9 +76,10 @@ function ReportBudgetFeature() {
<
FeatureToggle
flag
=
"reportBudget"
disableToggle
=
{
blockToggleOff
}
error
=
"Switch to a rollover budget before turning off this feature"
error
=
{
t
(
'
Switch to a rollover budget before turning off this feature
'
)
}
feedbackLink
=
"https://github.com/actualbudget/actual/issues/2999"
>
Budget mode toggle
<
Trans
>
Budget mode toggle
</
Trans
>
</
FeatureToggle
>
);
}
...
...
@@ -79,18 +92,29 @@ export function ExperimentalFeatures() {
primaryAction
=
{
expanded
?
(
<
View
style
=
{
{
gap
:
'
1em
'
}
}
>
<
FeatureToggle
flag
=
"spendingReport"
>
Monthly spending report
<
FeatureToggle
flag
=
"spendingReport"
feedbackLink
=
"https://github.com/actualbudget/actual/issues/2820"
>
<
Trans
>
Monthly spending report
</
Trans
>
</
FeatureToggle
>
<
ReportBudgetFeature
/>
<
FeatureToggle
flag
=
"goalTemplatesEnabled"
>
Goal templates
<
Trans
>
Goal templates
</
Trans
>
</
FeatureToggle
>
<
FeatureToggle
flag
=
"simpleFinSync"
feedbackLink
=
"https://github.com/actualbudget/actual/issues/2272"
>
<
Trans
>
SimpleFIN sync
</
Trans
>
</
FeatureToggle
>
<
FeatureToggle
flag
=
"simpleFinSync"
>
SimpleFIN sync
</
FeatureToggle
>
<
FeatureToggle
flag
=
"dashboards"
>
Customizable reports page (dashboards)
<
FeatureToggle
flag
=
"dashboards"
feedbackLink
=
"https://github.com/actualbudget/actual/issues/3282"
>
<
Trans
>
Customizable reports page (dashboards)
</
Trans
>
</
FeatureToggle
>
</
View
>
)
:
(
...
...
@@ -104,16 +128,18 @@ export function ExperimentalFeatures() {
color
:
theme
.
pageTextPositive
,
}
}
>
I understand the risks, show experimental features
<
Trans
>
I understand the risks, show experimental features
</
Trans
>
</
Link
>
)
}
>
<
Text
>
<
strong
>
Experimental features.
</
strong
>
These features are not fully
tested and may not work as expected. THEY MAY CAUSE IRRECOVERABLE DATA
LOSS. They may do nothing at all. Only enable them if you know what you
are doing.
<
Trans
>
<
strong
>
Experimental features.
</
strong
>
These features are not fully
tested and may not work as expected. THEY MAY CAUSE IRRECOVERABLE DATA
LOSS. They may do nothing at all. Only enable them if you know what
you are doing.
</
Trans
>
</
Text
>
</
Setting
>
);
...
...
This diff is collapsed.
Click to expand it.
upcoming-release-notes/3283.md
0 → 100644
+
6
−
0
View file @
d6afc85a
---
category
:
Enhancements
authors
:
[
MatissJanis
]
---
Added feedback links besides the experimental feature flags.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment