-
Notifications
You must be signed in to change notification settings - Fork 530
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
Extract TracePage components [Subtask] #508
Comments
@everett980, @aocenas you might also consider creating a new package / yarn workspace which holds the components that are to be broken out. A few potential upsides:
On a side note, if the components are kept in jaeger-ui, I recommend simply adding an independent build for the separated components. create-react-app is just not a malleable thing. Also, will these be published as NPM packages or will folks need to checkout the repo in order to make use of the components? I'm very excited to keep up with this work and see how things shake out. LMK if I can facilitate. |
@tiffon, great points about making a separate work space. In short, we would move If global state is to be removed from
If it is a separate workspace, then it probably should be a separate NPM package. |
Hey @tiffon and @everett980, thanks for the input and sorry for a bit of delay on my side, was a bit preoccupied lately.
That was what I had in mind so I would say yes to both. Otherwise it would be awkward to use it for Grafana.
Again almost exactly what I had in mind. Probably only thing would be whether to have Don't have much to say about the particulars of removing redux from |
Good point @aocenas. It shouldn't be too much harder to build |
Started pushing some PRs for this. I want to push a bit smaller PRs to prepare the codebase first as doing both move and change is usually hard to diff and I think this way it will be easier for each PR to be reviewed and get more granular feedback. Let me know if you have some other preference though. |
Small PRs are absolutely the preference. Thanks! |
Grafana decided to do their own fork to reskin, so I am closing this out. |
Requirement - what kind of business use case are you trying to solve?
Subtask from #507
Problem - what in Jaeger blocks you from solving the requirement?
Proposal - what do you suggest to solve the problem or improve the existing situation?
Way to extract this depends on what is required to be importable. For Grafana use case we only need part of the Trace page seen in red rectangle:

This means toolbar and archiving components can be either hide-able by props or we could go the route of providing separate more low level components directly like Toolbar, Minimap, TimelineView, GraphView etc to be composed into an application as needed.
(@everett980): I expect this to be the comparatively straightforward part of this effort, however we will need to be mindful of the contract that gets created.
Global dependencies like redux and url state can be worked around by exporting both "connected" and "Impl" (implementation) forms of components, as done/consumed for Deep Dependency Graphs, and then adding a build process to create a standalone file for each desired "Impl" component. Some cleanup will be necessary for TracePage and its subcomponents, and the types should be significantly tightened for these use cases.
Fortunately, tracking is already configurable and off by default.
I think having a mixed connected and unconnected components can be avoided especially if lower level components are exposed. Redux (or other state management) can be left as a concern for the final application. If there is need to sidestep deep props passing, react context api could be used instead to have a localized and separated state management.
Another consideration is Antd component library dependency which may seem as too big dependency for such a package and also contains some global style overrides. This overlaps a bit with theme-ability.
Any open questions to address
The text was updated successfully, but these errors were encountered: