Remove "When no records are selected" actions on record page ⌘O (#8575)
Closes #8566 - Introduce the concept of scope for an ActionMenuEntry, scope is either `global` or `record-selection`
This commit is contained in:
@ -30,6 +30,7 @@ export const WorkflowRunActionEffect = () => {
|
||||
addActionMenuEntry({
|
||||
type: 'workflow-run',
|
||||
key: `workflow-run-${activeWorkflowVersion.id}`,
|
||||
scope: 'global',
|
||||
label: capitalize(activeWorkflowVersion.workflow.name),
|
||||
position: index,
|
||||
Icon: IconSettingsAutomation,
|
||||
|
||||
@ -106,6 +106,7 @@ export const DeleteRecordsActionEffect = ({
|
||||
if (canDelete) {
|
||||
addActionMenuEntry({
|
||||
type: 'standard',
|
||||
scope: 'record-selection',
|
||||
key: 'delete',
|
||||
label: 'Delete',
|
||||
position,
|
||||
|
||||
@ -32,6 +32,7 @@ export const ExportRecordsActionEffect = ({
|
||||
useEffect(() => {
|
||||
addActionMenuEntry({
|
||||
type: 'standard',
|
||||
scope: 'record-selection',
|
||||
key: 'export',
|
||||
position,
|
||||
label: displayedExportProgress(
|
||||
|
||||
@ -51,6 +51,7 @@ export const ManageFavoritesActionEffect = ({
|
||||
|
||||
addActionMenuEntry({
|
||||
type: 'standard',
|
||||
scope: 'record-selection',
|
||||
key: 'manage-favorites',
|
||||
label: isFavorite ? 'Remove from favorites' : 'Add to favorites',
|
||||
position,
|
||||
|
||||
@ -57,6 +57,7 @@ export const WorkflowRunRecordActionEffect = ({
|
||||
addActionMenuEntry({
|
||||
type: 'workflow-run',
|
||||
key: `workflow-run-${activeWorkflowVersion.id}`,
|
||||
scope: 'record-selection',
|
||||
label: capitalize(activeWorkflowVersion.workflow.name),
|
||||
position: index,
|
||||
Icon: IconSettingsAutomation,
|
||||
|
||||
Reference in New Issue
Block a user