-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3886 from signalco-io/feat/doprocess/runs-empty-p…
…laceholder feat(doprocess): Runs list empty placeholder with CTA
- Loading branch information
Showing
25 changed files
with
105 additions
and
70 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
web/apps/doprocess.app/app/(embedded)/processes/[id]/embedded/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/apps/doprocess.app/app/(embedded)/processes/[id]/runs/[runId]/embedded/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/apps/doprocess.app/app/(rest)/(app)/processes/[id]/runs/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...p/components/processes/ProcessDetails.tsx → ...ts/processes/processes/ProcessDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...omponents/processes/ProcessesListItem.tsx → ...processes/processes/ProcessesListItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...omponents/processes/ProcessesListView.tsx → ...processes/processes/ProcessesListView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
web/apps/doprocess.app/components/processes/processes/RunsList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use client'; | ||
|
||
import { Play } from '@signalco/ui-icons'; | ||
import { Typography } from '@signalco/ui/dist/Typography'; | ||
import { Stack } from '@signalco/ui/dist/Stack'; | ||
import { NavigatingButton } from '@signalco/ui/dist/NavigatingButton'; | ||
import { List } from '../../shared/List'; | ||
import { KnownPages } from '../../../src/knownPages'; | ||
import { useProcessRuns } from '../../../src/hooks/useProcessRuns'; | ||
import { useProcessesRuns } from '../../../src/hooks/useProcessesRuns'; | ||
import { RunsListItem } from './RunsListItem'; | ||
import { ProcessRunCreateForm } from './ProcessRunCreateForm'; | ||
|
||
function RunsListEmptyPlaceholder() { | ||
return ( | ||
<Stack spacing={4} alignItems="center" className="px-4 py-12 text-center sm:py-24 md:py-40 lg:py-60"> | ||
<Play size={64} className="opacity-60" /> | ||
<Stack spacing={2}> | ||
<Typography level="h4" secondary>No runs</Typography> | ||
<Typography secondary>You do not have any process runs yet. You can start by creating a process.</Typography> | ||
</Stack> | ||
<NavigatingButton href={KnownPages.Processes}>Processes</NavigatingButton> | ||
</Stack> | ||
); | ||
} | ||
|
||
export function RunsList({ processId }: { processId?: string }) { | ||
const processRuns = useProcessRuns(processId); | ||
const processesRuns = useProcessesRuns(!processId); | ||
|
||
return ( | ||
<List | ||
query={() => processId ? processRuns : processesRuns} | ||
itemRender={(item) => (<RunsListItem run={item} />)} | ||
editable={Boolean(processId)} | ||
itemCreateLabel="New process run" | ||
createForm={processId ? <ProcessRunCreateForm processId={processId} redirect /> : undefined} | ||
emptyPlaceholder={<RunsListEmptyPlaceholder />} | ||
/> | ||
); | ||
} |
6 changes: 3 additions & 3 deletions
6
...app/components/processes/RunsListItem.tsx → ...ents/processes/processes/RunsListItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters