|
6 | 6 | type StagingBehavior, |
7 | 7 | } from "$lib/config/uiFeatureFlags"; |
8 | 8 | import { persisted } from "@gitbutler/shared/persisted"; |
9 | | - import { CardGroup, RadioButton, Toggle } from "@gitbutler/ui"; |
| 9 | + import { CardGroup, RadioButton, Toggle, Spacer } from "@gitbutler/ui"; |
10 | 10 |
|
11 | 11 | const addToLeftmost = persisted<boolean>(false, "branch-placement-leftmost"); |
12 | 12 | function onStagingBehaviorFormChange(form: HTMLFormElement) { |
|
69 | 69 | </CardGroup.Item> |
70 | 70 | </CardGroup> |
71 | 71 |
|
| 72 | +<Spacer /> |
| 73 | + |
| 74 | +<div class="stack-v gap-8"> |
| 75 | + <h2 class="text-15 text-bold">Commit staging behavior</h2> |
| 76 | + <p class="text-12 text-body clr-text-2"> |
| 77 | + Controls which files are pre-selected when opening the staging view. |
| 78 | + <br /> |
| 79 | + You can always change the selection manually. |
| 80 | + </p> |
| 81 | +</div> |
| 82 | + |
72 | 83 | <CardGroup> |
73 | 84 | <form class="stack-v" onchange={(e) => onStagingBehaviorFormChange(e.currentTarget)}> |
| 85 | + <!-- <CardGroup.Item> |
| 86 | + {#snippet title()} |
| 87 | + Commit staging behavior |
| 88 | + {/snippet} |
| 89 | + {#snippet caption()} |
| 90 | + Choose how files are pre-selected when you open the staging view for a branch. This only |
| 91 | + affects the default selection - you can always manually change which files are included in |
| 92 | + the commit. |
| 93 | + {/snippet} |
| 94 | + </CardGroup.Item> --> |
74 | 95 | <CardGroup.Item labelFor="stage-all"> |
75 | 96 | {#snippet title()} |
76 | | - All assigned files |
| 97 | + Auto-select all assigned files |
77 | 98 | {/snippet} |
78 | 99 | {#snippet caption()} |
79 | | - Select all files assigned to this branch. If none are assigned, select all unassigned files |
80 | | - instead. |
| 100 | + Pre-selects all files assigned to this branch. Falls back to unassigned files if none are |
| 101 | + assigned. |
81 | 102 | {/snippet} |
82 | 103 | {#snippet actions()} |
83 | 104 | <RadioButton |
|
91 | 112 |
|
92 | 113 | <CardGroup.Item labelFor="stage-selection"> |
93 | 114 | {#snippet title()} |
94 | | - Only selected files |
| 115 | + Auto-select only your picked files |
95 | 116 | {/snippet} |
96 | 117 | {#snippet caption()} |
97 | | - Only include files you've already selected. If nothing is selected, falls back to all |
98 | | - assigned files, then all unassigned files. |
| 118 | + Pre-selects only the files you have already picked. Falls back to assigned files, then |
| 119 | + unassigned, if nothing is picked. |
99 | 120 | {/snippet} |
100 | 121 | {#snippet actions()} |
101 | 122 | <RadioButton |
|
109 | 130 |
|
110 | 131 | <CardGroup.Item labelFor="stage-none"> |
111 | 132 | {#snippet title()} |
112 | | - Manual selection |
| 133 | + No auto-selection |
113 | 134 | {/snippet} |
114 | 135 | {#snippet caption()} |
115 | | - Don't auto-select any files. You choose what to commit each time. |
| 136 | + Nothing is pre-selected. You manually pick what to include in each commit. |
116 | 137 | {/snippet} |
117 | 138 | {#snippet actions()} |
118 | 139 | <RadioButton |
|
0 commit comments