-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Move kibana-ui-framework into kibana repo. #8867
Comments
Re: the package.json question, I'm +1 for the root |
Once you're part of Kibana you're part of the |
@ycombinator Can we take that a step further an enumerate the negative effects this would have? Let's lay out the benefits and liabilities each option has and base our decision on that. |
@cjcenizal Sure, I imagine the negative is that there's too many dependencies in the root |
++ on moving the code to Kibana repo, great stuff. All docs go on |
@ycombinator I'm also wondering what are the negative effects of setting a precedent where some sub-folders have their own |
Only that there are now multiple places to look for dependencies. Probably just a personal choice that I prefer to look in a single place, though. So even if we went with separate |
In case it wasn't clear from my earlier comment, I don't have strong opinions here. In hindsight I probably shouldn't have commented at all 😄. I'd be absolutely fine going with whatever approach is chosen. |
In the past, the team has chosen to create separate repositories to maintain isolation. I am in favor of moving this into the Kibana repository, but we need to figure out how to maintain isolation and not end up with hundreds of direct dependencies. One example I have seen of this being handled is using Lerna. It's a simple concept, and really the package helps with publishing and linking libraries. One issue I do see is because we have a top-level package.json with all our Kibana dependencies, we would need to make sure there is not any leak to the @spalger previously mentioned he has not had much luck with this approach in the past. Maybe he can clarify. |
The solution to the problem of "hundreds of direct dependencies" is to have fewer dependencies. Every single dependency we add to the project is baggage - sure, it's a single line to add a new dependency to a package.json, but that single line is simply obfuscating the reality that Kibana is now however-many-lines-were-in-that-dependency more complicated than it was before. Making it easier to add dependencies or have different versions of the same dependencies in the project isn't a feature, it's a problem. Beyond being philosophically contrary to how we want to build Kibana, multiple package.jsons introduce other issues: Installing or updating Kibana dependencies is now multiple commands, which is just downright annoying. Different parts of our code could be relying on different versions of the same dependency, which increases the cognitive overhead of working on different parts of the codebase, and it increases the payload size of our bundles. We could use or build abstractions on top of npm to handle things like installing/updating dependencies across the project, keeping dependency versions in check when they are used in multiple places, or flattening the overall module tree based on the sum of all of the dependency trees across the various directories, but what justifies that added complexity? Where is the benefit? |
@epixa, thanks for the good points. We discussed this as a group and worked out some solutions to the challenges of moving to a single How to use a single
|
@cjcenizal @epixa @debadair I think it's worthwhile noting that we don't yet have a natural place to put Kibana developer-facing docs in the current Kibana guide. We have a plugin users section (installing/updating/removing plugins): https://www.elastic.co/guide/en/kibana/current/kibana-plugins.html So this feels like either a net-new section in existing Kibana docs (the way Logstash docs do it) or a whole new "book" for plugin developers (the way Elasticsearch does it). |
I think a separate set of docs is the way to go here, like the ES docs. |
Addressed by #9192 |
Benefits
Decisions
After discussion with @spalger, @w33ble, and @epixa, we made the following decisions:
Deploy docs to GitHub page
In an ideal world, we can deploy all development-related resources to our GitHub page (elastic.github.io/kibana), e.g. UI Framework docs, API docs, plugin development docs, JSDocs.
For the time being, this can just consist of the UI Framework docs.
If we change our minds and decide we need to deploy to the Elastic domain, we should talk to the infra team.
devDependency licenses are a non-issue
The UI Framework has some devDependencies (e.g. node-sass) which have dependencies that don't have supported licenses (e.g. "Unlicense"). This won't affect us, since these don't make it into our distributed builds.
The Kibana UI is for Kibana only
In other words, it won't be used in any other product. It won't be used in other products because they're so distinct that any benefits gained from shared CSS would be negligible, and possibly restrict development.
Kibana UI code goes into
src/ui-framework
The code that consumes it lives in src, so it makes sense to group them together.
Outstanding questions
1 package.json or 2?
The UI Framework encapsulates documentation which is built using dependencies that are not used by the Kibana web app. Should Kibana UI have its own package.json to define these dependencies? Or should we group all dependencies together in the root package.json?
The text was updated successfully, but these errors were encountered: