Closed Bug 1406415 Opened 2 years ago Closed 2 years ago

Experiment having a devtools-components bundle

Categories

(DevTools :: Shared Components, enhancement, P4)

enhancement

Tracking

(firefox57 fix-optional, firefox58 affected)

RESOLVED WONTFIX
Tracking Status
firefox57 --- fix-optional
firefox58 --- affected

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

In devtools-components, we have react components that might interest m-c consumers. For now there is only a tree, but maybe we could migrate shared component there so tools outside m-c would be able to use them, and they would be synced back to m-c.

I still have some concerns about that, this is why this bug should only be an experiment.


Gabriel made me do it
Flags: needinfo?(gl)
We need to be careful about the dependency management if we do this. The tree component is already used by reps (and indirectly by the debugger via reps). 

I suppose the plan here is to vendor devtools-components to m-c but keep bundling it in reps? Otherwise we would have to make sure reps and m-c always can use the same version of devtools components.
(In reply to Julian Descottes [:jdescottes][:julian] from comment #2)
> We need to be careful about the dependency management if we do this. The
> tree component is already used by reps (and indirectly by the debugger via
> reps). 
> 
> I suppose the plan here is to vendor devtools-components to m-c but keep
> bundling it in reps? Otherwise we would have to make sure reps and m-c
> always can use the same version of devtools components.

Yes, it would still be bundled in devtools-reps bundle. At some point, I guess we'll figure out a cleaner way to do this (with the mono-multi repo thing)
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Comment on attachment 8916026 [details]
Bug 1406415 - Create a devtools-components bundle; .

https://reviewboard.mozilla.org/r/187294/#review214560
Attachment #8916026 - Flags: review?(gl) → review+
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61ec86ef441a
Create a devtools-components bundle; r=gl.
I am a bit concerned with the approach here. Having a devtools-components bundle effectively means that at runtime devtools will use 3 different versions of the tree component:
- one version in the debugger that bundles reps that bundles components
- one version in reps that bundles components
- one version in components

That means essentially one thousand lines of duplicated code + different runtime versions which might have different behaviors and bugs. 

Could we think about having reps + components in the same bundle instead here?
Clearing needinfo since: 1. eslint failures were fixed (file added to eslintignore) 2. the patch is on hold until the RFC is discussed
Flags: needinfo?(nchevobbe)
Flags: needinfo?(gl)
Closing this bug (at leat for now), since the Tree component does not fit the needs of the markup view.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.