Open
Bug 1310774
Opened 8 years ago
Updated 8 months ago
Make JSON viewer use shared search-box component
Categories
(DevTools :: JSON Viewer, defect, P3)
DevTools
JSON Viewer
Tracking
(Not tracked)
NEW
People
(Reporter: ntim, Unassigned)
Details
Attachments
(1 file)
6.27 KB,
patch
|
Details | Diff | Splinter Review |
Use devtools/client/shared/components/search-box.js instead of devtools/client/jsonview/components/search-box.js
Updated•8 years ago
|
Priority: -- → P2
Comment 1•8 years ago
|
||
When I import the search-box component (const SearchBox = require("devtools/client/shared/components/search-box");), I get the error: Error: Module name "devtools/client/shared/key-shortcuts" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded key-shortcuts is part of the search-box component, but wrapping the search-box module in define(function (require, exports, module) {} doesn't solve the issue (it only generates similar errors for other modules further in the dependency chain)...
Flags: needinfo?(odvarko)
Comment 2•8 years ago
|
||
@Dalimil: can you please attach your patch so, I can try it? Honzas
Flags: needinfo?(odvarko)
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(dalimilhajek)
Comment 3•8 years ago
|
||
Flags: needinfo?(dalimilhajek)
Attachment #8813444 -
Flags: feedback?(odvarko)
Comment 4•8 years ago
|
||
Thanks for the patch Dalimil. So yes, the module "devtools/client/shared/key-shortcuts" (+ all the other modules it requires) are not ready for being loaded through RequireJS. I am not sure if wrapping all the modules (key-shortcuts, event-emitter, keycodes) within `define()` function is the right way to go. Plus also, key-shortcuts.js is requiring an extra "Services" module. There are also following options: 1) Time to use webpack.config for JSON Viewer? Does it solve the issue entirely? What about the "Services" module? 2) Do not explicitly require KeyShortcuts in the search-box component, but pass it in. We might have a helper that does that. Brian, any tips? Honza
Flags: needinfo?(bgrinstead)
Comment 5•7 years ago
|
||
Sorry for missing this request. If we can work around this with (2) that seems ideal, since it'd be less work and we won't need to check in a bundle / load duplicate modules
Flags: needinfo?(bgrinstead)
Comment 6•7 years ago
|
||
Comment on attachment 8813444 [details] [diff] [review] Bug1310774.patch - rev1 Just removing feedback request (already answered) Honza
Attachment #8813444 -
Flags: feedback?(odvarko)
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•