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

feat: implement progress bar and update progress indicators #414

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexey-detr
Copy link
Contributor

@alexey-detr alexey-detr commented Mar 14, 2024

Some improvements for UI around progress indicators.

Now there are no overlays over the preview image, and it's easier to stop generation, since stop button is right in the toolbar.

I don't have much Swift experience, will be glad for any hints or fix suggestions.

Screen.Recording.2024-03-13.at.23.28.45-1.mov

@@ -167,7 +167,7 @@ struct GenerationConfig: Sendable, Identifiable {
return models
}

func loadPipeline(
func preparePipeline(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't found a more elegant way to handle this. Issue is that when load pipeline finished and generation of image is about to start, there's a short time while generator returns back to ready state, which makes UI flicker.

@@ -77,7 +77,6 @@ struct GalleryItemView: View {
Image(image, scale: 1, label: Text(verbatim: String(sdi.seed)))
.resizable()
.aspectRatio(contentMode: .fit)
.padding(4)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if it's better, but feels like this gap was unnecessary, I can revert it.

@gdbing
Copy link
Collaborator

gdbing commented Mar 18, 2024

  • How does it look in smaller windows? Not even absurdly tiny, but e.g. a 3/4 screen width window on a 13” Macbook Air at default screen resolution with both sidebars on?
  • I would expect info button to show info about the current job, not a list of upcoming queued jobs. I don’t have an obvious answer for what would be a better icon though.

@alexey-detr
Copy link
Contributor Author

@gdbing Thanks for looking into this!

How does it look in smaller windows? Not even absurdly tiny, but e.g. a 3/4 screen width window on a 13” Macbook Air at default screen resolution with both sidebars on?

Items start to hide from right to left behind >> button, I think it's like a native behavior of toolbar in SwiftUI. So the new progress block disappears last. I'd prefer this progress block to expand and take the whole width actually when there's some space. But that's where perhaps I need some help as I don't have much SwiftUI expertise and not sure if it's even doable.

I would expect info button to show info about the current job, not a list of upcoming queued jobs. I don’t have an obvious answer for what would be a better icon though.

Yeah, good point, I'll see what I can do, maybe reorganizing it a little bit. The point is I wanted to provide info about current progress right in the new progress block, but the whole queue (and maybe more detailed) information would be hidden in the popup. I think this list.bullet icon list bullet would fit just fine for this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants