-
Notifications
You must be signed in to change notification settings - Fork 22
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
#688 New Autosuggest component for SelectorSelectorField #1059
Conversation
…nd options buttons
…e a console.debug() call to just a code comment in error catch block
We're getting warnings/deprecations during the initial Webpack build coming from bootstrap. @fregante do you have any experience with TypeScript + CSS Modules (this PR is also starting our evaluation of CSS modules)
|
src/Globals.d.ts
Outdated
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
declare module "*.module.css"; |
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.
@BLoe Are these declarations missing something?
The documentation has more: https://github.com/mrmckeb/typescript-plugin-css-modules#custom-definitions
I think this should probably also help with the IDE autocomplete issue you were seeing?
declare module "*.module.css" {
const classes: Record<string, string>;
export default classes;
}
declare module "*.module.scss" {
const classes: Record<string, string>;
export default classes;
}
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 wasn't sure what those extra parts were doing, and those lines only seemed to appear in some of the guides I looked at. I am not really seeing any difference when I add those lines and re-build though. They aren't related to the Sass warnings or anything.
That's a sass error: https://stackoverflow.com/q/57455245/288906 Also: sass/sass#1687 And more specifically this seems to be a bootstrap issue and their "solution" seems to be to use |
Yep - I was curious as to why we weren't seeing it before. It seems related to using @BLoe Are these files now getting compiled when they hadn't been before? I would they they were getting compiled before too |
This comment has been minimized.
This comment has been minimized.
Oh I see what's happening. I assumed that this issue was already solved: It wasn't happening because we are using |
@fregante @twschiller The typescript plugin has an open issue about removing the It looks like there are other plugins available to accomplish what we're trying to do here, so I'm going to investigate using a different one. |
IMHO it's a "bug" we should resolve or learn to live with since we'll end up switching to Also it's just a warning and doesn't affect the actual build, I think. |
Yeah, I mean, for that it sounds like we need to consider updating to the latest bootstrap version, right? |
src/devTools/editor/fields/creatableAutosuggest/CreatableAutosuggest.tsx
Outdated
Show resolved
Hide resolved
src/background/devtools/protocol.ts
Outdated
); | ||
|
||
export const disableSelector = liftBackground( |
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.
This does the same thing as disableOverlay above? What's the point of having both?
- Remove duplicate method
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.
This fixes #688
This change includes several things:
Replaces
react-select
withreact-autosuggest
in theSelectorSelectorField
component, wrappingreact-autosuggest
with a new component -CreatableAutosuggest
- and passing in a small list item component -SelectorListItem
- fromSelectorSelectorField
Sets up storybook examples for
SelectorListItem
andCreatableAutosuggest
:and then we can import and use the module css styles like this: