Fix active navigation tab + quick workflows fixes (#8567)
- Active navigation tab hovered in show page
- remove timeline tab + rename workflow tab
- remove {{variable}} placeholder
- fix margin
- Workflow Runs and Versions show page title
<img width="807" alt="Capture d’écran 2024-11-18 à 18 23 12"
src="https://github.com/user-attachments/assets/688dfc67-362e-4f04-b436-3ff94d7e3e4a">
This commit is contained in:
@ -39,7 +39,10 @@ export const NavigationDrawerItemForObjectMetadataItem = ({
|
|||||||
viewId ? `?view=${viewId}` : ''
|
viewId ? `?view=${viewId}` : ''
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
const isActive = currentPath === `/objects/${objectMetadataItem.namePlural}`;
|
const isActive =
|
||||||
|
currentPath === `/objects/${objectMetadataItem.namePlural}` ||
|
||||||
|
currentPath.includes(`object/${objectMetadataItem.nameSingular}/`);
|
||||||
|
|
||||||
const shouldSubItemsBeDisplayed = isActive && objectMetadataViews.length > 1;
|
const shouldSubItemsBeDisplayed = isActive && objectMetadataViews.length > 1;
|
||||||
|
|
||||||
const sortedObjectMetadataViews = [...objectMetadataViews].sort(
|
const sortedObjectMetadataViews = [...objectMetadataViews].sort(
|
||||||
|
|||||||
@ -14,17 +14,22 @@ export const NavigationDrawerOpenedSection = () => {
|
|||||||
|
|
||||||
const loading = useIsPrefetchLoading();
|
const loading = useIsPrefetchLoading();
|
||||||
|
|
||||||
const currentObjectNamePlural = useParams().objectNamePlural;
|
|
||||||
|
|
||||||
const { activeObjectMetadataItems: workspaceFavoritesObjectMetadataItems } =
|
const { activeObjectMetadataItems: workspaceFavoritesObjectMetadataItems } =
|
||||||
useFilteredObjectMetadataItemsForWorkspaceFavorites();
|
useFilteredObjectMetadataItemsForWorkspaceFavorites();
|
||||||
|
|
||||||
if (!currentObjectNamePlural) {
|
const {
|
||||||
|
objectNamePlural: currentObjectNamePlural,
|
||||||
|
objectNameSingular: currentObjectNameSingular,
|
||||||
|
} = useParams();
|
||||||
|
|
||||||
|
if (!currentObjectNamePlural && !currentObjectNameSingular) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const objectMetadataItem = filteredActiveObjectMetadataItems.find(
|
const objectMetadataItem = filteredActiveObjectMetadataItems.find(
|
||||||
(item) => item.namePlural === currentObjectNamePlural,
|
(item) =>
|
||||||
|
item.namePlural === currentObjectNamePlural ||
|
||||||
|
item.nameSingular === currentObjectNameSingular,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!objectMetadataItem) {
|
if (!objectMetadataItem) {
|
||||||
|
|||||||
@ -21,7 +21,6 @@ const StyledObjectsMetaDataItemsWrapper = styled.div`
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: ${({ theme }) => theme.betweenSiblingsGap};
|
gap: ${({ theme }) => theme.betweenSiblingsGap};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: ${({ theme }) => theme.spacing(3)};
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
`;
|
`;
|
||||||
|
|||||||
@ -131,7 +131,7 @@ export const useRecordShowContainerTabs = (
|
|||||||
},
|
},
|
||||||
[CoreObjectNameSingular.Workflow]: {
|
[CoreObjectNameSingular.Workflow]: {
|
||||||
workflow: {
|
workflow: {
|
||||||
title: 'Workflow',
|
title: 'Flow',
|
||||||
position: 0,
|
position: 0,
|
||||||
Icon: IconSettings,
|
Icon: IconSettings,
|
||||||
cards: [{ type: CardType.WorkflowCard }],
|
cards: [{ type: CardType.WorkflowCard }],
|
||||||
@ -144,6 +144,7 @@ export const useRecordShowContainerTabs = (
|
|||||||
ifRelationsMissing: [],
|
ifRelationsMissing: [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
timeline: null,
|
||||||
},
|
},
|
||||||
[CoreObjectNameSingular.WorkflowVersion]: {
|
[CoreObjectNameSingular.WorkflowVersion]: {
|
||||||
workflowVersion: {
|
workflowVersion: {
|
||||||
@ -160,6 +161,7 @@ export const useRecordShowContainerTabs = (
|
|||||||
ifRelationsMissing: [],
|
ifRelationsMissing: [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
timeline: null,
|
||||||
},
|
},
|
||||||
[CoreObjectNameSingular.WorkflowRun]: {
|
[CoreObjectNameSingular.WorkflowRun]: {
|
||||||
workflowRunOutput: {
|
workflowRunOutput: {
|
||||||
@ -190,6 +192,7 @@ export const useRecordShowContainerTabs = (
|
|||||||
ifRelationsMissing: [],
|
ifRelationsMissing: [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
timeline: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,7 @@ export const useRecordShowPagePagination = (
|
|||||||
|
|
||||||
const rankFoundInFiew = rankInView > -1;
|
const rankFoundInFiew = rankInView > -1;
|
||||||
|
|
||||||
const objectLabel = capitalize(objectMetadataItem.namePlural);
|
const objectLabel = capitalize(objectMetadataItem.labelPlural);
|
||||||
|
|
||||||
const totalCount = Math.max(1, totalCountBefore, totalCountAfter);
|
const totalCount = Math.max(1, totalCountBefore, totalCountAfter);
|
||||||
|
|
||||||
|
|||||||
@ -204,7 +204,7 @@ export const WorkflowEditActionFormSendEmail = ({
|
|||||||
<VariableTagInput
|
<VariableTagInput
|
||||||
inputId="email-input"
|
inputId="email-input"
|
||||||
label="Email"
|
label="Email"
|
||||||
placeholder="Enter receiver email (use {{variable}} for dynamic content)"
|
placeholder="Enter receiver email"
|
||||||
value={field.value}
|
value={field.value}
|
||||||
onChange={(email) => {
|
onChange={(email) => {
|
||||||
field.onChange(email);
|
field.onChange(email);
|
||||||
@ -220,7 +220,7 @@ export const WorkflowEditActionFormSendEmail = ({
|
|||||||
<VariableTagInput
|
<VariableTagInput
|
||||||
inputId="email-subject-input"
|
inputId="email-subject-input"
|
||||||
label="Subject"
|
label="Subject"
|
||||||
placeholder="Enter email subject (use {{variable}} for dynamic content)"
|
placeholder="Enter email subject"
|
||||||
value={field.value}
|
value={field.value}
|
||||||
onChange={(email) => {
|
onChange={(email) => {
|
||||||
field.onChange(email);
|
field.onChange(email);
|
||||||
@ -236,7 +236,7 @@ export const WorkflowEditActionFormSendEmail = ({
|
|||||||
<VariableTagInput
|
<VariableTagInput
|
||||||
inputId="email-body-input"
|
inputId="email-body-input"
|
||||||
label="Body"
|
label="Body"
|
||||||
placeholder="Enter email body (use {{variable}} for dynamic content)"
|
placeholder="Enter email body"
|
||||||
value={field.value}
|
value={field.value}
|
||||||
onChange={(email) => {
|
onChange={(email) => {
|
||||||
field.onChange(email);
|
field.onChange(email);
|
||||||
|
|||||||
@ -187,7 +187,7 @@ export const WorkflowEditActionFormServerlessFunction = ({
|
|||||||
key={pathKey}
|
key={pathKey}
|
||||||
inputId={`input-${inputKey}`}
|
inputId={`input-${inputKey}`}
|
||||||
label={inputKey}
|
label={inputKey}
|
||||||
placeholder="Enter value (use {{variable}} for dynamic content)"
|
placeholder="Enter value"
|
||||||
value={`${inputValue || ''}`}
|
value={`${inputValue || ''}`}
|
||||||
onChange={(value) => handleInputChange(value, currentPath)}
|
onChange={(value) => handleInputChange(value, currentPath)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user