Skip to content

Commit

Permalink
fix(experiments): remove Edit button (#25644)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jurajmajerik and github-actions[bot] authored Oct 17, 2024
1 parent f6f99fc commit 85260e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions frontend/src/scenes/experiments/ExperimentView/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ export function PageHeaderCustom(): JSX.Element {
launchExperiment,
endExperiment,
archiveExperiment,
setEditExperiment,
loadExperimentResults,
loadSecondaryMetricResults,
createExposureCohort,
Expand All @@ -374,9 +373,6 @@ export function PageHeaderCustom(): JSX.Element {
<>
{experiment && !isExperimentRunning && (
<div className="flex items-center">
<LemonButton type="secondary" className="mr-2" onClick={() => setEditExperiment(true)}>
Edit
</LemonButton>
<LemonButton
type="primary"
data-attr="launch-experiment"
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/scenes/experiments/experimentLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,12 @@ export const experimentLogic = kea<experimentLogicType>([
},
{
key: [Scene.Experiment, experimentId],
name: experiment?.name || 'New',
path: urls.experiment(experimentId || 'new'),
name: experiment?.name || '',
onRename: async (name: string) => {
// :KLUDGE: work around a type error when using asyncActions accessed via a callback passed to selectors()
const logic = experimentLogic({ experimentId })
await logic.asyncActions.updateExperiment({ name })
},
},
],
],
Expand Down

0 comments on commit 85260e1

Please sign in to comment.