Skip to content
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

Fixed scaling and positioning of loading comic #337

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 14 additions & 14 deletions program/shinyApp/R/C.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,21 @@ CUSTOM_THEME <<- theme_bw(base_size = 15) +
plot.title = element_text(size = 17, face = "bold") # Plot title
)



LOADING_SCREEN <<- tagList(
LOADING_SCREEN <- tagList(
div(
style = "position: relative; display: flex; justify-content: center; align-items: center;",
div(
style = "display: flex;",
img(src = "bored_panda_11.png", style = "max-width: 100%; height: auto;"),
img(src = "bored_panda_12.png", style = "max-width: 100%; height: auto;")
),
style = "position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; padding: 0; margin: 0; box-sizing: border-box; overflow: hidden; background-color: rgba(225, 225, 225, 0.5);", # Light background color
div(
style = "position: absolute; top: 20%; left: 60%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; color: white; font-size: 24px; font-weight: bold;",
spin_flower(),
span("Computing...")
style = "display: flex; flex-direction: column; align-items: center; width: auto; height: auto; padding: 20px; margin: 0; box-sizing: border-box; background-color: rgba(225, 225, 225, 0); border-radius: 10px;", # Slightly darker background behind images
# Centered Images
img(src = "bored_panda_11.png", style = "width: 50%; height: auto; object-fit: contain; margin-bottom: 10px; padding: 0;"),
img(src = "bored_panda_12.png", style = "width: 50%; height: auto; object-fit: contain; margin: 0; padding: 0;"),

# Centered Spinner and Text
div(
style = "position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; color: white; font-size: 24px; font-weight: bold;",
spin_flower(),
span("Computing...")
)
)
)
)

)
3 changes: 2 additions & 1 deletion program/shinyApp/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,8 @@ server <- function(input,output,session){
waiter <- Waiter$new(
id="data_summary",
Copy link
Collaborator

@PaulJonasJost PaulJonasJost Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
id="data_summary",

IDs are not needed anymore, as we want to use the whole screen anyway, this will also lead to the correct background color usage. Should be adjusted in all waiters.

Copy link
Collaborator Author

@anikde07 anikde07 Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the IDs from 6 waiter classes. Could you have a look at it once you are free?
Would I need to issue another pull request or can you merge from this one, once you approve the changes?

Also, I just noticed that the run time checks have failed. I'm not sure how to fix this, since I did not make changes to the lock file, which is supposedly missing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the failed test is due to the age of this branch. It has been fixed in develop which is ahead of this branch.
@PaulJonasJost would it be correct procedure to merge develop first into this branch and then merge into develop? Or would this overwrite changes done within this branch?

html = LOADING_SCREEN,
color="#3897F147",
#color="#3897F147",
color = "rgba(255,255,255,0)",
hide_on_render=FALSE
)
waiter$show()
Expand Down