From 269fbe5ecf161289a4759e0c5f7b7fb7f99660e2 Mon Sep 17 00:00:00 2001 From: MananTank Date: Thu, 13 Mar 2025 22:48:40 +0000 Subject: [PATCH] [TOOL-3691] Dashbaord: Keep project settings submit button always enabled (#6467) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## PR-Codex overview This PR focuses on simplifying the logic for determining if form fields are "dirty" before enabling the save button in the `ProjectGeneralSettingsPage`. It removes checks for dirty states, allowing the save button to be enabled regardless of whether the fields have been modified. ### Detailed summary - Removed `isNameDirty` check for the `name` field in `ProjectNameSetting`. - Removed `isDomainsDirty` check for the `domains` field in `AllowedDomainsSetting`. - Removed `isBundleIdsDirty` check for the `bundleIds` field in `AllowedBundleIDsSetting`. - Updated save button to always have `disabled: false` for all settings. - Kept `isPending` functionality unchanged based on `props.isUpdatingProject`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../settings/ProjectGeneralSettingsPage.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/settings/ProjectGeneralSettingsPage.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/settings/ProjectGeneralSettingsPage.tsx index 542e3012692..df746ae06c2 100644 --- a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/settings/ProjectGeneralSettingsPage.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/settings/ProjectGeneralSettingsPage.tsx @@ -406,7 +406,6 @@ function ProjectNameSetting(props: { handleSubmit: () => void; }) { const { form, handleSubmit } = props; - const isNameDirty = form.getFieldState("name").isDirty; return ( @@ -501,7 +500,6 @@ function AllowedDomainsSetting(props: { handleSubmit: () => void; }) { const { form, handleSubmit } = props; - const isDomainsDirty = form.getFieldState("domains").isDirty; const helperText = (