From c766615d12fe9bf931f6addf92acb14647c94401 Mon Sep 17 00:00:00 2001 From: Oliver Bryan <04oliverbryan@gmail.com> Date: Wed, 21 Jan 2026 12:26:19 +0000 Subject: [PATCH] removed Dialog from component names and changed -modal to -form --- .../{account-dialog.tsx => account.tsx} | 4 ++-- .../{add-member-dialog.tsx => add-member.tsx} | 2 +- .../{issue-modal.tsx => issue-form.tsx} | 2 +- .../frontend/src/components/login-form.tsx | 4 ++-- ...sation-modal.tsx => organisation-form.tsx} | 2 +- .../src/components/organisation-select.tsx | 4 ++-- ...nisations-dialog.tsx => organisations.tsx} | 22 +++++++++---------- .../{project-modal.tsx => project-form.tsx} | 2 +- .../src/components/project-select.tsx | 4 ++-- ...on-dialog.tsx => server-configuration.tsx} | 2 +- .../{sprint-modal.tsx => sprint-form.tsx} | 2 +- .../frontend/src/components/timer-modal.tsx | 6 +---- packages/frontend/src/pages/App.tsx | 17 +++++++------- 13 files changed, 34 insertions(+), 39 deletions(-) rename packages/frontend/src/components/{account-dialog.tsx => account.tsx} (98%) rename packages/frontend/src/components/{add-member-dialog.tsx => add-member.tsx} (99%) rename packages/frontend/src/components/{issue-modal.tsx => issue-form.tsx} (99%) rename packages/frontend/src/components/{organisation-modal.tsx => organisation-form.tsx} (99%) rename packages/frontend/src/components/{organisations-dialog.tsx => organisations.tsx} (99%) rename packages/frontend/src/components/{project-modal.tsx => project-form.tsx} (99%) rename packages/frontend/src/components/{server-configuration-dialog.tsx => server-configuration.tsx} (98%) rename packages/frontend/src/components/{sprint-modal.tsx => sprint-form.tsx} (99%) diff --git a/packages/frontend/src/components/account-dialog.tsx b/packages/frontend/src/components/account.tsx similarity index 98% rename from packages/frontend/src/components/account-dialog.tsx rename to packages/frontend/src/components/account.tsx index 3cd5b46..5b1775f 100644 --- a/packages/frontend/src/components/account-dialog.tsx +++ b/packages/frontend/src/components/account.tsx @@ -15,7 +15,7 @@ import { parseError } from "@/lib/server"; import { cn } from "@/lib/utils"; import ThemeToggle from "./theme-toggle"; -function AccountDialog({ trigger }: { trigger?: ReactNode }) { +function Account({ trigger }: { trigger?: ReactNode }) { const { user: currentUser, setUser } = useAuthenticatedSession(); const updateUser = useUpdateUser(); @@ -175,4 +175,4 @@ function AccountDialog({ trigger }: { trigger?: ReactNode }) { ); } -export default AccountDialog; +export default Account; diff --git a/packages/frontend/src/components/add-member-dialog.tsx b/packages/frontend/src/components/add-member.tsx similarity index 99% rename from packages/frontend/src/components/add-member-dialog.tsx rename to packages/frontend/src/components/add-member.tsx index dc17917..d386b7f 100644 --- a/packages/frontend/src/components/add-member-dialog.tsx +++ b/packages/frontend/src/components/add-member.tsx @@ -14,7 +14,7 @@ import { Field } from "@/components/ui/field"; import { useAddOrganisationMember } from "@/lib/query/hooks"; import { parseError, user } from "@/lib/server"; -export function AddMemberDialog({ +export function AddMember({ organisationId, existingMembers, trigger, diff --git a/packages/frontend/src/components/issue-modal.tsx b/packages/frontend/src/components/issue-form.tsx similarity index 99% rename from packages/frontend/src/components/issue-modal.tsx rename to packages/frontend/src/components/issue-form.tsx index 34f0731..15357f7 100644 --- a/packages/frontend/src/components/issue-modal.tsx +++ b/packages/frontend/src/components/issue-form.tsx @@ -29,7 +29,7 @@ import { import { parseError } from "@/lib/server"; import { cn, issueID } from "@/lib/utils"; -export function IssueModal({ trigger }: { trigger?: React.ReactNode }) { +export function IssueForm({ trigger }: { trigger?: React.ReactNode }) { const { user } = useAuthenticatedSession(); const selectedOrganisation = useSelectedOrganisation(); const selectedProject = useSelectedProject(); diff --git a/packages/frontend/src/components/login-form.tsx b/packages/frontend/src/components/login-form.tsx index 842c01f..a27f7ad 100644 --- a/packages/frontend/src/components/login-form.tsx +++ b/packages/frontend/src/components/login-form.tsx @@ -4,7 +4,7 @@ import { USER_NAME_MAX_LENGTH, USER_USERNAME_MAX_LENGTH } from "@sprint/shared"; import { useEffect, useState } from "react"; import { useNavigate, useSearchParams } from "react-router-dom"; import Avatar from "@/components/avatar"; -import { ServerConfigurationDialog } from "@/components/server-configuration-dialog"; +import { ServerConfiguration } from "@/components/server-configuration"; import { useSession } from "@/components/session-provider"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; @@ -219,7 +219,7 @@ export default function LogInForm() { error !== "" && "border-destructive", )} > - + {capitalise(mode)}
diff --git a/packages/frontend/src/components/organisation-modal.tsx b/packages/frontend/src/components/organisation-form.tsx similarity index 99% rename from packages/frontend/src/components/organisation-modal.tsx rename to packages/frontend/src/components/organisation-form.tsx index 356814d..39e5b44 100644 --- a/packages/frontend/src/components/organisation-modal.tsx +++ b/packages/frontend/src/components/organisation-form.tsx @@ -30,7 +30,7 @@ const slugify = (value: string) => .replace(/^-+/, "") .replace(/-{2,}/g, "-"); -export function OrganisationModal({ +export function OrganisationForm({ trigger, completeAction, errorAction, diff --git a/packages/frontend/src/components/organisation-select.tsx b/packages/frontend/src/components/organisation-select.tsx index af642f5..30109b6 100644 --- a/packages/frontend/src/components/organisation-select.tsx +++ b/packages/frontend/src/components/organisation-select.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; -import { OrganisationModal } from "@/components/organisation-modal"; +import { OrganisationForm } from "@/components/organisation-form"; import { useSelection } from "@/components/selection-provider"; import { Button } from "@/components/ui/button"; import { @@ -102,7 +102,7 @@ export function OrganisationSelect({ {organisations.length > 0 && } - Create Organisation diff --git a/packages/frontend/src/components/organisations-dialog.tsx b/packages/frontend/src/components/organisations.tsx similarity index 99% rename from packages/frontend/src/components/organisations-dialog.tsx rename to packages/frontend/src/components/organisations.tsx index 2b5201a..078081b 100644 --- a/packages/frontend/src/components/organisations-dialog.tsx +++ b/packages/frontend/src/components/organisations.tsx @@ -2,16 +2,16 @@ import { DEFAULT_STATUS_COLOUR, ISSUE_STATUS_MAX_LENGTH, type SprintRecord } fro import { useQueryClient } from "@tanstack/react-query"; import { type ReactNode, useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; -import { AddMemberDialog } from "@/components/add-member-dialog"; -import { OrganisationModal } from "@/components/organisation-modal"; +import { AddMember } from "@/components/add-member"; +import { OrganisationForm } from "@/components/organisation-form"; import { OrganisationSelect } from "@/components/organisation-select"; -import { ProjectModal } from "@/components/project-modal"; +import { ProjectForm } from "@/components/project-form"; import { ProjectSelect } from "@/components/project-select"; import { useSelection } from "@/components/selection-provider"; import { useAuthenticatedSession } from "@/components/session-provider"; import SmallSprintDisplay from "@/components/small-sprint-display"; import SmallUserDisplay from "@/components/small-user-display"; -import { SprintModal } from "@/components/sprint-modal"; +import { SprintForm } from "@/components/sprint-form"; import StatusTag from "@/components/status-tag"; import { Button } from "@/components/ui/button"; import ColourPicker from "@/components/ui/colour-picker"; @@ -45,7 +45,7 @@ import { queryKeys } from "@/lib/query/keys"; import { issue } from "@/lib/server"; import { capitalise } from "@/lib/utils"; -function OrganisationsDialog({ trigger }: { trigger?: ReactNode }) { +function Organisations({ trigger }: { trigger?: ReactNode }) { const { user } = useAuthenticatedSession(); const queryClient = useQueryClient(); const { selectedOrganisationId, selectedProjectId } = useSelection(); @@ -540,7 +540,7 @@ function OrganisationsDialog({ trigger }: { trigger?: ReactNode }) { )}
- {isAdmin && ( - m.User.username)} onSuccess={(user) => { @@ -827,7 +827,7 @@ function OrganisationsDialog({ trigger }: { trigger?: ReactNode }) { ); })} {isAdmin && ( - @@ -854,7 +854,7 @@ function OrganisationsDialog({ trigger }: { trigger?: ReactNode }) { {selectedProject && ( <> - - .replace(/[^A-Z0-9]/g, "") .slice(0, 4); -export function ProjectModal({ +export function ProjectForm({ organisationId, trigger, completeAction, diff --git a/packages/frontend/src/components/project-select.tsx b/packages/frontend/src/components/project-select.tsx index a943d74..725ad5a 100644 --- a/packages/frontend/src/components/project-select.tsx +++ b/packages/frontend/src/components/project-select.tsx @@ -1,5 +1,5 @@ import { useEffect, useMemo, useState } from "react"; -import { ProjectModal } from "@/components/project-modal"; +import { ProjectForm } from "@/components/project-form"; import { useSelection } from "@/components/selection-provider"; import { Button } from "@/components/ui/button"; import { @@ -81,7 +81,7 @@ export function ProjectSelect({ ))} {projects.length > 0 && } - { } }; -export function ServerConfigurationDialog({ trigger }: { trigger?: ReactNode }) { +export function ServerConfiguration({ trigger }: { trigger?: ReactNode }) { const [open, setOpen] = useState(false); const [serverURL, setServerURL] = useState(getServerURL()); const [originalURL, setOriginalURL] = useState(getServerURL()); diff --git a/packages/frontend/src/components/sprint-modal.tsx b/packages/frontend/src/components/sprint-form.tsx similarity index 99% rename from packages/frontend/src/components/sprint-modal.tsx rename to packages/frontend/src/components/sprint-form.tsx index 463605c..a84fe84 100644 --- a/packages/frontend/src/components/sprint-modal.tsx +++ b/packages/frontend/src/components/sprint-form.tsx @@ -48,7 +48,7 @@ const getDefaultDates = () => { }; }; -export function SprintModal({ +export function SprintForm({ projectId, sprints, trigger, diff --git a/packages/frontend/src/components/timer-modal.tsx b/packages/frontend/src/components/timer-modal.tsx index 016aa34..01ac4ee 100644 --- a/packages/frontend/src/components/timer-modal.tsx +++ b/packages/frontend/src/components/timer-modal.tsx @@ -10,11 +10,7 @@ export function TimerModal({ issueId, disabled }: { issueId: number; disabled?: return ( - diff --git a/packages/frontend/src/pages/App.tsx b/packages/frontend/src/pages/App.tsx index 7a7ec65..b8798ed 100644 --- a/packages/frontend/src/pages/App.tsx +++ b/packages/frontend/src/pages/App.tsx @@ -2,17 +2,17 @@ import { useEffect, useMemo, useRef } from "react"; import { useLocation } from "react-router-dom"; -import AccountDialog from "@/components/account-dialog"; +import Account from "@/components/account"; +import { IssueForm } from "@/components/issue-form"; import { IssueDetailPane } from "@/components/issue-detail-pane"; -import { IssueModal } from "@/components/issue-modal"; import { IssuesTable } from "@/components/issues-table"; import LogOutButton from "@/components/log-out-button"; import OrgIcon from "@/components/org-icon"; import { OrganisationSelect } from "@/components/organisation-select"; -import OrganisationsDialog from "@/components/organisations-dialog"; +import Organisations from "@/components/organisations"; import { ProjectSelect } from "@/components/project-select"; import { useSelection } from "@/components/selection-provider"; -import { ServerConfigurationDialog } from "@/components/server-configuration-dialog"; +import { ServerConfiguration } from "@/components/server-configuration"; import { useAuthenticatedSession } from "@/components/session-provider"; import SmallUserDisplay from "@/components/small-user-display"; import { Button } from "@/components/ui/button"; @@ -199,14 +199,13 @@ export default function App() { )?.Organisation.slug || "" } size={7} - className="hover:border hover:border-foreground/30" /> } /> {selectedOrganisationId && } {selectedOrganisationId && selectedProjectId && ( - @@ -222,13 +221,13 @@ export default function App() { - + - + -