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/slash command #145

Merged
merged 16 commits into from
Oct 23, 2023
Merged

Feat/slash command #145

merged 16 commits into from
Oct 23, 2023

Conversation

avitorio
Copy link
Owner

@avitorio avitorio commented Oct 12, 2023

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have a helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2023

🦋 Changeset detected

Latest commit: f85de60

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
outstatic-canary 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 1:54pm
outstatic-dev-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 1:54pm
outstatic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 1:54pm

@vercel
Copy link

vercel bot commented Oct 17, 2023

Deployment failed with the following error:

Resource is limited - try again in 2 hours (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented Oct 17, 2023

Deployment failed with the following error:

Resource is limited - try again in 1 hour (more than 100, code: "api-deployments-free-per-day").

Copy link
Collaborator

@ZiyadBoshima ZiyadBoshima left a comment

Choose a reason for hiding this comment

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

Hey Andre,
once again, the slash command is a really nice feature.

The problem with it at the moment is that using the keyboard to access the add image url option does not work. Pressing "Enter" on "Image from URL" does not work from the first try. It seems like pressing arrow down, or up, will cycle through the original list of commands rather than the two commands "Image Upload" and "Image from URL".

Also, onKeyDown property in the "button" element (see ImageCommandList) is never triggered. The onKeyDown function is scoped inside of useEffect, so you cannot use it outside of the scope. And speaking of useEffect, the if conditions for "Enter" is not triggered in SlashCommand for normal commands inspite of the commands working.

I have tested this with the Brave browser (similar to chrome) and Firefox. Both have the same problem.

I am providing you with a video showing how to reproduce the problem. You have to press arrow down for about 10 times to actually have the Image URL tab work. If you press down twice, ending up back in Image Upload, and press enter, image upload wont work because you cycled to the next item (one of the normal commands outside of the Image command).

outstatic-slash-command-bug.mp4

@avitorio
Copy link
Owner Author

@ZiyadBoshima I think this is fixed with the last commit. Thank you so much for going over this. I was testing the slash command option by typing /image and that seemed to work properly. The new commit takes care of the issue you were facing and also adds "Esc" support to go back to the main slash command menu.

I still need to update our documentation to use the slash command.

@vercel vercel bot temporarily deployed to Preview – outstatic-web October 20, 2023 16:47 Inactive
@vercel vercel bot temporarily deployed to Preview – outstatic-web October 20, 2023 21:09 Inactive
@vercel vercel bot temporarily deployed to Preview – outstatic-web October 23, 2023 13:54 Inactive
@ZiyadBoshima ZiyadBoshima merged commit 837ef64 into canary Oct 23, 2023
3 checks passed
@ZiyadBoshima ZiyadBoshima deleted the feat/slash-command branch October 23, 2023 13:56
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.

None yet

2 participants