@@ -10,7 +10,7 @@ import { useCallback, useContext, useEffect, useState } from "react";
1010import { useHistory } from "react-router" ;
1111import { Link } from "react-router-dom" ;
1212import Alert from "../components/Alert" ;
13- import CheckBox from "../components/CheckBox " ;
13+ import { CheckboxInputContainer , CheckboxInput } from "../components/forms/CheckboxInputField " ;
1414import { PageWithSubMenu } from "../components/PageWithSubMenu" ;
1515import PillLabel from "../components/PillLabel" ;
1616import { useCurrentOrg } from "../data/organizations/orgs-query" ;
@@ -124,51 +124,52 @@ export default function ProjectSettingsView() {
124124 </ div >
125125 </ Alert >
126126 ) }
127- < CheckBox
128- title = { < span > Enable Incremental Prebuilds </ span > }
129- desc = {
130- < span >
131- When possible, use an earlier successful prebuild as a base to create new prebuilds. This can
132- make your prebuilds significantly faster, especially if they normally take longer than 10
133- minutes.{ " " }
134- < a className = "gp-link" href = "https://www.gitpod.io/changelog/faster-incremental-prebuilds" >
135- Learn more
136- </ a >
137- </ span >
138- }
139- checked = { project . settings ?. useIncrementalPrebuilds ?? false }
140- onChange = { ( { target } ) => updateProjectSettings ( { useIncrementalPrebuilds : target . checked } ) }
141- />
142- < CheckBox
143- title = { < span > Cancel Prebuilds on Outdated Commits </ span > }
144- desc = { < span > Cancel pending or running prebuilds on the same branch when new commits are pushed.</ span > }
145- checked = { ! project . settings ?. keepOutdatedPrebuildsRunning }
146- onChange = { ( { target } ) => updateProjectSettings ( { keepOutdatedPrebuildsRunning : ! target . checked } ) }
147- />
148- < CheckBox
149- title = {
150- < span >
151- Use Last Successful Prebuild{ " " }
152- < PillLabel type = "warn" className = "font-semibold mt-2 ml-2 py-0.5 px-2 self-center" >
153- Alpha
154- </ PillLabel >
155- </ span >
156- }
157- desc = {
158- < span >
159- Skip waiting for prebuilds in progress and use the last successful prebuild from previous
160- commits on the same branch.
161- </ span >
162- }
163- checked = { ! ! project . settings ?. allowUsingPreviousPrebuilds }
164- onChange = { ( { target } ) =>
165- updateProjectSettings ( {
166- allowUsingPreviousPrebuilds : target . checked ,
167- // we are disabling prebuild cancellation when incremental workspaces are enabled
168- keepOutdatedPrebuildsRunning : target . checked || project ?. settings ?. keepOutdatedPrebuildsRunning ,
169- } )
170- }
171- />
127+ < CheckboxInputContainer >
128+ < CheckboxInput
129+ value = "Enable Incremental Prebuilds"
130+ label = "Enable Incremental Prebuilds"
131+ hint = {
132+ < span >
133+ When possible, use an earlier successful prebuild as a base to create new prebuilds. This
134+ can make your prebuilds significantly faster, especially if they normally take longer than
135+ 10 minutes.{ " " }
136+ < a className = "gp-link" href = "https://www.gitpod.io/changelog/faster-incremental-prebuilds" >
137+ Learn more
138+ </ a >
139+ </ span >
140+ }
141+ checked = { project . settings ?. useIncrementalPrebuilds ?? false }
142+ onChange = { ( checked ) => updateProjectSettings ( { useIncrementalPrebuilds : checked } ) }
143+ />
144+ < CheckboxInput
145+ value = "Cancel Prebuilds"
146+ label = "Cancel Prebuilds on Outdated Commits"
147+ hint = "Cancel pending or running prebuilds on the same branch when new commits are pushed."
148+ checked = { ! project . settings ?. keepOutdatedPrebuildsRunning }
149+ onChange = { ( checked ) => updateProjectSettings ( { keepOutdatedPrebuildsRunning : ! checked } ) }
150+ />
151+ < CheckboxInput
152+ value = "Use last successful Prebuild"
153+ label = {
154+ < span >
155+ Use Last Successful Prebuild{ " " }
156+ < PillLabel type = "warn" className = "font-semibold mt-2 ml-2 py-0.5 px-2 self-center" >
157+ Alpha
158+ </ PillLabel >
159+ </ span >
160+ }
161+ hint = "Skip waiting for prebuilds in progress and use the last successful prebuild from previous
162+ commits on the same branch."
163+ checked = { ! ! project . settings ?. allowUsingPreviousPrebuilds }
164+ onChange = { ( checked ) =>
165+ updateProjectSettings ( {
166+ allowUsingPreviousPrebuilds : checked ,
167+ // we are disabling prebuild cancellation when incremental workspaces are enabled
168+ keepOutdatedPrebuildsRunning : checked || project ?. settings ?. keepOutdatedPrebuildsRunning ,
169+ } )
170+ }
171+ />
172+ </ CheckboxInputContainer >
172173 < div className = "flex mt-4 max-w-2xl" >
173174 < div className = "flex flex-col ml-6" >
174175 < label
0 commit comments