File tree Expand file tree Collapse file tree 4 files changed +50
-18
lines changed
pipeline-console-view/pipeline-console/main/components Expand file tree Collapse file tree 4 files changed +50
-18
lines changed Original file line number Diff line number Diff line change 1414 & --left {
1515 --additional-height : 0px ;
1616 position : sticky ;
17- margin-bottom : 0 ;
1817 top : calc (var (--header-height ) + var (--section-padding ));
1918 height : calc (
2019 (100vh + min (var (--additional-height ), var (--section-padding ))) -
2120 (var (--header-height ) + 60px + var (--section-padding ))
2221 );
2322 }
2423
24+ & --dialog {
25+ position : fixed ;
26+ inset : 0 !important ;
27+ z-index : 30000 ;
28+ border-radius : 0 ;
29+ border : none ;
30+ height : unset ;
31+
32+ .test-floaty-material {
33+ margin : 1rem ;
34+ color : var (--text-color );
35+ }
36+ }
37+
2538 & __heading {
2639 padding : 0 0.55rem ;
2740 bottom : unset !important ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default function Stages({
1919 stageViewPosition,
2020 onStageSelect,
2121} : StagesProps ) {
22+ const [ isExpanded , setIsExpanded ] = useState ( false ) ;
2223 const [ sidebarHeight , setSidebarHeight ] = useState ( 0 ) ;
2324
2425 useEffect ( ( ) => {
@@ -41,6 +42,7 @@ export default function Stages({
4142 className = { classNames ( "pgv-graph-view-thing" , {
4243 "pgv-graph-view-thing--left" :
4344 stageViewPosition === StageViewPosition . LEFT ,
45+ "pgv-graph-view-thing--dialog" : isExpanded
4446 } ) }
4547 style = { { "--additional-height" : sidebarHeight + "px" } as CSSProperties }
4648 >
@@ -51,22 +53,40 @@ export default function Stages({
5153 < Tooltip content = { "Expand" } >
5254 < button
5355 className = { "jenkins-button jenkins-button--tertiary" }
54- onClick = { ( ) => alert ( "This will expand" ) }
56+ onClick = { ( ) => setIsExpanded ( ! isExpanded ) }
5557 >
56- < svg
57- width = "20"
58- height = "20"
59- viewBox = "0 0 20 20"
60- fill = "none"
61- xmlns = "http://www.w3.org/2000/svg"
62- >
63- < path
64- d = "M10 4H15C15.5523 4 16 4.44772 16 5V10M10 16H5C4.44772 16 4 15.5523 4 15V10"
65- stroke = "currentColor"
66- strokeWidth = "1.5"
67- strokeLinecap = "round"
68- />
69- </ svg >
58+ { isExpanded && (
59+ < svg
60+ width = "20"
61+ height = "20"
62+ viewBox = "0 0 20 20"
63+ fill = "none"
64+ xmlns = "http://www.w3.org/2000/svg"
65+ >
66+ < path
67+ d = "M10 4H15C15.5523 4 16 4.44772 16 5V10M10 16H5C4.44772 16 4 15.5523 4 15V10"
68+ stroke = "red"
69+ strokeWidth = "1.5"
70+ strokeLinecap = "round"
71+ />
72+ </ svg >
73+ ) }
74+ { ! isExpanded && (
75+ < svg
76+ width = "20"
77+ height = "20"
78+ viewBox = "0 0 20 20"
79+ fill = "none"
80+ xmlns = "http://www.w3.org/2000/svg"
81+ >
82+ < path
83+ d = "M10 4H15C15.5523 4 16 4.44772 16 5V10M10 16H5C4.44772 16 4 15.5523 4 15V10"
84+ stroke = "currentColor"
85+ strokeWidth = "1.5"
86+ strokeLinecap = "round"
87+ />
88+ </ svg >
89+ ) }
7090 </ button >
7191 </ Tooltip >
7292 </ div >
Original file line number Diff line number Diff line change 1515 width : 2rem ;
1616 min-height : 2rem ;
1717 border-radius : 0.35rem ;
18+ color : inherit !important ;
1819
1920 & ::before {
2021 border : none ;
2324 svg {
2425 width : 1rem ;
2526 height : 1rem ;
26- color : var (--text-color-secondary );
2727 }
2828
2929 & :not (:disabled ) {
Original file line number Diff line number Diff line change @@ -164,7 +164,6 @@ export function PipelineGraph(props: Props) {
164164interface Props {
165165 stages : Array < StageInfo > ;
166166 layout ?: Partial < LayoutInfo > ;
167- setStages ?: ( stages : Array < StageInfo > ) => void ;
168167 selectedStage ?: StageInfo ;
169168 collapsed ?: boolean ;
170169 onStageSelect : ( nodeId : string ) => void ;
You can’t perform that action at this time.
0 commit comments