Skip to content

Commit

Permalink
Refactor headers part of the Scheduler layout to improve rendering
Browse files Browse the repository at this point in the history
This also fix a resizing issue with the gear icon to command the Scheduler
  • Loading branch information
sebastian-aranda committed Aug 13, 2024
1 parent 6a3d341 commit c8d8051
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
16 changes: 6 additions & 10 deletions love/src/components/Scheduler/Headers/Headers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,10 @@ export default class Headers extends Component {
return (
<div className={styles.container}>
<div className={styles.leftDivs}>
<div className={styles.headersLeft}>
<div>
<SummaryPanel className={styles.summaryPanel1}>
<Title className={styles.sumState}>Summary State</Title>
<Value>
<StatusText status={summaryStateToStyle[schedulerSummaryState]}>{schedulerSummaryState}</StatusText>
</Value>
<Title>Summary State</Title>
<StatusText status={summaryStateToStyle[schedulerSummaryState]}>{schedulerSummaryState}</StatusText>
<GearIcon className={styles.gearIcon} onClick={() => this.toggleSchedulerCmdOptions()} />
{showOptions && (
<div className={styles.cmdOptions}>
Expand All @@ -186,11 +184,9 @@ export default class Headers extends Component {
)}
</div>
)}
<Value>
<StatusText status={schedulerDetailedStateToStyle[schedulerDetailedState]}>
{schedulerDetailedState}
</StatusText>
</Value>
<StatusText status={schedulerDetailedStateToStyle[schedulerDetailedState]}>
{schedulerDetailedState}
</StatusText>
</SummaryPanel>
</div>
<div className={styles.headersCenter}>
Expand Down
21 changes: 10 additions & 11 deletions love/src/components/Scheduler/Headers/Headers.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,20 @@ this program. If not, see <http://www.gnu.org/licenses/>.

.leftDivs {
display: flex;
justify-content: space-between;
align-items: center;
}

.summaryPanel1 {
display: flex;
padding: 20px;
width: 100%;
padding: 0;
padding-left: 20px;
background: #101f27 !important;
max-width: none;
min-width: auto;
}

.summaryPanel1 > * {
margin-right: 1em !important;
}

.summaryPanel2 > span {
Expand All @@ -56,20 +61,14 @@ this program. If not, see <http://www.gnu.org/licenses/>.
padding: 20px;
width: 100%;
background-color: var(--second-secondary-background-color) !important;
/* background: var(--second-quaternary-background-dimmed-color) !important; */
}

.summaryTable .title {
white-space: nowrap !important;
}

.headersLeft {
margin-left: -1em;
}

.headersCenter {
display: flex;
justify-content: space-between;
align-items: center;
}

Expand All @@ -78,8 +77,8 @@ this program. If not, see <http://www.gnu.org/licenses/>.
}

.gearIcon {
width: 10%;
padding-left: 1em;
width: 2em;
height: 2em;
}

.gearIcon:hover {
Expand Down

0 comments on commit c8d8051

Please sign in to comment.