style: fix all empty states size of inconsistency. (#4613)

This commit is contained in:
Prateek Shourya 2024-05-28 11:49:14 +05:30 committed by GitHub
parent 05807fe123
commit c9586bfdcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 8 deletions

View File

@ -68,7 +68,6 @@ export const CycleEmptyState: React.FC<Props> = observer((props) => {
? EmptyStateType.PROJECT_EMPTY_FILTER ? EmptyStateType.PROJECT_EMPTY_FILTER
: EmptyStateType.PROJECT_CYCLE_NO_ISSUES; : EmptyStateType.PROJECT_CYCLE_NO_ISSUES;
const additionalPath = isCompletedAndEmpty ? undefined : activeLayout ?? "list"; const additionalPath = isCompletedAndEmpty ? undefined : activeLayout ?? "list";
const emptyStateSize = isEmptyFilters ? "lg" : "sm";
return ( return (
<> <>
@ -84,7 +83,6 @@ export const CycleEmptyState: React.FC<Props> = observer((props) => {
<EmptyState <EmptyState
type={emptyStateType} type={emptyStateType}
additionalPath={additionalPath} additionalPath={additionalPath}
size={emptyStateSize}
primaryButtonOnClick={ primaryButtonOnClick={
!isCompletedAndEmpty && !isEmptyFilters !isCompletedAndEmpty && !isEmptyFilters
? () => { ? () => {

View File

@ -41,14 +41,12 @@ export const ProjectDraftEmptyState: React.FC = observer(() => {
const emptyStateType = const emptyStateType =
issueFilterCount > 0 ? EmptyStateType.PROJECT_DRAFT_EMPTY_FILTER : EmptyStateType.PROJECT_DRAFT_NO_ISSUES; issueFilterCount > 0 ? EmptyStateType.PROJECT_DRAFT_EMPTY_FILTER : EmptyStateType.PROJECT_DRAFT_NO_ISSUES;
const additionalPath = issueFilterCount > 0 ? activeLayout ?? "list" : undefined; const additionalPath = issueFilterCount > 0 ? activeLayout ?? "list" : undefined;
const emptyStateSize = issueFilterCount > 0 ? "lg" : "sm";
return ( return (
<div className="relative h-full w-full overflow-y-auto"> <div className="relative h-full w-full overflow-y-auto">
<EmptyState <EmptyState
type={emptyStateType} type={emptyStateType}
additionalPath={additionalPath} additionalPath={additionalPath}
size={emptyStateSize}
secondaryButtonOnClick={issueFilterCount > 0 ? handleClearAllFilters : undefined} secondaryButtonOnClick={issueFilterCount > 0 ? handleClearAllFilters : undefined}
/> />
</div> </div>

View File

@ -43,14 +43,12 @@ export const ProjectEmptyState: React.FC = observer(() => {
const emptyStateType = issueFilterCount > 0 ? EmptyStateType.PROJECT_EMPTY_FILTER : EmptyStateType.PROJECT_NO_ISSUES; const emptyStateType = issueFilterCount > 0 ? EmptyStateType.PROJECT_EMPTY_FILTER : EmptyStateType.PROJECT_NO_ISSUES;
const additionalPath = issueFilterCount > 0 ? activeLayout ?? "list" : undefined; const additionalPath = issueFilterCount > 0 ? activeLayout ?? "list" : undefined;
const emptyStateSize = issueFilterCount > 0 ? "lg" : "sm";
return ( return (
<div className="relative h-full w-full overflow-y-auto"> <div className="relative h-full w-full overflow-y-auto">
<EmptyState <EmptyState
type={emptyStateType} type={emptyStateType}
additionalPath={additionalPath} additionalPath={additionalPath}
size={emptyStateSize}
primaryButtonOnClick={ primaryButtonOnClick={
issueFilterCount > 0 issueFilterCount > 0
? undefined ? undefined

View File

@ -154,12 +154,11 @@ export const AllIssueLayoutRoot: React.FC = observer(() => {
return ( return (
<div className="relative flex h-full w-full flex-col overflow-hidden"> <div className="relative flex h-full w-full flex-col overflow-hidden">
<div className="relative flex h-full w-full flex-col"> <div className="relative flex h-full w-full flex-col overflow-auto">
<GlobalViewsAppliedFiltersRoot globalViewId={globalViewId} /> <GlobalViewsAppliedFiltersRoot globalViewId={globalViewId} />
{issueIds.length === 0 ? ( {issueIds.length === 0 ? (
<EmptyState <EmptyState
type={emptyStateType as keyof typeof EMPTY_STATE_DETAILS} type={emptyStateType as keyof typeof EMPTY_STATE_DETAILS}
size="sm"
primaryButtonOnClick={ primaryButtonOnClick={
(workspaceProjectIds ?? []).length > 0 (workspaceProjectIds ?? []).length > 0
? currentView !== "custom-view" && currentView !== "subscribed" ? currentView !== "custom-view" && currentView !== "subscribed"