-
Notifications
You must be signed in to change notification settings - Fork 114
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
Implement Webhook Utility #633
Conversation
🚀 Deployed on https://6408c1956eb2b26a330dceed--grammy.netlify.app |
I created a new dedicated page for this component and added a link to it in the "Resources" menu in the navbar. |
|
It's loading the bot's picture. I don't think it's able to handle a bot not having a picture. I'll fix that.
I can't really validate the token without calling the API, and I'm not sure if it's a good idea to do that on every typed character, but if you think it's fine, I can implement it no problem
No, not really. I forgot about that part. I'll add it ASAP
I agree. Will do.👍🏻
The component framework already has one built-in, but I couldn't figure out how to detect that the user changed the overall page theme
I agree.
Should we do this on a new PR after this one gets merged? |
I do think it's fine. Note that tokens are usually pasted, so most often there will only be a single request. Even if there are a few hundred requests, it shouldn't be much of an issue.
There's https://github.com/vuepress/vuepress-next/blob/d283ffe3ef0668bfea54e6d973066695f46f13c0/ecosystem/theme-default/src/client/composables/useDarkMode.ts but it doesn't seem to be available to the outside. We can check the DOM manually, but that's ugly. Perhaps @Loskir or @CikiMomogi know this?
That depends on whether or not we even want to keep it on a dedicated page. Note that #635 was closed. @roj1512 what do you think? |
site/docs/.vuepress/components/webhook-util/translations/en_US.ts
Outdated
Show resolved
Hide resolved
site/docs/.vuepress/components/webhook-util/translations/en_US.ts
Outdated
Show resolved
Hide resolved
site/docs/.vuepress/components/webhook-util/translations/en_US.ts
Outdated
Show resolved
Hide resolved
site/docs/.vuepress/components/webhook-util/translations/en_US.ts
Outdated
Show resolved
Hide resolved
site/docs/.vuepress/components/webhook-util/translations/en_US.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Roj <[email protected]>
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.
Can you make the preview work somehow?
On it. I saw it was failing after I requested your review. |
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.
The cursor for the disabled checkboxes should be either default
or not-allowed
, not pointer
.
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.
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.
}, | ||
fields: { | ||
token: { | ||
label: "Bot Token", |
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.
label: "Bot Token", | |
label: "Bot token", |
}, | ||
}, | ||
buttons: { | ||
loadBotInfo: "Load Bot Info", |
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.
Is this string used?
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.
Not anymore, no.
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.
Remove it then.
I have some more feedback. All of these ideas are optional and won't block from merging. You're free to decide if you want to do them here or in a subsequent PQ or not at all.
|
Closing due to inactivity and in favor of grammY tools. |
Wouldn't it still be awesome to have a webhook utility component that can be included in the respective guides? IMO it is much preferable to write docs that go like you gotta set your token, have a tool for that, look: [TOOL] rather than you gotta set your token, you can do this via curl or your browser or this other website over there which we created, it is called tools.grammy.dev and it is very good but no matter what you do you always have to leave this site and your train of thought |
I agree it's better to have something inline, but I'll open another PQ with the grammy tools version of the component, since it doesn't depend on a UI framework and the design should work better in the docs |
Awesome! |
Thanks for proving what I assumed as a YES @roziscoding. |
Successor to #523
Layout preview: