I agree with pattrick, at first time when we made the prove of concept
version to make Networkmonitor run on the browser, we test it in separate
project, so all dependency files are required to be out of m-c. Now we can
run Networkmonitor in m-c and have enough experience to revisit if we can
do better on file duplicating issue.
Here is the suggest approach to reduce maintenance in 2 places
(devtools-core and m-c), mainly related to netmonitor
- If the module/file is used in debugger.html, we will use webpack alias
(ex: context menu), those files are necessary for debugger.html so we
should not move them back to m-c at this moment
- Review netmonitor related patches to devtools-core
<
https://github.com/devtools-html/devtools-core/pull/291/files>
- ex:
https://github.com/devtools-html/devtools-core/pull/291,
https://github.com/devtools-html/devtools-core/pull/290
<
https://github.com/devtools-html/devtools-core/pull/291/files>
-
We will remove and use webpack alias if the patch in devtools-core
only contains some path change
- We will move mock/shim used only by netmonitor back to
`netmonitor/src/utils/shim`
- Since we can use webpack alias to point file path in m-c, added a
package.json file in m-c to publish those things to npm are not necessary
I can imagine only a few files will still live in devtools-core. For longer
term about shared components in devtools-core (tree, tab, that only used by
netmonitor now), I think it might worth to keep them in `devtools-core`
instead of put a separate launchpad compatible version in
`m-c/client/shared/components`, devtools-core should be the place that
developers could found all shared components among Devtools. Extension
developers can reuse those components to build their panel extensions.
regards
--
Fred
2017-04-11 22:37 GMT+08:00 Patrick Brosset <
pbro...@mozilla.com>:
> Hi folks!
>
> So I went through some of the modules from Honza's doc:
>
https://docs.google.com/document/d/17VX8T1QyfhAfLa9vSLSNEpzi
> nvl6nZEbVq5KhqkHwDk/edit#
> There might be more than this, but so far, the ones that I found are only
> used in m-c are:
> - the tree table widget (client/shared/components/tree)
> - search-box (client/shared/components/search-box)
> - stack-trace (client/shared/components/stack-trace)
> - Chart.js (client/shared/widgets/Chart)
> - Curl.js (client/shared/Curl)
> - File-saver.js (client/shared/File-saver)
>
> maybe others.
>
> So, maybe there's a way to prevent duplicating these specific files, as
> suggested in my last reply to the forwarded thread:
> What if we removed these things from devtools-core, just kept the ones in
> m-c, and added a package.json file in m-c to publish those things to npm,
> so that netmonitor in launchpad can use them?
>
> This would get rid of a lot of duplicated code, which would be great!
>
> Let me know how this sounds.
>
> Patrick
> --
> You received this message because you are subscribed to the Google Groups
> "Netmonitor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
netmonitor+...@mozilla.com.
> To post to this group, send email to
netmo...@mozilla.com.
> To view this discussion on the web visit
https://groups.google.com/a/mo
>
zilla.com/d/msgid/netmonitor/CABcuYMDQiEwXiNtprBrmbJsfkrZDnW
> OobmChsuJspLovk%3D_QUg%
40mail.gmail.com
> <
https://groups.google.com/a/mozilla.com/d/msgid/netmonitor/CABcuYMDQiEwXiNtprBrmbJsfkrZDnWOobmChsuJspLovk%3D_QUg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>