From 42b35844930ee82a6fa2d1feeb4ed95745848204 Mon Sep 17 00:00:00 2001 From: 0x009922 Date: Thu, 24 Aug 2023 11:27:21 +0700 Subject: [PATCH] Display the compatibility matrix (#356) * [feat]: impl basic compat matrix functionality Signed-off-by: Dmitry Balashov * [build]: replace compat matrix URL with a deployed one Signed-off-by: Dmitry Balashov * [docs]: add TODO to the README Signed-off-by: Dmitry Balashov * [build]: specify prod service url Signed-off-by: Dmitry Balashov * [feat]: impl basic compat matrix functionality Signed-off-by: Dmitry Balashov * [build]: replace compat matrix URL with a deployed one Signed-off-by: Dmitry Balashov * [docs]: add TODO to the README Signed-off-by: Dmitry Balashov * [build]: specify prod service url Signed-off-by: Dmitry Balashov * [docs]: add SDK Compatibility Matrix to Language-specific guides Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com> * [docs]: add Compatibility Matrix description to README Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com> * [docs]: add new ENV var in the README Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com> * [docs]: update README instruction Signed-off-by: Dmitry Balashov * [refactor]: enhance compat-matrix presentation with icons Signed-off-by: Dmitry Balashov * [chore]: refine lints Signed-off-by: Dmitry Balashov * Emplace note as `::: info` block Co-authored-by: Ekaterina Mekhnetsova Signed-off-by: Aleksandr Petrosyan --------- Signed-off-by: Dmitry Balashov Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com> Signed-off-by: Aleksandr Petrosyan Co-authored-by: astrokov7 <111361420+astrokov7@users.noreply.github.com> Co-authored-by: Aleksandr Petrosyan Co-authored-by: Ekaterina Mekhnetsova --- .env | 1 + .vitepress/config.ts | 4 + .../components/CompatibilityMatrixTable.vue | 105 ++++++++++++++++++ .../CompatibilityMatrixTableIcon.vue | 48 ++++++++ .../icons/IconCancelOutlineRounded.vue | 19 ++++ .../theme/components/icons/IconCheck.vue | 6 +- .../icons/IconQuestionMarkRounded.vue | 19 ++++ .vitepress/theme/index.ts | 9 ++ README.md | 12 ++ src/guide/compatibility-matrix.md | 20 ++++ 10 files changed, 240 insertions(+), 3 deletions(-) create mode 100644 .vitepress/theme/components/CompatibilityMatrixTable.vue create mode 100644 .vitepress/theme/components/CompatibilityMatrixTableIcon.vue create mode 100644 .vitepress/theme/components/icons/IconCancelOutlineRounded.vue create mode 100644 .vitepress/theme/components/icons/IconQuestionMarkRounded.vue create mode 100644 src/guide/compatibility-matrix.md diff --git a/.env b/.env index 4909413d8..b20e07093 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ VITE_FEEDBACK_URL=https://164.92.190.45/feedback/form +VITE_COMPAT_MATRIX_URL=https://docs-compat.iroha2.tachi.soramitsu.co.jp/compat-matrix diff --git a/.vitepress/config.ts b/.vitepress/config.ts index de7c63c89..19fd05077 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -94,6 +94,10 @@ function getGuideSidebar(): DefaultTheme.SidebarItem[] { text: 'JavaScript', link: '/guide/javascript', }, + { + text: 'Compatibility Matrix', + link: '/guide/compatibility-matrix', + }, ], }, ], diff --git a/.vitepress/theme/components/CompatibilityMatrixTable.vue b/.vitepress/theme/components/CompatibilityMatrixTable.vue new file mode 100644 index 000000000..3fc99f369 --- /dev/null +++ b/.vitepress/theme/components/CompatibilityMatrixTable.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/.vitepress/theme/components/CompatibilityMatrixTableIcon.vue b/.vitepress/theme/components/CompatibilityMatrixTableIcon.vue new file mode 100644 index 000000000..1d5098043 --- /dev/null +++ b/.vitepress/theme/components/CompatibilityMatrixTableIcon.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/.vitepress/theme/components/icons/IconCancelOutlineRounded.vue b/.vitepress/theme/components/icons/IconCancelOutlineRounded.vue new file mode 100644 index 000000000..a5d9456b1 --- /dev/null +++ b/.vitepress/theme/components/icons/IconCancelOutlineRounded.vue @@ -0,0 +1,19 @@ + + + diff --git a/.vitepress/theme/components/icons/IconCheck.vue b/.vitepress/theme/components/icons/IconCheck.vue index 407754632..41b18236a 100644 --- a/.vitepress/theme/components/icons/IconCheck.vue +++ b/.vitepress/theme/components/icons/IconCheck.vue @@ -7,13 +7,13 @@ > - diff --git a/.vitepress/theme/components/icons/IconQuestionMarkRounded.vue b/.vitepress/theme/components/icons/IconQuestionMarkRounded.vue new file mode 100644 index 000000000..1622035e3 --- /dev/null +++ b/.vitepress/theme/components/icons/IconQuestionMarkRounded.vue @@ -0,0 +1,19 @@ + + + diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 2ffc0b8d3..e923fafdb 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -7,11 +7,20 @@ import MermaidRenderWrap from './components/MermaidRenderWrap.vue' import 'virtual:uno.css' import './style/index.scss' +import { defineAsyncComponent } from 'vue' export default { ...ThemeDefault, Layout: LayoutCustom, enhanceApp({ app }: EnhanceAppContext) { app.component('MermaidRenderWrap', MermaidRenderWrap) + app.component( + 'CompatibilityMatrixTable', + defineAsyncComponent(() => import('./components/CompatibilityMatrixTable.vue')), + ) + app.component( + 'CompatibilityMatrixTableIcon', + defineAsyncComponent(async () => import('./components/CompatibilityMatrixTableIcon.vue')), + ) }, } diff --git a/README.md b/README.md index 355d23f89..02e3b76e3 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,18 @@ When a user submits the form, a simple POST request with a JSON body is sent to This variable will be picked up by the application during dev/build mode. Read more about it in the [Vite documentation](https://vitejs.dev/guide/env-and-mode.html). +### Compatibility matrix + +**Note:** configuring this is **required**. + +The SDK Compatibility Matrix provides an insightful look into the interoperability of various stories across multiple SDKs within Hyperledger Iroha 2. + +The underlying data for the matrix is sourced from a [backend service](https://github.com/soramitsu/iroha2-docs-compat-matrix-service), ensuring low-latency response with preprocessed data. To configure access to the service (e.g. deployed at `https://docs-compat.iroha2.tachi.soramitsu.co.jp`), set the following environment variable: + +``` +VITE_COMPAT_MATRIX_URL=https://docs-compat.iroha2.tachi.soramitsu.co.jp/compat-matrix +``` + ## License Iroha documentation files are made available under the Creative Commons diff --git a/src/guide/compatibility-matrix.md b/src/guide/compatibility-matrix.md new file mode 100644 index 000000000..419f75bde --- /dev/null +++ b/src/guide/compatibility-matrix.md @@ -0,0 +1,20 @@ +# Compatibility Matrix + +In our continuous efforts to provide clear documentation and to ensure seamless compatibility across multiple SDKs, +we present the **SDK Compatibility Matrix**. This matrix provides an instantaneous overview of how different stories, +sourced from TestOps API, fare across varying SDKs. + +The matrix consists of: + +- **Stories**: Represented in the first column of the matrix, these are directly fetched from the TestOps API. +- **SDKs**: Each subsequent column represents an SDK, such as "Java/Kotlin", "JavaScript", "Swift", etc. +- **Status Symbols**: The status of each story for an SDK is denoted with: + - indicating the story passed. + - indicating the story failed to pass. + - indicating the data is missing. + + + +::: info +The data for this matrix is retrieved dynamically from our [backend service](https://github.com/soramitsu/iroha2-docs-compat-matrix-service), balancing the latest information with a swift response for documentation readers. +:::