-
Notifications
You must be signed in to change notification settings - Fork 6
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
Handle generate mockup failure/partial success #124
Handle generate mockup failure/partial success #124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug
Now always show no generated mockups
. Can help check check?
UI Issues
- Mockuphone seems to have white/blue theme. Can we use a light-background toast with dark text?
- header can be larger font size,
- use less words for description? (maybe GenAI can help if dunno what words to cut)
- Header and description more spacing
- Can we reuse logos to indicate partial success (warning?) and error?
6af2422
to
eaff971
Compare
@pkong-ds updated to use light-background toast with dark text~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, some more minor comments
src/scripts/utils/toast.ts
Outdated
toastHeader.style.fontWeight = "bold"; | ||
toastHeader.style.fontSize = "20px"; | ||
toastHeader.style.color = "black"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to css~
src/scripts/utils/toast.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect toast.ts
and toast.css
live in the same folder, maybe put in src/scripts/utils/toast/
?
Also, extra layer src/scripts
seem weird. But that's another code quality issue :sadfrog:
src/scripts/utils/toast.ts
Outdated
toastHeader.style.color = "black"; | ||
toastHeader.innerHTML = `<div class="toast-header">${ | ||
avatar ? `<img src="${avatar}">` : "" | ||
}<span>${title}</span></div>`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this syntax actually allow title: HTMLElement
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkong-ds I'm not sure which better, how about
title: string | HTMLElement
use default <div class="toast-header">.....</div>
if it' string, and directly use title
if it's HTMLElement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking simply type-forcing it as string, i.e.
title: string
Why do you want yo support HTMLElement here? What usage do you expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think string | HTMLElement
is more flexible, simple string ok too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok! let's go for what you suggested~
use default
<div class="toast-header">.....</div>
if it' string, and directly usetitle
if it's HTMLElement
<div>If the issue persists, please report it on GitHub 🙏 <br> | ||
<a href='https://github.com/oursky/mockuphone.com/issues'>https://github.com/oursky/mockuphone.com/issues</a></div> | ||
`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please report it on <a href='https://github.com/oursky/mockuphone.com/issues'>Github</a>
eaff971
to
612dbea
Compare
@pkong-ds updated and rebased to main~ |
LGTM, let's add changes when designer have other thoughts ref https://linear.app/oursky/issue/MUP-182/handle-generate-mockup-failure#comment-a93f7e2f |
Blocked by
What's in this PR?
Ref: MUP-182
Screen.Recording.2024-08-29.at.6.35.24.PM.mov
if all failed: