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

fix(#19): support HTML content #27

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

ramseyfeng
Copy link

Adding support for HTML content display.

@ramseyfeng ramseyfeng mentioned this pull request Sep 12, 2024
Copy link
Owner

@ThomasLeconte ThomasLeconte left a comment

Choose a reason for hiding this comment

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

Hi,
I think an html property in notifyOptions should be better. You keep the given text, and html could be displayed additionaly if html property is not null.

Something like this :

export type CreateNotifyOptions = {
  text: string;
  html?: string;
  level?: Level;
  location?: VSnackbar['$props']['location'];
  notifyOptions?: VSnackbar['$props'];
};

Moreover, you need to add html property to index.d.ts, types.ts for allowing autocompletion in projects using this library.

@ramseyfeng
Copy link
Author

@ThomasLeconte Updated MR according to your comments.

Copy link
Owner

@ThomasLeconte ThomasLeconte left a comment

Choose a reason for hiding this comment

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

Hi @ramseyfeng, thanks for your work.
In my opinion, notifyInfo, notifyWarning, notifyError and notifySuccess are fast ways to make notifications. HTML support is not a common use for snackbars. You can keep htmlContent in CreateNotifyOptions, but it's not necessary in all shortcuts functions.

Copy link
Author

@ramseyfeng ramseyfeng left a comment

Choose a reason for hiding this comment

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

@ThomasLeconte The PR has been updated again. :p

Copy link
Owner

@ThomasLeconte ThomasLeconte left a comment

Choose a reason for hiding this comment

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

Nice ! I will test it soon and I will prevent you when next release is available 😉 !

@ThomasLeconte ThomasLeconte changed the base branch from master to develop September 20, 2024 11:55
@ThomasLeconte ThomasLeconte merged commit 5d55934 into ThomasLeconte:develop Sep 20, 2024
@ThomasLeconte
Copy link
Owner

Hi @ramseyfeng, 1.5.3 version is available 😉 !

@ramseyfeng
Copy link
Author

@ThomasLeconte That's great!

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