-
Notifications
You must be signed in to change notification settings - Fork 124
feat: History V2 - event details with summary #1104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
adhityamamallan
merged 11 commits into
cadence-workflow:master
from
adhityamamallan:history-details-with-summary
Dec 5, 2025
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
be1c23f
Copy utils from v1 to v2
adhityamamallan 441ca78
Add JSON component and allow custom components for panels
adhityamamallan d21c7b3
add changes
adhityamamallan 6674cb3
Add incomplete implementation of panel details entry, without styles
adhityamamallan 0d71532
More changes
adhityamamallan e3b78b6
Add unit tests and isolate prop types
adhityamamallan 10114a6
address copilot comment
adhityamamallan d6d8c9a
update test
adhityamamallan 0e28730
address comments
adhityamamallan 409bdaf
remove workflowTab from params in v1 component
adhityamamallan 833daa1
address copilot comments
adhityamamallan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
More changes
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
- Loading branch information
commit 0d7153299dd8632422995541b6d1ea6a67cabef8
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,33 @@ | ||
| import { styled as createStyled, type Theme } from 'baseui'; | ||
|
|
||
| export const styled = { | ||
| PanelContainer: createStyled<'div', { $isNegative?: boolean }>( | ||
| 'div', | ||
| ({ $theme, $isNegative }: { $theme: Theme; $isNegative?: boolean }) => ({ | ||
| padding: $theme.sizing.scale600, | ||
| backgroundColor: $isNegative | ||
| ? $theme.colors.backgroundNegativeLight | ||
| : $theme.colors.backgroundSecondary, | ||
| borderRadius: $theme.borders.radius300, | ||
| height: '100%', | ||
| }) | ||
| ), | ||
| PanelLabel: createStyled<'div', { $isNegative?: boolean }>( | ||
| 'div', | ||
| ({ $theme, $isNegative }: { $theme: Theme; $isNegative?: boolean }) => ({ | ||
| color: $isNegative | ||
| ? $theme.colors.contentNegative | ||
| : $theme.colors.contentPrimary, | ||
| ...$theme.typography.LabelSmall, | ||
| }) | ||
| ), | ||
| PanelValue: createStyled<'div', { $isNegative?: boolean }>( | ||
| 'div', | ||
| ({ $theme, $isNegative }: { $theme: Theme; $isNegative?: boolean }) => ({ | ||
| padding: `${$theme.sizing.scale500} 0`, | ||
| color: $isNegative | ||
| ? $theme.colors.contentNegative | ||
| : $theme.colors.contentPrimary, | ||
| }) | ||
| ), | ||
| }; |
47 changes: 33 additions & 14 deletions
47
...-history-v2/workflow-history-panel-details-entry/workflow-history-panel-details-entry.tsx
This file contains hidden or 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 |
|---|---|---|
| @@ -1,26 +1,45 @@ | ||
| import WorkflowHistoryEventDetailsGroup from '@/views/workflow-history/workflow-history-event-details-group/workflow-history-event-details-group'; | ||
|
|
||
| import { styled } from './workflow-history-panel-details-entry.styles'; | ||
| import { type Props } from './workflow-history-panel-details-entry.types'; | ||
|
|
||
| export default function WorkflowHistoryPanelDetailsEntry({ | ||
| entryKey, | ||
| entryPath, | ||
| entryValue, | ||
| renderConfig, | ||
| isNegative, | ||
| ...decodedPageUrlParams | ||
| detail, | ||
| ...workflowPageParams | ||
| }: Props) { | ||
| const ValueComponent = renderConfig?.valueComponent; | ||
| const ValueComponent = detail.renderConfig?.valueComponent; | ||
|
|
||
| if (ValueComponent !== undefined) { | ||
| if (ValueComponent !== undefined && !detail.isGroup) { | ||
| return ( | ||
| <ValueComponent | ||
| entryKey={entryKey} | ||
| entryPath={entryPath} | ||
| entryValue={entryValue} | ||
| isNegative={isNegative} | ||
| {...decodedPageUrlParams} | ||
| entryKey={detail.key} | ||
| entryPath={detail.path} | ||
| entryValue={detail.value} | ||
| isNegative={detail.isNegative} | ||
| {...workflowPageParams} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| return String(entryValue); | ||
| return ( | ||
| <styled.PanelContainer $isNegative={detail.isNegative}> | ||
| <styled.PanelLabel $isNegative={detail.isNegative}> | ||
| {detail.path} | ||
| </styled.PanelLabel> | ||
| <styled.PanelValue $isNegative={detail.isNegative}> | ||
| {detail.isGroup ? ( | ||
| <WorkflowHistoryEventDetailsGroup | ||
| entries={detail.groupEntries} | ||
| parentGroupPath={detail.path} | ||
| decodedPageUrlParams={{ | ||
| ...workflowPageParams, | ||
| workflowTab: 'history', | ||
adhityamamallan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }} | ||
| /> | ||
| ) : ( | ||
| detail.value | ||
| )} | ||
| </styled.PanelValue> | ||
| </styled.PanelContainer> | ||
| ); | ||
| } | ||
12 changes: 7 additions & 5 deletions
12
...ory-v2/workflow-history-panel-details-entry/workflow-history-panel-details-entry.types.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| import { type WorkflowPageParams } from '@/views/workflow-page/workflow-page.types'; | ||
|
|
||
| import { | ||
| type EventDetailsConfig, | ||
| type EventDetailsValueComponentProps, | ||
| type EventDetailsGroupEntry, | ||
| type EventDetailsSingleEntry, | ||
| } from '../workflow-history-event-details/workflow-history-event-details.types'; | ||
|
|
||
| export type Props = EventDetailsValueComponentProps & { | ||
| renderConfig: EventDetailsConfig | null; | ||
| }; | ||
| export type Props = { | ||
| detail: EventDetailsSingleEntry | EventDetailsGroupEntry; | ||
| } & WorkflowPageParams; |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.