Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions explore/app/src/main/scala/explore/Explore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ import explore.model.RootModel
import explore.model.RoutingInfo
import explore.model.WorkerClients
import explore.model.enums.AppTab
import explore.utils.*
import fs2.dom.BroadcastChannel
import japgolly.scalajs.react.*
import japgolly.scalajs.react.extra.router.*
import log4cats.loglevel.LogLevelLogger
import lucuma.core.enums.ExecutionEnvironment
import lucuma.core.model.Program
import lucuma.react.primereact.ToastRef
import lucuma.ui.sso.UserVault
Expand Down Expand Up @@ -96,12 +94,6 @@ object ExploreMain {

def run: IO[Unit] = {

def setupReusabilityOverlay(env: ExecutionEnvironment): IO[Unit] =
if (env === ExecutionEnvironment.Development) {
toggleReusabilityOverlay[IO]() >>
IO(japgolly.scalajs.react.extra.ReusabilityOverlay.overrideGloballyInDev())
} else IO.unit

val reconnectionStrategy: ReconnectionStrategy =
(attempt, _) =>
// Increase the delay to get exponential backoff with a minimum of 1s and a max of 1m
Expand Down Expand Up @@ -151,7 +143,6 @@ object ExploreMain {
bc,
toastRef
)
_ <- setupReusabilityOverlay(appConfig.environment)
r <- (ctx.sso.whoami, setupDOM[IO], showEnvironment[IO](appConfig.environment)).parTupled
(vault, container, _) = r
} yield ReactDOMClient
Expand Down
12 changes: 2 additions & 10 deletions explore/app/src/main/scala/explore/TopBar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import explore.undo.UndoStacks
import explore.users.RedeemInvitationsPopup
import explore.users.UserPreferencesPopup
import japgolly.scalajs.react.*
import japgolly.scalajs.react.callback.CallbackCatsEffect.*
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.enums.ExecutionEnvironment
import lucuma.core.model.GuestRole
Expand Down Expand Up @@ -162,15 +161,8 @@ object TopBar:
).flattenOption

val lastItems =
if (LinkingInfo.developmentMode)
val reusabilityItem = MenuItem
.Item(
label = "Toggle Reusability",
icon = Icons.CrystalBall,
command = utils.toggleReusabilityOverlay[CallbackTo](),
visible = ctx.environment === ExecutionEnvironment.Development
)
lastCommonItems ++ List(ThemeSubMenu(props.theme), reusabilityItem)
if LinkingInfo.developmentMode
then lastCommonItems :+ ThemeSubMenu(props.theme)
else lastCommonItems

val menuItems =
Expand Down
9 changes: 0 additions & 9 deletions explore/common/src/main/scala/explore/utils/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ import lucuma.core.util.Display
import lucuma.core.util.Enumerated
import lucuma.core.util.NewBoolean
import lucuma.core.util.TimeSpan
import lucuma.react.common.style.Css
import lucuma.ui.components.TimeSpanView
import lucuma.ui.format.versionDateFormatter
import lucuma.ui.input.ChangeAuditor
import lucuma.ui.syntax.all.given
import org.scalajs.dom

import java.time.Instant

Expand All @@ -38,13 +36,6 @@ val canvasHeight = VdomAttr("height")
val dataAbbrv = VdomAttr("data-abbrv")
val filter = VdomAttr("filter")

def toggleReusabilityOverlay[F[_]: Sync](): F[Unit] =
Sync[F]
.delay(
dom.document.body.classList.toggle(ExploreStyles.HideReusability.htmlClass)
)
.void

val gitHash = BuildInfo.gitHeadCommit

def version(environment: ExecutionEnvironment): NonEmptyString = {
Expand Down
2 changes: 1 addition & 1 deletion project/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object Versions {
val sbtRevolver = "0.10.0"
val scalaCollectionContrib = "0.4.0"
val scalaJsDom = "2.8.1"
val scalaJsReact = "3.0.0-beta12"
val scalaJsReact = "3.0.0-beta13"
val slf4j = "2.0.17"
val unboundId = "3.2.1"
}
3 changes: 0 additions & 3 deletions ui/demo/src/main/scala/lucuma/ui/demo/AladinDemo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import cats.effect.*
import demo.TargetBody
import japgolly.scalajs.react.React
import japgolly.scalajs.react.ReactDOMClient
import japgolly.scalajs.react.extra.ReusabilityOverlay
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.ui.syntax.all.given
import org.scalajs.dom
Expand All @@ -21,8 +20,6 @@ trait AladinAppMain extends IOApp.Simple {
def runIOApp(): Unit = main(Array.empty)

override final def run: IO[Unit] = IO {
ReusabilityOverlay.overrideGloballyInDev()

val container = Option(dom.document.getElementById("root")).getOrElse {
val elem = dom.document.createElement("div")
elem.id = "root"
Expand Down
3 changes: 0 additions & 3 deletions ui/demo/src/main/scala/lucuma/ui/demo/AppMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package lucuma.ui.demo
import cats.effect.*
import japgolly.scalajs.react.React
import japgolly.scalajs.react.ReactDOMClient
import japgolly.scalajs.react.extra.ReusabilityOverlay
import japgolly.scalajs.react.vdom.html_<^.*
import org.scalajs.dom

Expand All @@ -19,8 +18,6 @@ trait AppMain extends IOApp.Simple {
def runIOApp(): Unit = main(Array.empty)

override final def run: IO[Unit] = IO {
ReusabilityOverlay.overrideGloballyInDev()

val container = Option(dom.document.getElementById("root")).getOrElse {
val elem = dom.document.createElement("div")
elem.id = "root"
Expand Down