Skip to content

Commit adeedf1

Browse files
authored
chore: link to executions page from editor and remove announcement modal (#1255)
## Changes - Show executions icon button on top of editor <img width="892" height="75" alt="image" src="https://github.com/user-attachments/assets/a6fc6eb4-8dc3-4117-ad23-3a119b08597f" /> - Remove announcement modal about UI refresh
1 parent 465972b commit adeedf1

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

packages/frontend/src/components/EditorLayout/EditorToolbar.tsx

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IFlow } from '@plumber/types'
22

3-
import { BiCog, BiInfoCircle } from 'react-icons/bi'
3+
import { BiCog, BiHistory, BiInfoCircle } from 'react-icons/bi'
44
import { HiOutlineDotsVertical } from 'react-icons/hi'
55
import { Link } from 'react-router-dom'
66
import { Hide, HStack, MenuButton, MenuList, Show } from '@chakra-ui/react'
@@ -101,6 +101,45 @@ const SettingsItem = ({
101101
)
102102
}
103103

104+
const ExecutionsItem = ({
105+
flowId,
106+
type,
107+
}: {
108+
flowId: string
109+
type: 'icon' | 'button'
110+
}) => {
111+
if (type === 'button') {
112+
return (
113+
<Button
114+
variant="clear"
115+
aria-label="executions"
116+
colorScheme="secondary"
117+
as={Link}
118+
to={URLS.EXECUTIONS_FOR_FLOW(flowId)}
119+
w="100%"
120+
>
121+
Executions
122+
</Button>
123+
)
124+
}
125+
return (
126+
<TouchableTooltip label="Executions" aria-label="executions-tooltip">
127+
<IconButton
128+
as={Link}
129+
to={URLS.EXECUTIONS_FOR_FLOW(flowId)}
130+
variant="clear"
131+
aria-label="executions"
132+
_hover={{
133+
color: 'primary.500',
134+
bg: 'interaction.muted.main.hover',
135+
}}
136+
icon={<BiHistory />}
137+
colorScheme="secondary"
138+
/>
139+
</TouchableTooltip>
140+
)
141+
}
142+
104143
interface EditorToolbarProps {
105144
flowId: string
106145
flow: IFlow
@@ -119,6 +158,7 @@ export default function EditorToolbar(props: EditorToolbarProps) {
119158
<>
120159
<Show above="md">
121160
<HStack>
161+
<ExecutionsItem {...props} type="icon" />
122162
<GuideItem type="icon" />
123163
<SettingsItem {...props} type="icon" />
124164
<PublishButton {...props} />
@@ -140,6 +180,7 @@ export default function EditorToolbar(props: EditorToolbarProps) {
140180
gap={2}
141181
px={2}
142182
>
183+
<ExecutionsItem {...props} type="button" />
143184
<GuideItem type="button" />
144185
<SettingsItem {...props} type="button" />
145186
<PublishButton {...props} />

packages/frontend/src/components/EditorLayout/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ export default function EditorLayout() {
279279
handleUnpublish={() => onFlowStatusUpdate(!flow.active)}
280280
/>
281281

282-
{shouldOpenAnnouncementModal && (
282+
{/* hardcoded to false to always hide announcement modal for now*/}
283+
{shouldOpenAnnouncementModal && false && (
283284
<AnnouncementModal
284285
isOpen={shouldOpenAnnouncementModal}
285286
onClose={handleCloseAnnouncementModal}

0 commit comments

Comments
 (0)