Skip to content

Commit f4fe19a

Browse files
45762 refactor(workflows): Update export tooltip identifiers and localization
- Changed tooltip identifiers in `WorkflowsTableActions` for clarity and consistency. - Removed outdated tooltip messages from localization files. - Updated export button to include a disabled state based on export conditions.
1 parent 80eee3f commit f4fe19a

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

frontend/src/public/components/Workflows/WorkflowsTablePage/WorkflowsTable/WorkflowsTableActions.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,28 @@ export function WorkflowsTableActions({
8181
...(isMobile
8282
? {
8383
'aria-label': formatMessage({
84-
id: isExporting ? 'workflows.export-loading' : 'workflows.export-menu',
84+
id: isExporting ? 'workflows.export-loading' : 'workflows.export-menu-aria',
8585
}),
8686
}
8787
: {}),
8888
}}
8989
options={exportDropdownOptions}
9090
renderToggle={() => (
91-
<Button
92-
className={styles['tune-view-button']}
93-
buttonStyle="transparent-black"
94-
size="sm"
95-
icon={DownloadIcon}
91+
<Button
92+
className={styles['tune-view-button']}
93+
buttonStyle="transparent-black"
94+
size="sm"
95+
icon={DownloadIcon}
9696
label={exportButtonLabel}
97+
disabled={isExportDisabled}
9798
/>
9899
)}
99100
/>
100101
);
101102

102103
const exportTooltipContentId = isExporting
103104
? 'workflows.export-loading'
104-
: 'workflows.export-excel-tooltip';
105+
: 'workflows.export-tooltip';
105106

106107
return (
107108
<div
@@ -132,7 +133,7 @@ export function WorkflowsTableActions({
132133
</Tooltip>
133134
) : (
134135
<Tooltip
135-
content={formatMessage({ id: 'workflows.export-excel-tooltip-all' })}
136+
content={formatMessage({ id: 'workflows.export-tooltip-all' })}
136137
appendTo={() => document.body}
137138
zIndex={1040}
138139
contentClassName={styles['workflow-tune-view-tooltip']}

frontend/src/public/lang/locales/en_US.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,6 @@ export const enMessages = {
929929
'workflows.export-tooltip-all': 'Export all workflows matching current filters',
930930
'workflows.export-excel': 'Export Excel',
931931
'workflows.export-excel-loading': 'Exporting…',
932-
'workflows.export-excel-tooltip': 'Load workflows first to export',
933-
'workflows.export-excel-tooltip-all': 'Export all workflows matching current filters to Excel',
934932
'workflows.export-excel-fail': 'Failed to export workflows',
935933
'workflows.export-excel-empty-title': 'No workflows to export',
936934
'workflows.export-excel-empty-message': 'No workflows match the current filters.',

frontend/src/public/lang/locales/ru_RU.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,6 @@ export const ruMessages = {
863863
'workflows.export-tooltip-all': 'Экспорт всех процессов по текущим фильтрам',
864864
'workflows.export-excel': 'Экспорт в Excel',
865865
'workflows.export-excel-loading': 'Экспорт…',
866-
'workflows.export-excel-tooltip': 'Загрузите процессы для экспорта',
867-
'workflows.export-excel-tooltip-all': 'Экспорт всех процессов по текущим фильтрам в Excel',
868866
'workflows.export-excel-fail': 'Не удалось экспортировать процессы',
869867
'workflows.export-excel-empty-title': 'Нет процессов для экспорта',
870868
'workflows.export-excel-empty-message': 'По текущим фильтрам процессы не найдены.',

0 commit comments

Comments
 (0)