-
Notifications
You must be signed in to change notification settings - Fork 4k
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(dashboard): Tag input suggestions #6728
Conversation
a224399
to
0bea6e6
Compare
@novu/client
@novu/framework
@novu/headless
@novu/nest
@novu/nextjs
@novu/js
@novu/node
@novu/notification-center
@novu/react
@novu/providers
@novu/react-native
@novu/shared
novu
@novu/stateless
commit: |
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -54,6 +55,12 @@ export const CreateWorkflowButton = (props: CreateWorkflowButtonProps) => { | |||
setIsOpen(false); | |||
}, | |||
}); | |||
const { data: tagData } = useQuery<{ data: { name: string }[] }>({ |
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.
Let's factor this out to a dedicated useTags
hook. We will need it in other screens as well.
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.
Done. I added a useTagsQuery
here and I think that pattern will suit us better than filtering out what we pass / return. @LetItRock Let's discuss this and see what pattern will fit us best.
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.
@desiprisg I'm totally fine with following useXQuery, useXMutation
pattern ;) let's just quickly update the hooks in the separate ticket
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.
Folks, the one we have now is OK as well. So please align them separately.
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 also meant not passing onSuccess
and onError
funcs, and just passing through what @tanstack/react-query
accepts.
8ca1212
to
536c705
Compare
const { currentEnvironment } = useEnvironment(); | ||
const query = useQuery<{ data: { name: string }[] }>({ | ||
queryKey: [QueryKeys.fetchWorkflow, currentEnvironment?._id], | ||
queryFn: async () => await getV2(`/environments/${currentEnvironment!._id}/tags`), |
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 move it to the API helper function, then we won't need to do data.data
when using the query hook
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 don't think this is correct. If it's a useTagsQuery
hook, then you should get back whatever was in the body, right? If data
doesn't make sense, then that's a BE concern I guess.
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.
merged in order to get the import changes in. If you feel strongly about this, let's discuss privately.
536c705
to
9504e0a
Compare
What changed? Why was the change needed?
Screenshots
2024-10-21.12-05-24.mp4
Expand for optional sections
Related enterprise PR
Special notes for your reviewer