-
Notifications
You must be signed in to change notification settings - Fork 68
commit visualization in commit details page #254
commit visualization in commit details page #254
Conversation
@Ranelim @andrew-ronaldson let's update the icons as part of this PR? |
@MariaLeonova If it is not a patternfly icons, you can provide me in SVG format. |
@karthikjeeyar this one is for pipelines (attached) this one is for Environments Octokitty can stay the same. Thank you! |
@karthikjeeyar I have added the pipeline SVG as part of #248 |
daa9ca6
to
28cca67
Compare
Rebased, Updated Icons and fixed the size issues in other visualisations. |
28cca67
to
a96898b
Compare
if (fitToScreen) { | ||
controller.getGraph().fit(90); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see fitToScreen
being used by any caller of this function.
Furthermore if fitToScreen
changes, this effect does a whole lot more than what's needed to fit to screen.
If you still need this prop, move this to a separate effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it as it is not used in other graphs
export const commitComponentFactory: ComponentFactory = (kind: ModelKind, type: string) => { | ||
switch (kind) { | ||
case ModelKind.graph: | ||
return withPanZoom()(GraphComponent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pan zoom is fine for now until UX gives a final decision if this needs to be removed in lieu of scroll bars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent with the application overview graph. Whichever way is finally decided, these should be made consistent.
: (resources as []).filter((r) => { | ||
return !get(r, runAfterResourceKey); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r
is of type never
here.
Avoid casting []
by doing proper checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typescript throws an error when we use Union of array types for methods like filter(), find(), every() and there is an open issue on Typescript to provide a fix for this. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's too bad :(
Ok work around is fine for now. Thanks!
(bp) => bp.metadata.labels[PipelineRunLabel.COMMIT_COMPONENT_LABEL], | ||
); | ||
|
||
const commitWorkflowData: { [key: string]: any } = components.reduce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's opportunity to memoize some values here such that we don't need to recompute everything if only a single value changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, it's something that can be improved on in future PRs and not needed right away.
188a7e5
to
78e758c
Compare
78e758c
to
24e0fcf
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #254 +/- ##
==========================================
+ Coverage 73.27% 73.74% +0.47%
==========================================
Files 421 426 +5
Lines 8651 8933 +282
Branches 2253 2366 +113
==========================================
+ Hits 6339 6588 +249
- Misses 2180 2211 +31
- Partials 132 134 +2
Continue to review full report at Codecov.
|
5b29354
to
252ca84
Compare
layoutFactory={layoutFactory} | ||
model={model} | ||
fullHeight | ||
controlBar={(controller) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a bit odd that the commits overview graph has the control bar whereas the application overview graph does not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, waiting on UX for final update on this and pan zoom feature as well.
import { layoutFactory, PipelineLayout, VisualizationFactory } from '../../../topology/factories'; | ||
// | ||
import './CommitVisualization.scss'; | ||
import { commitComponentFactory } from './CommitComponentFactory'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder why the linter didn't pickup the import order here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it.
252ca84
to
2ecf156
Compare
/retest |
8eb9afc
to
f949036
Compare
/retest |
f949036
to
b551da6
Compare
@karthikjeeyar: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, jeff-phillips-18, karthikjeeyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes
https://issues.redhat.com/browse/HACBS-826
Description
Adds commit visualization in commit details page.
Type of change
Screen shots / Gifs for design review
How to test or reproduce?
Yamls to create test setup:
Test and Environments are here - https://gist.github.com/karthikjeeyar/ce5a1038209565e5ecf0f3a9719609be
Release Setup yamls - https://github.com/karthikjeeyar/hacbs-demos/tree/main/m7/release