chore: settings bug fixes and ui improvement (#2198)

* fix: settings bug fixes and ui improvement

* chore: setting sidebar scroll fix & code refactor
This commit is contained in:
Anmol Singh Bhatia 2023-09-15 19:30:53 +05:30 committed by GitHub
parent 3d72279edb
commit 5d331477ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 108 additions and 101 deletions

View file

@ -75,11 +75,11 @@ const AutomationsSettings: NextPage = () => {
</Breadcrumbs>
}
>
<div className="flex flex-row gap-2">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<section className="pr-9 py-8 w-full">
<section className="pr-9 py-8 w-full overflow-y-auto">
<div className="flex items-center py-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">Automations</h3>
</div>

View file

@ -125,11 +125,11 @@ const EstimatesSettings: NextPage = () => {
</Breadcrumbs>
}
>
<div className="flex flex-row gap-2 h-full overflow-hidden">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<div className="pr-9 py-8 flex flex-col w-full">
<div className="pr-9 py-8 flex flex-col w-full overflow-y-auto">
<section className="flex items-center justify-between pt-2 pb-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">Estimates</h3>
<div className="col-span-12 space-y-5 sm:col-span-7">

View file

@ -153,11 +153,11 @@ const FeaturesSettings: NextPage = () => {
</Breadcrumbs>
}
>
<div className="flex flex-row gap-2">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<section className="pr-9 py-8 w-full">
<section className="pr-9 py-8 w-full overflow-y-auto">
<div className="flex items-center py-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">Features</h3>
</div>

View file

@ -190,21 +190,21 @@ const GeneralSettings: NextPage = () => {
onClose={() => setSelectedProject(null)}
user={user}
/>
<form onSubmit={handleSubmit(onSubmit)}>
<div className="flex flex-row gap-2">
<div className="w-80 py-8">
<SettingsSidebar />
</div>
<div className={`pr-9 py-8 w-full ${isAdmin ? "" : "opacity-60"}`}>
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<div className={`pr-9 py-8 w-full overflow-y-auto ${isAdmin ? "" : "opacity-60"}`}>
<form onSubmit={handleSubmit(onSubmit)}>
<div className="relative h-44 w-full mt-6">
<img
src={watch("cover_image")!}
alt={watch("cover_image")!}
className="h-44 w-full rounded-md object-cover"
/>
<div className="flex items-end justify-between absolute bottom-4 w-full px-4">
<div className="flex gap-3">
<div className="flex items-center justify-center bg-custom-background-90 h-[52px] w-[52px] rounded-lg">
<div className="flex items-end justify-between gap-3 absolute bottom-4 w-full px-4">
<div className="flex gap-3 flex-grow truncate">
<div className="flex items-center justify-center flex-shrink-0 bg-custom-background-90 h-[52px] w-[52px] rounded-lg">
{projectDetails ? (
<div className="h-7 w-7 grid place-items-center">
<Controller
@ -226,8 +226,8 @@ const GeneralSettings: NextPage = () => {
</Loader>
)}
</div>
<div className="flex flex-col gap-1 text-white">
<span className="text-lg font-semibold">{watch("name")}</span>
<div className="flex flex-col gap-1 text-white truncate">
<span className="text-lg font-semibold truncate">{watch("name")}</span>
<span className="flex items-center gap-2 text-sm">
<span>
{watch("identifier")} . {currentNetwork?.label}
@ -236,7 +236,7 @@ const GeneralSettings: NextPage = () => {
</div>
</div>
<div className="flex justify-center">
<div className="flex justify-center flex-shrink-0">
{projectDetails ? (
<div>
<Controller
@ -442,9 +442,9 @@ const GeneralSettings: NextPage = () => {
)}
</Disclosure>
)}
</div>
</form>
</div>
</form>
</div>
</ProjectAuthorizationWrapper>
);
};

View file

@ -54,18 +54,20 @@ const ProjectIntegrations: NextPage = () => {
link={`/${workspaceSlug}/projects/${projectId}/issues`}
linkTruncate
/>
<BreadcrumbItem title="Integrations" unshrinkTitle />
<BreadcrumbItem title="Integrations Settings" unshrinkTitle />
</Breadcrumbs>
}
>
<div className="flex flex-row gap-2 h-full overflow-hidden">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
{workspaceIntegrations ? (
workspaceIntegrations.length > 0 ? (
<section className="pr-9 py-8 overflow-y-auto w-full">
<IntegrationAndImportExportBanner bannerName="Integrations" />
<div className="pr-9 py-8 gap-10 w-full overflow-y-auto">
<div className="flex items-center py-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">Integrations</h3>
</div>
{workspaceIntegrations ? (
workspaceIntegrations.length > 0 ? (
<div>
{workspaceIntegrations.map((integration) => (
<SingleIntegration
@ -74,26 +76,26 @@ const ProjectIntegrations: NextPage = () => {
/>
))}
</div>
</section>
) : (
<EmptyState
title="You haven't configured integrations"
description="Configure GitHub and other integrations to sync your project issues."
image={emptyIntegration}
primaryButton={{
text: "Configure now",
onClick: () => router.push(`/${workspaceSlug}/settings/integrations`),
}}
/>
)
) : (
<EmptyState
title="You haven't configured integrations"
description="Configure GitHub and other integrations to sync your project issues."
image={emptyIntegration}
primaryButton={{
text: "Configure now",
onClick: () => router.push(`/${workspaceSlug}/settings/integrations`),
}}
/>
)
) : (
<Loader className="space-y-5">
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
</Loader>
)}
<Loader className="space-y-5">
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
</Loader>
)}
</div>
</div>
</ProjectAuthorizationWrapper>
);

View file

@ -113,11 +113,11 @@ const LabelsSettings: NextPage = () => {
</Breadcrumbs>
}
>
<div className="flex flex-row gap-2 h-full w-full">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<section className="pr-9 py-8 gap-10 h-full w-full">
<section className="pr-9 py-8 gap-10 w-full overflow-y-auto">
<div className="flex items-center justify-between pt-2 pb-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">Labels</h3>

View file

@ -273,11 +273,11 @@ const MembersSettings: NextPage = () => {
user={user}
onSuccess={() => mutateMembers()}
/>
<div className="flex flex-row gap-2">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<section className="pr-9 py-8 w-full">
<section className="pr-9 py-8 w-full overflow-y-auto">
<div className="flex items-center py-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">Defaults</h3>
</div>

View file

@ -73,11 +73,11 @@ const StatesSettings: NextPage = () => {
</Breadcrumbs>
}
>
<div className="flex flex-row gap-2">
<div className="w-80 py-8">
<div className="flex flex-row gap-2 h-full">
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
<SettingsSidebar />
</div>
<div className="pr-9 py-8 gap-10 w-full">
<div className="pr-9 py-8 gap-10 w-full overflow-y-auto">
<div className="flex items-center py-3.5 border-b border-custom-border-200">
<h3 className="text-xl font-medium">States</h3>
</div>