-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Rapid exp title changes dependent on new or edit fixes #2901 * determine new or edit based on experiment data * formatting Co-authored-by: Jared Lockhart <[email protected]>
- Loading branch information
1 parent
aec8bb1
commit 6a1c22a
Showing
3 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/experimenter/static/rapid/components/experiments/ExperimentEditHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from "react"; | ||
|
||
import { useExperimentState } from "experimenter-rapid/contexts/experiment/hooks"; | ||
|
||
const ExperimentFormPage: React.FC = () => { | ||
const experimentData = useExperimentState(); | ||
let pageHeading = `Create a New A/A Experiment: ${experimentData.name}`; | ||
if (experimentData.slug) { | ||
pageHeading = `Edit Experiment: ${experimentData.name}`; | ||
} | ||
|
||
return ( | ||
<div className="mb-4"> | ||
<div className="d-flex align-items-center"> | ||
<h3 className="mr-3">{pageHeading}</h3> | ||
<span className="badge badge-secondary mb-1">Draft</span> | ||
</div> | ||
<p> | ||
Create and automatically launch an A/A CFR experiment. A/A experiments | ||
measure the accuracy of the tool. | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ExperimentFormPage; |
16 changes: 3 additions & 13 deletions
16
app/experimenter/static/rapid/components/pages/ExperimentFormPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters