Skip to content

Commit

Permalink
feat: UI enhancements for graph nodes, lists sorting and general styl…
Browse files Browse the repository at this point in the history
…ing (#1389)

* feat: sort

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* perf: pretty graph

* style: resize resource graph node

* perf: pretty graph

* perf: pretty graph

---------

Co-authored-by: Yang Yang <[email protected]>
  • Loading branch information
hai-tian and Yangyang96 authored Jan 22, 2025
1 parent da89ea5 commit fa4ef43
Show file tree
Hide file tree
Showing 30 changed files with 853 additions and 579 deletions.
3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@codemirror/lang-markdown": "^6.3.1",
"@codemirror/language": "^6.10.6",
"@codemirror/legacy-modes": "^6.4.2",
"@codemirror/search": "^6.5.8",
"@codemirror/view": "^6.35.3",
"@hey-api/client-fetch": "^0.5.2",
"@kusionstack/kusion-api-client-sdk": "^1.1.4",
Expand Down Expand Up @@ -118,4 +119,4 @@
"stylelint-prettier": "^5.0.0"
},
"repository": "git@[email protected]:KusionStack/kusion.git"
}
}
Binary file added ui/src/assets/graph/alicloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/src/assets/graph/aws-cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/src/assets/graph/azure-cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/src/assets/graph/google-cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/src/assets/graph/hashicorp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/src/assets/graph/terraform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions ui/src/components/backWithTitle/styles.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
margin-right: 10px;
cursor: pointer;
}

h3 {
font-size: 20px;
}
}
10 changes: 5 additions & 5 deletions ui/src/components/kusionTabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ export const KusionTabs = ({
)
})}
</div>
<div className={styles.add_box} onClick={handleAdd}>
<PlusOutlined
style={{ fontSize: 14, color: '#fff', marginRight: 10 }}
/>New Stack
</div>
<Tooltip title="New Stack">
<div className={styles.add_box} onClick={handleAdd}>
<PlusOutlined style={{ fontSize: 14, color: '#fff' }} />
</div>
</Tooltip>
</div>
</div>
)
Expand Down
16 changes: 8 additions & 8 deletions ui/src/components/kusionTabs/styles.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

.tab {
display: flex;
padding: 10px 16px;
margin-right: 2px;
font-size: 14px;
padding: 10px 24px;
margin-right: 5px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
background-color: rgb(0 0 0 / 2%);
Expand All @@ -24,17 +24,17 @@

&.active_tab {
z-index: 1000;
color: #1778ff;
background: #1677ff14;
border: 1px solid #f1f1f1;
color: #fff;
background: #1778ff;
border: 1px solid #1778ff;
}

.edit_icon {
display: flex;
padding: 0 6px;
margin-right: -4px;
margin-left: 8px;
font-size: 14px;
color: #8a8a8a;

&:hover {
color: #f14c4c;
Expand All @@ -55,7 +55,7 @@
cursor: pointer;
border: 1px solid #1778ff;
border-radius: 8px 8px 0 0;
font-size: 14px;
font-size: 16px;
}
}

Expand Down
10 changes: 3 additions & 7 deletions ui/src/components/layout/kusionMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React, { memo, useEffect, useState } from 'react'
import { Menu } from 'antd'
import { useLocation, useNavigate } from 'react-router-dom'
import { useSelector } from 'react-redux'
import React, { memo } from 'react'
import type { MenuProps } from 'antd'

import styles from "./style.module.less"

type MenuItem = Required<MenuProps>['items'][number]
Expand All @@ -27,9 +25,7 @@ function getItem(
} as MenuItem
}


const KusionMenu = ({selectedKey, onClick}) => {

const KusionMenu = ({ selectedKey, onClick }) => {

const menuItems = [
getItem('Projects', '/projects', null),
Expand Down
Loading

0 comments on commit fa4ef43

Please sign in to comment.