-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support matching suggestions on spacebar #1
Conversation
78992a6
to
62b6d28
Compare
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't you just point npm to a subfolder of a github repo?
like:
github:stocktwits/draft-js-plugins/draft-js-mention-plugin ?
I would prefer not installing the whole repo as a runtime dependency everywhere :(
nevermind, you can't: npm/npm#2974 |
fun fact, that issue for npm is 7 years old, so I don't think anything will change soon. |
@ndrjkvc Anyhow, if we just want to move on, you would have to install the whole draft-js-plugins and if you want to use your built library should be able to just include: |
That does not work, the plugins subfolders are empty after draft-js-plugins install (not really empty, they contain changelog, license, and readme) |
But there may be something we can write into package.json to let npm know it should download that folder fully. @szist |
62b6d28
to
005e987
Compare
you should add/create a .npmignore file, so that it doesn't use the .gitignore to remove all libs. See https://github.com/stocktwits/web-shared/blob/develop/.npmignore vs https://github.com/stocktwits/web-shared/blob/develop/.gitignore |
66b2398
to
412284a
Compare
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.
do we still need the lib/*.js in git and the files
in package.json ?
eabb5c0
to
7fa4455
Compare
No. 🎉 |
7fa4455
to
60d66df
Compare
Use-case/Problem
draft-js-plugins#1048
Implementation
Pass a matching function(with suggestions and lastSearchValue as arguments) from config as a prop to MentionSuggestions component. Use this function after spacebar is pressed to find a matching solution if there is one.