Skip to content

DOP-5507: sample for custom composables #240

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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,57 @@ kafka-connector = ["v1.9", "v1.8", "v1.7", "v1.6", "v1.5", "v1.4", "v1.3", "v1.2
golang = ["v1.10", "v1.9", "v1.8", "v1.7"]
java = ["v4.6", "v4.5", "v4.4", "v4.3"]
php-library = ["v1.15", "v1.13", "v1.12", "v1.11", "v1.10", "v1.9", "v1.8", "v1.7", "v1.6", "v1.5", "v1.4", "v1.3", "v1.2", "v1.1"]


[[composables]]
id = "operator"
title = "Operator"
default = "queryString"
options = [
{id = "queryString", title = "queryString"},
{id = "autocomplete", title = "autocomplete"}
]

# merging existing
[[composables]]
id = "cloud-provider"
title = "Operator"
default = "aws"
options = [
{id = "aws", title = "new aws title"},
{id = "aws2", title = "aws2"}
]

# overwrite dependencies
[[composables]]
id = "language"
title = "Language"
default = "cpp"
options = []

# [[composables]]
# # missing id
# # missing title
# default = "queryString"
# options = [
# {id = "queryString", title = "queryString"},
# {id = "autocomplete", title = "autocomplete"}
# ]


# [[composables]]
# id = "operator2"
# title = "Operator2"
# # works without default
# options = [
# {id = "queryString", title = "queryString"},
# {id = "autocomplete", title = "autocomplete"}
# ]

# [[composables]]
# id = "operator3"
# title = "Operator3"
# options = [
# {id = "queryString"}, # missing title
# {title = "autocomplete"} # missing id
# ]
97 changes: 97 additions & 0 deletions source/composable-tutorials.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
=====================================
Example page with Composable Tutorial
=====================================

.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

.. composable-tutorial::
:options: interface, language, deployment-type, operator
:defaults: driver, nodejs, atlas, queryString

.. selected-content::
:selections: driver, nodejs, atlas, queryString

This content will only be shown when the selections are as follows:
* Interface - Drivers
* Language - NodeJS
* Deployment Type - Atlas
* Operator (custom snooty.toml) - queryString

.. selected-content::
:selections: driver, c, atlas, queryString

This content will only be shown when the selections are as follows:
* Interface - Drivers
* Language - C
* Deployment Type - atlas
* Operator (custom snooty.toml) - queryString

.. selected-content::
:selections: driver, cpp, atlas, autocomplete

This content will only be shown when the selections are as follows:
* Interface - Drivers
* Language - CPP
* Deployment Type - atlas
* Operator (custom snooty.toml) - autocomplete


.. selected-content::
:selections: atlas-admin-api, None, atlas, queryString

This content will only be shown when the selections are as follows:
* Interface - Atlas Admin API
* Deployment Type - atlas
* Operator (custom snooty.toml) - queryString

.. selected-content::
:selections: atlas-admin-api, None, atlas, autocomplete

This content will only be shown when the selections are as follows:
* Interface - Atlas Admin API
* Deployment Type - Atlas
* Operator (custom snooty.toml) - autocomplete

.. selected-content::
:selections: atlas-admin-api, None, self, autocomplete

This is a title under selected content
--------------------------------------

This content will only be shown when the selections are as follows:
* Interface - Atlas Admin API
* Deployment Type - self
* Operator (custom snooty.toml) - autocomplete

This content will only be shown when the selections are as follows:
* Interface - Atlas Admin API
* Deployment Type - self
* Operator (custom snooty.toml) - autocomplete

This content will only be shown when the selections are as follows:
* Interface - Atlas Admin API
* Deployment Type - self
* Operator (custom snooty.toml) - autocomplete

This content will only be shown when the selections are as follows:
* Interface - Atlas Admin API
* Deployment Type - self
* Operator (custom snooty.toml) - autocomplete

.. io-code-block::
:copyable: true

.. input::
:language: shell

QUERY_EMBEDDING.length

.. output::
:language: shell

1536