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(notifications): added notifications #176

Open
wants to merge 12 commits into
base: next
Choose a base branch
from

Conversation

serafim-san
Copy link
Contributor

@serafim-san serafim-san commented Aug 19, 2024

Summary

Added notifications

Notion card

New design
Old one

Screenshots

image
image
image
image

@serafim-san serafim-san changed the title feat(notifications): added notifications feat(notifications): added notifications WIP Aug 19, 2024
@serafim-san serafim-san force-pushed the feat/notifications-implementation-using-svelte-5-san-webkit-next branch from 4c80464 to ab69324 Compare September 11, 2024 14:41
@serafim-san serafim-san changed the title feat(notifications): added notifications WIP feat(notifications): added notifications Sep 11, 2024
@serafim-san serafim-san marked this pull request as ready for review September 12, 2024 11:37
@@ -1,6 +1,6 @@
import { Query } from '$lib/api/executor.js'
import { useStripeCtx } from '$lib/ctx/stripe/index.js'
import { notifcation } from '$ui/core/Notifications/index.js'
import { notification } from '$ui/core/Notifications/index.js'
Copy link
Contributor Author

@serafim-san serafim-san Sep 12, 2024

Choose a reason for hiding this comment

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

fixed typo in notification object

@serafim-san serafim-san force-pushed the feat/notifications-implementation-using-svelte-5-san-webkit-next branch 3 times, most recently from e2c1e6f to a9c708f Compare September 12, 2024 12:19
@serafim-san serafim-san force-pushed the feat/notifications-implementation-using-svelte-5-san-webkit-next branch 2 times, most recently from 8b83c53 to 4a5fd47 Compare September 12, 2024 14:34
@serafim-san serafim-san force-pushed the feat/notifications-implementation-using-svelte-5-san-webkit-next branch from 4a5fd47 to 0282bf0 Compare September 12, 2024 15:01
message: string,
options?: Omit<ComponentProps<Component>, 'icon' | 'message'>,
) {
return toast.custom(Component as unknown as ComponentType, {
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 had to do this because of the different types of components in Svelte 4 and Svelte 5

Copy link
Contributor Author

@serafim-san serafim-san Sep 12, 2024

Choose a reason for hiding this comment

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

Error I encountered when trying to pass a component without type conversion:

Argument of type '__sveltets_2_IsomorphicComponent<Props, { closeToast: CustomEvent<any>; } & { [evt: string]: CustomEvent<any>; }, {}, {}, "">' is not assignable to parameter of type 'ComponentType'.
  Type '__sveltets_2_IsomorphicComponent<Props, { closeToast: CustomEvent<any>; } & { [evt: string]: CustomEvent<any>; }, {}, {}, "">' is not assignable to type 'new (options: ComponentConstructorOptions<Record<string, any>>) => SvelteComponent<Record<string, any>, any, any>'.
    Types of parameters 'options' and 'options' are incompatible.
      Type 'ComponentConstructorOptions<Record<string, any>>' is not assignable to type 'ComponentConstructorOptions<Props>'.
        Type 'Record<string, any>' is missing the following properties from type 'Props': icon, messagets(2345)

export const getVaulCtx = (ctx = getAllContexts()): [] | [Symbol, any] =>
Array.from(ctx.entries()).find(([key, value]) => value?.states?.drawerId) || []
export const getVaulCtx = (ctx = getAllContexts()): [] | [symbol, any] =>
Array.from(ctx.entries()).find(([_key, value]) => value?.states?.drawerId) || []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was changed because eslint error. Symbol letter case changed automatically by eslint --fix

@@ -1 +1 @@
export { default } from './InsightCard.svelte';
export { default } from './InsightCard.svelte'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was hanged automatically by eslint --fix

@serafim-san serafim-san force-pushed the feat/notifications-implementation-using-svelte-5-san-webkit-next branch from e6ece4b to 7beab05 Compare September 12, 2024 20:25
@serafim-san serafim-san force-pushed the feat/notifications-implementation-using-svelte-5-san-webkit-next branch from 7beab05 to db8dcf3 Compare September 12, 2024 20:32
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.

1 participant