Skip to content

Commit

Permalink
Merge pull request #4263 from gemini-hlsw/obs-status-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
toddburnside authored Oct 28, 2024
2 parents 95019a7 + e975f72 commit a2654d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ object ExploreStyles:
val ObsDeleteButton: Css = Css("obs-delete-button")
val ObsCloneButton: Css = Css("obs-clone-button")
val ObsScienceBandButton: Css = Css("obs-science-band-button")
val ObsStatusSelect: Css = Css("obs-status-select")
val ObsStatusSelectWrapper: Css = Css("obs-status-select-wrapper")
val ObsStatusSelectPanel: Css = Css("obs-status-select-panel")
val ObsStateSelect: Css = Css("obs-state-select")
val ObsStateSelectWrapper: Css = Css("obs-state-select-wrapper")
val ObsStateSelectPanel: Css = Css("obs-state-select-panel")
val ObservationsSummaryTable: Css = Css("observations-summary-table")
val ObservationsSummaryAdd: Css = Css("observations-summary-add")
val SelectedObsItem: Css = Css("selected-obs-item")
Expand Down
10 changes: 3 additions & 7 deletions common/src/main/webapp/sass/explore.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1514,10 +1514,6 @@ svg.fa-triangle-exclamation.explore-error-icon {
justify-content: space-between;
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
font-size: var(--pl-tiny-font-size);

// because of the rotate, Y is X
$active-status-translate-x: -0.4em;
$active-status-translate-y: 2em;
}

.obs-badge-extra {
Expand All @@ -1526,7 +1522,7 @@ svg.fa-triangle-exclamation.explore-error-icon {
justify-content: space-between;
gap: 2em;

.obs-status-select-wrapper {
.obs-state-select-wrapper {
flex-grow: 2;
}
}
Expand Down Expand Up @@ -1565,14 +1561,14 @@ svg.fa-triangle-exclamation.explore-error-icon {
padding-right: 0 !important;
}

.obs-status-select {
.obs-state-select {
width: 100%;
background-color: var(--obs-selected-badge-background);
}
}

// The panel is not nested in the obs badge
.obs-status-select-panel.p-dropdown-panel {
.obs-state-select-panel.p-dropdown-panel {
background-color: var(--obs-selected-badge-background);
}

Expand Down
6 changes: 3 additions & 3 deletions explore/src/main/scala/explore/observationtree/ObsBadge.scala
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ object ObsBadge:
<.div(ExploreStyles.ObsBadgeExtra)(
props.setStateCB.map(setStatus =>
<.span(
ExploreStyles.ObsStatusSelectWrapper,
ExploreStyles.ObsStateSelectWrapper,
EnumDropdownView(
id = NonEmptyString.unsafeFrom(s"obs-status-${obs.id}-2"),
value = View[ObservationWorkflowState](
Expand All @@ -210,8 +210,8 @@ object ObsBadge:
setStatus(newValue) >> cb(oldValue, newValue)
),
size = PlSize.Mini,
clazz = ExploreStyles.ObsStatusSelect,
panelClass = ExploreStyles.ObsStatusSelectPanel,
clazz = ExploreStyles.ObsStateSelect,
panelClass = ExploreStyles.ObsStateSelectPanel,
disabled = props.isDisabled,
disabledItems = obs.disabledStates
)
Expand Down

0 comments on commit a2654d6

Please sign in to comment.