mirror of
https://github.com/element-hq/element-web.git
synced 2026-01-16 23:01:06 +00:00
Move EditInPlace out of Form (Fixes: reloading EW on EC url update) (#31434)
Some checks are pending
Build / Build on macos-14 (push) Waiting to run
Build / Build on ubuntu-24.04 (push) Waiting to run
Build / Build on windows-2022 (push) Waiting to run
Build and Deploy develop / Build & Deploy develop.element.io (push) Waiting to run
Deploy documentation / GitHub Pages (push) Waiting to run
Deploy documentation / deploy (push) Blocked by required conditions
Shared Component Visual Tests / Run Visual Tests (push) Waiting to run
Static Analysis / Typescript Syntax Check (push) Waiting to run
Static Analysis / i18n Check (push) Waiting to run
Static Analysis / Rethemendex Check (push) Waiting to run
Static Analysis / ESLint (push) Waiting to run
Static Analysis / Style Lint (push) Waiting to run
Static Analysis / Workflow Lint (push) Waiting to run
Static Analysis / Analyse Dead Code (push) Waiting to run
Some checks are pending
Build / Build on macos-14 (push) Waiting to run
Build / Build on ubuntu-24.04 (push) Waiting to run
Build / Build on windows-2022 (push) Waiting to run
Build and Deploy develop / Build & Deploy develop.element.io (push) Waiting to run
Deploy documentation / GitHub Pages (push) Waiting to run
Deploy documentation / deploy (push) Blocked by required conditions
Shared Component Visual Tests / Run Visual Tests (push) Waiting to run
Static Analysis / Typescript Syntax Check (push) Waiting to run
Static Analysis / i18n Check (push) Waiting to run
Static Analysis / Rethemendex Check (push) Waiting to run
Static Analysis / ESLint (push) Waiting to run
Static Analysis / Style Lint (push) Waiting to run
Static Analysis / Workflow Lint (push) Waiting to run
Static Analysis / Analyse Dead Code (push) Waiting to run
* Move `EditInPlace` out of `Form` If it is part of the form saving will submit the inner form of EditInPlace and reload EW. * add tests and comments * update snapshot * fix playwright
This commit is contained in:
parent
242f2deb64
commit
9faee160e9
3 changed files with 20 additions and 1 deletions
|
|
@ -29,5 +29,12 @@ test.describe("Devtools", () => {
|
|||
display: none;
|
||||
}`,
|
||||
});
|
||||
|
||||
// Try entering a value for the Developer.elementCallUrl setting
|
||||
const input = page.getByRole("textbox", { name: "Element Call URL" });
|
||||
await input.fill("https://example.com");
|
||||
await input.press("Enter");
|
||||
// expect EW NOT to reload
|
||||
await page.getByText("Saved").isVisible();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -113,8 +113,16 @@ const DevtoolsDialog: React.FC<IProps> = ({ roomId, threadRootId, onFinished })
|
|||
<SettingsFlag name="developerMode" level={SettingLevel.ACCOUNT} />
|
||||
<SettingsFlag name="showHiddenEventsInTimeline" level={SettingLevel.DEVICE} />
|
||||
<SettingsFlag name="enableWidgetScreenshots" level={SettingLevel.ACCOUNT} />
|
||||
<SettingsField settingKey="Developer.elementCallUrl" level={SettingLevel.DEVICE} />
|
||||
</Form.Root>
|
||||
{/* The settings field needs to be outside `Form.Root` because `SettingsField` will have a inner Form,
|
||||
Otherwise we end up with a nester `Form` and that prohibits `preventDefault` so setting the value
|
||||
will reload the page.
|
||||
*/}
|
||||
<SettingsField
|
||||
settingKey="Developer.elementCallUrl"
|
||||
level={SettingLevel.DEVICE}
|
||||
aria-label="elementCallUrl"
|
||||
/>
|
||||
</BaseTool>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,6 +217,10 @@ exports[`DevtoolsDialog renders the devtools dialog 1`] = `
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form
|
||||
class="_root_19upo_16"
|
||||
>
|
||||
<div
|
||||
class="_field_19upo_26"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue