Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(3000): Reconnect submit buttons in PageHeader to forms #18602

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Nov 14, 2023

Problem

#18426 moved the buttons to a portal in 3000 mode, and the portal happens to render that HTML in the breadcrumbs bar – outside of any

that the may be in. So "Save" buttons in scenes like action or cohort editing don't work in 3000 mode.

Changes

Fixes the above my explicitly linking these buttons to their forms.

How did you test this code?

Codebase search + clicking. This would be prevented by E2E tests on 3000 UI, but we're still at a stage where that doesn't seem like a must.

@Twixes Twixes requested a review from a team November 14, 2023 12:56
@@ -50,7 +50,7 @@ export function SurveyForm({ id }: { id: string }): JSX.Element {
const { loadSurvey, editingSurvey } = useActions(surveyLogic)

return (
<Form formKey="survey" logic={surveyLogic} className="space-y-4" enableFormOnSubmit>
<Form id="survey" formKey="survey" logic={surveyLogic} className="space-y-4" enableFormOnSubmit>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariusandra Do you think it'd make sense for kea-forms to add an ID automatically based on logic key + formKey? Or would that be annoying?

Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough!

@Twixes Twixes merged commit b471e02 into master Nov 14, 2023
75 checks passed
@Twixes Twixes deleted the fix-forms-3000 branch November 14, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants