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

Handle generate mockup failure/partial success #124

Conversation

YayunHuang
Copy link
Contributor

Blocked by

What's in this PR?

Ref: MUP-182

Screen.Recording.2024-08-29.at.6.35.24.PM.mov

if all failed:
Screenshot 2024-08-29 at 6 37 58 PM

Copy link
Collaborator

@pkong-ds pkong-ds left a 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

  1. Mockuphone seems to have white/blue theme. Can we use a light-background toast with dark text?
  2. header can be larger font size,
  3. use less words for description? (maybe GenAI can help if dunno what words to cut)
  4. Header and description more spacing
  5. Can we reuse logos to indicate partial success (warning?) and error?
image

package.json Outdated Show resolved Hide resolved
src/pages/download/_downloadPythonPackage.js Outdated Show resolved Hide resolved
src/pages/download/_downloadPythonPackage.js Outdated Show resolved Hide resolved
src/pages/download/_downloadPythonPackage.js Outdated Show resolved Hide resolved
src/pages/download/_downloadPythonPackage.js Outdated Show resolved Hide resolved
src/pages/download/_downloadPythonPackage.js Outdated Show resolved Hide resolved
src/pages/download/_downloadPythonPackage.js Outdated Show resolved Hide resolved
@YayunHuang YayunHuang force-pushed the mup-182-show-error-message-when-generate-failed branch 3 times, most recently from 6af2422 to eaff971 Compare August 30, 2024 05:19
@YayunHuang
Copy link
Contributor Author

@pkong-ds updated to use light-background toast with dark text~
Screenshot 2024-08-30 at 1 06 58 PM
Screenshot 2024-08-30 at 1 15 19 PM

Copy link
Collaborator

@pkong-ds pkong-ds left a 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

Comment on lines 16 to 18
toastHeader.style.fontWeight = "bold";
toastHeader.style.fontSize = "20px";
toastHeader.style.color = "black";
Copy link
Collaborator

Choose a reason for hiding this comment

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

css?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

move to css~

Copy link
Collaborator

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:

toastHeader.style.color = "black";
toastHeader.innerHTML = `<div class="toast-header">${
avatar ? `<img src="${avatar}">` : ""
}<span>${title}</span></div>`;
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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?

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 think string | HTMLElement is more flexible, simple string ok too.

Copy link
Collaborator

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 use title if it's HTMLElement

Comment on lines 53 to 54
<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>
`;
Copy link
Collaborator

@pkong-ds pkong-ds Aug 30, 2024

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>

@YayunHuang YayunHuang force-pushed the mup-182-show-error-message-when-generate-failed branch from eaff971 to 612dbea Compare August 30, 2024 08:47
@YayunHuang
Copy link
Contributor Author

@pkong-ds updated and rebased to main~

@pkong-ds
Copy link
Collaborator

LGTM, let's add changes when designer have other thoughts ref https://linear.app/oursky/issue/MUP-182/handle-generate-mockup-failure#comment-a93f7e2f

image

@pkong-ds pkong-ds merged commit 79e7003 into oursky:main Aug 30, 2024
1 check passed
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.

2 participants