-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/ToggleSwitch to TopBarMenu #208
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
base: main
Are you sure you want to change the base?
Changes from all commits
a8f0001
cbf3f75
3f02151
45c03d9
4c334fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,35 @@ | ||
| .firstRowWrapper { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| } | ||
|
|
||
| .switchWrapper { | ||
| display: flex; | ||
| gap: 8px; | ||
| padding: 4px; | ||
| display: inline-flex; | ||
| border: 1px solid var(--switchwrapper-border-color); | ||
| border-radius: 31px; | ||
| border: 1px solid var(--border, #42424C); | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .switchOption { | ||
| padding: 6px 12px; | ||
| border-radius: 16px; | ||
| position: relative; | ||
| flex: 1; | ||
| text-align: center; | ||
| cursor: pointer; | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| border-radius: 31px; | ||
| transition: background 0.3s ease; | ||
| color: #b0b0b0; | ||
| } | ||
|
|
||
| .selected { | ||
| background: rgb(44 203 229 / 60%); | ||
| .optionLabel { | ||
| position: relative; | ||
| display: inline-block; | ||
| padding: 4px 12px; | ||
| } | ||
|
|
||
| .switchIndicator { | ||
| position: absolute; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| background-color: var(--switchindicator-background-color); | ||
| } | ||
|
|
||
| .active { | ||
| color: white; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,16 +6,16 @@ import { NodeElementList } from "./components/NodeElement/NodeElementList"; | |
| import { RunningJob } from "./components/RunningJob/RunningJob"; | ||
| import { Results } from "./components/Results/Results"; | ||
| import { SelectionContextProvider } from "../common/context/SelectionContext"; | ||
| import BlueButton from "../../ui-lib/components/Button/BlueButton"; | ||
| import { useFlexLayoutContext } from "../../routing/flexLayout/FlexLayoutContext"; | ||
| import RefreshIcon from "../../ui-lib/Icons/RefreshIcon"; | ||
|
|
||
| export const NodesPage = () => { | ||
| const { allNodes, runningNodeInfo, fetchAllNodes } = useNodesContext(); | ||
| const { topBarAdditionalComponents, setTopBarAdditionalComponents } = useFlexLayoutContext(); | ||
| const NodeTopBarRefreshButton = () => { | ||
| return ( | ||
| <div className={styles.refreshButtonWrapper} data-testid="refresh-button"> | ||
| <BlueButton onClick={() => fetchAllNodes()}>Refresh</BlueButton> | ||
| <button onClick={() => fetchAllNodes()} title="Refresh node parameters"> <RefreshIcon /> </button> | ||
|
||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,7 @@ export type Module = { | |
| path?: string; | ||
| dataCy?: string; | ||
| }; | ||
| hidden?: boolean; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't a good aproach. This page should have two tabs, not two separate pages where one of it is hidden. Please revert this and find a workaround. |
||
| // onClick?: () => void; | ||
| }; | ||
|
|
||
|
|
@@ -86,7 +87,7 @@ export const ModulesRegistry: Array<Module> = [ | |
| Component: CalibrationGraph, | ||
| menuItem: { | ||
| sideBarTitle: "Graph Library", | ||
| title: "Run calibration graph", | ||
| title: "Calibration graph", | ||
| icon: GraphLibraryIcon, | ||
| dataCy: cyKeys.CALIBRATION_TAB, | ||
| }, | ||
|
|
@@ -97,10 +98,11 @@ export const ModulesRegistry: Array<Module> = [ | |
| Component: GraphStatus, | ||
| menuItem: { | ||
| sideBarTitle: "Graph Status", | ||
| title: "Graph Status", | ||
| title: "Calibration graph", | ||
| icon: GraphStatusIcon, | ||
| dataCy: cyKeys.NODES_TAB, | ||
| }, | ||
| hidden: true, | ||
| }, | ||
| { | ||
| keyId: DATA_KEY, | ||
|
|
||
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.
[nitpick] The button should use consistent styling classes instead of inline elements. Consider applying the same styling pattern used in other refresh buttons.