Skip to content

Add Create Image example to Demo app #63

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

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

SunburstEnzo
Copy link
Contributor

@SunburstEnzo SunburstEnzo commented Apr 24, 2023

What

• Added ImageStore, follows same structure as ChatStore and MiscStore
• Added ImageView which is a list of being able to Create Images (this PR), and upcoming Create Image Edit and Create Image Variation (disabled, placeholder views)
• Uses SafariViewController to display image URL's when tapped though not ideal as not SwiftUI friendly
• ImagesResult.URLResult conforms to Hashable so I could use it in a list – may be better to map the url strings instead

Why

#49, most likely a popular feature

Affected Areas

ContentView, ImagesResult.URLResult

Like my Models DemoApp example, needs better error messaging

More than happy to tweak, especially in favour of nicer SwiftUI usage 👌

Preview:
Simulator Screenshot - iPhone 14 Pro - 2023-04-24 at 15 34 59 2
Simulator Screenshot - iPhone 14 Pro - 2023-04-24 at 17 21 54 2

@Krivoblotsky
Copy link
Collaborator

What do you think about having a chat-like interface, but with images as a result instead of texts? So you can type a prompt and get an image right in the chat?

@SunburstEnzo
Copy link
Contributor Author

Yeah that's a good idea, I definitely thought about that initially but thought it might be overkill for the demo app? I wasn't sure how large the bottom keyboard-related area would end up being though. It could be that the (non-text/prompt) options are all in one context menu.

I'll have a think and see what I can mock up.

@Krivoblotsky
Copy link
Collaborator

Krivoblotsky commented Apr 25, 2023

We can refer to Apple's Messages app here, what do you think? @DJBen do you have any thoughts?
IMG_5028

@SunburstEnzo
Copy link
Contributor Author

We could use the Link Presentation framework to display the images like that too https://developer.apple.com/documentation/linkpresentation

@SunburstEnzo
Copy link
Contributor Author

Link Presentation isn't super friendly with SwiftUI but found a few resources online to get it working, so it is a viable option (just obviously then in the chat format rather than this table format)

Simulator Screenshot - iPhone 14 Pro - 2023-04-25 at 12 03 42 2

@SunburstEnzo
Copy link
Contributor Author

The options for chat-style interaction is my main question though, something like this? Or "…" icon?
For image editing a "photo album" icon next to "..." could be a good answer that then covers both use cases

Simulator Screenshot - iPhone 14 Pro - 2023-04-25 at 13 06 29 2

@ingvarus-bc ingvarus-bc self-requested a review November 9, 2023 16:54
@ingvarus-bc ingvarus-bc merged commit a9d1e30 into MacPaw:main Nov 14, 2023
wangqi pushed a commit to wangqi/OpenAI that referenced this pull request Feb 18, 2025
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.

3 participants