opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.65k stars 867 forks source link

[Docs] OpenSearch Dashboards documentation gaps #2132

Open ashwin-pc opened 2 years ago

ashwin-pc commented 2 years ago

OpenSearch Dashboards documentation gaps

This is just my take on some of the documentation gaps that we have. Would love to start a discussion on the topics and how we can address them incrementally. This outlines some of the gaps in documentation we have today, both in the form of readme's within the repo and as a separate doc site.

Table of contents

Architecture

Development

We have gaps in core developer docs too but I am not going to cover this here because its goal is slightly different from documenting whats under the hood for OSD.

Some important topics here however are:

Core (./src/core)

Plugins

We need a high level readme for the plugins folder (./src/plugins) that oulines the general structure of the plugins folder and also the different types of plugins that someone can use as a quick reference if they are trying to build something or do something similar. Some of the things we need to cover here are:

Some of the things we need to do for core plugins

Some categories for the plugins can be: (More input appreciated here)

Plugin list:

Sample readme for a plugin

# Plugin_name

Category: application, service, helper etc

Brief description of what it does

## Usage

How to use the plugin, ideally with code snippets or links to example plugins in `./examples` with instructions on how to use them.

#```
Code snippets
#```

## Setup Contract
We need this in the readme because sometimes it is quite hard to tell from the `plugin.ts` file what the start and setup contracts look like. e.g. `src/plugins/visualize/public/plugin.ts`

## Start Contract

Packages

We need similar to plugins a high level Readme (We already have one but it does not cover some important points) with the following information:

Similar to plugins, each of the packages should also have a readme e.g. packages/osd-pm/README.md

List of packages:

Package Audit Readme
opensearch-datemath x x
opensearch-eslint-config-opensearch-dashboards x
opensearch-safer-lodash-set x
osd-ace x Deprecation path
osd-analytics x x
osd-apm-config-loader x Needs more info
osd-babel-preset Why we need this
osd-config More info
osd-config-schema Custom config validation apparently for better security. Not sure if that is srtill true since no one is actively looking at this for vulnerabilities
osd-dev-utils x x
osd-eslint-import-resolver-opensearch-dashboards x
osd-eslint-plugin-eslint x
osd-expect Do we still need this?
osd-i18n
osd-interpreter x x
osd-logging Need a future path here
osd-monaco A lil more info would help here
osd-opensearch
osd-opensearch-archiver x x
osd-optimizer
osd-plugin-generator Add release instructions here
osd-plugin-helpers
osd-pm
osd-spec-to-console
osd-std x
osd-telemetry-tools x
osd-test Path forward
osd-test-subj-selector x
osd-ui-framework (Deprecated) Path forward
osd-ui-shared-deps More info appreciated
osd-utility-types Do we need this
osd-utils x

Audit: Check to see if this is necessary, or deep-dive into what it does Readme: Readme is either missing or does not have enough information

The readme's here too can have a sample template similar to the plugins for consistency

Testing

Unit testing

given the current plugin architecture, additional docs for unit testing are required so that it is easier write these tests to avoid bad testing patterns or unnecessary duplicate mocks

Functional testing

Currently functional testing is a pain. While this needs to be improved, good docs can go a long way in making it easier to write these tests.

Miscellaneous

Other miscellaneous documentation gaps

Docker

ashwin-pc commented 2 years ago

Suggested approach to fill in these gaps:

vagimeli commented 2 years ago

@ashwin-pc Let's sync to discuss content strategy and development.