Skip to content

Commit

Permalink
Merge pull request #2956 from ClickHouse/issue_1785
Browse files Browse the repository at this point in the history
Use badges consistently for experimental and beta
  • Loading branch information
gingerwizard authored Dec 28, 2024
2 parents ad42532 + d7fa438 commit 72bceca
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ active_links.json
FormatFactorySettingsDeclaration.h
FormatFactorySettings.h
Settings.cpp

.vscode
28 changes: 13 additions & 15 deletions scripts/settings/autogenerate-settings.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! ./bin/bash
#! /bin/bash

SCRIPT_NAME=$(basename "$0")

Expand All @@ -10,16 +10,6 @@ if [ ! -f ./clickhouse ]; then
curl https://clickhouse.com/ | sh
fi


EXPERIMENTAL_NOTE=":::warning
This feature is in experimental stage. Only intended for developers and ClickHouse enthusiasts. The feature might or might not work and could be removed at any time.
:::"

BETA_NOTE=":::note
This feature is beta stage. The outcome of using it together with other features is unknown and correctness is not guaranteed. Testing and reports are welcome.
:::"


# Autogenerate Format settings
./clickhouse -q "
WITH
Expand All @@ -32,8 +22,8 @@ settings_from_cpp AS
),
main_content AS
(
SELECT format('## {} {}\\n\\nType: {}\\n\\nDefault value: {}\\n\\n{}{}\\n\\n',
name, '{#'||name||'}', type, default, multiIf(tier == 'Experimental', '${EXPERIMENTAL_NOTE}\n\n', tier == 'Beta', '${BETA_NOTE}\n\n', ''), trim(BOTH '\\n' FROM description))
SELECT format('## {} {}\\n{}\\n\\nType: {}\\n\\nDefault value: {}\\n\\n{}\\n\\n',
name, '{#'||name||'}', multiIf(tier == 'Experimental', '<ExperimentalBadge/>', tier == 'Beta', '<BetaBadge/>', ''), type, default, trim(BOTH '\\n' FROM description))
FROM system.settings WHERE name IN settings_from_cpp
ORDER BY name
),
Expand All @@ -43,6 +33,10 @@ sidebar_label: Format Settings
slug: /en/operations/settings/formats
toc_max_heading_level: 2
---
import ExperimentalBadge from \'@theme/badges/ExperimentalBadge\';
import BetaBadge from \'@theme/badges/BetaBadge\';
<!-- Autogenerated -->
These settings are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h).
' AS prefix
Expand All @@ -62,8 +56,8 @@ settings_from_cpp AS
),
main_content AS
(
SELECT format('## {} {}\\n\\nType: {}\\n\\nDefault value: {}\\n\\n{}{}\\n\\n',
name, '{#'||name||'}', type, default, multiIf(tier == 'Experimental', '${EXPERIMENTAL_NOTE}\n\n', tier == 'Beta', '${BETA_NOTE}\n\n', ''), trim(BOTH '\\n' FROM description))
SELECT format('## {} {}\\n{}\\n\\nType: {}\\n\\nDefault value: {}\\n\\n{}\\n\\n',
name, '{#'||name||'}', multiIf(tier == 'Experimental', '<ExperimentalBadge/>', tier == 'Beta', '<BetaBadge/>', ''), type, default, replaceOne(trim(BOTH '\\n' FROM description), ' and [MaterializedMySQL](../../engines/database-engines/materialized-mysql.md)',''))
FROM system.settings WHERE name IN settings_from_cpp
ORDER BY name
),
Expand All @@ -73,6 +67,10 @@ sidebar_label: Core Settings
slug: /en/operations/settings/settings
toc_max_heading_level: 2
---
import ExperimentalBadge from \'@theme/badges/ExperimentalBadge\';
import BetaBadge from \'@theme/badges/BetaBadge\';
<!-- Autogenerated -->
All below settings are also available in table [system.settings](/docs/en/operations/system-tables/settings). These settings are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).
' AS prefix
Expand Down
4 changes: 3 additions & 1 deletion src/theme/badges/BetaBadge/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
display: flex;
align-items: center;
padding: 5px 12px;
color: #004237
color: #004237;
display: inline-flex;
margin-right: 5px;
}

.betaIcon svg path {
Expand Down
2 changes: 2 additions & 0 deletions src/theme/badges/CloudAvailableBadge/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
display: flex;
align-items: center;
padding: 5px 12px;
display: inline-flex;
margin-right: 5px;
}

[data-theme='dark'] .cloudBadge {
Expand Down
4 changes: 2 additions & 2 deletions src/theme/badges/CloudNotSupportedBadge/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
display: flex;
align-items: center;
padding: 5px 12px;


display: inline-flex;
margin-right: 5px;
}

.cloudNotSupportedIcon svg path {
Expand Down
2 changes: 2 additions & 0 deletions src/theme/badges/ExperimentalBadge/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
display: flex;
align-items: center;
padding: 5px 12px;
display: inline-flex;
margin-right: 5px;
}

.experimentalBadge a {
Expand Down
3 changes: 1 addition & 2 deletions src/theme/badges/VersionBadge/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
display: flex;
align-items: center;
padding: 5px 12px;


display: inline-flex;
}

[data-theme='dark'] .versionBadge {
Expand Down

0 comments on commit 72bceca

Please sign in to comment.