This is an automated email from the ASF dual-hosted git repository.
sfirke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2d8892958e docs: various enhancements across `/docs` workspace
(#31921)
2d8892958e is described below
commit 2d8892958e4545a2aefaf46cf7459fcc9e96f832
Author: Đỗ Trọng Hải <[email protected]>
AuthorDate: Thu Feb 20 21:18:49 2025 +0700
docs: various enhancements across `/docs` workspace (#31921)
Signed-off-by: hainenber <[email protected]>
---
docs/README.md | 2 +-
docs/docs/api.mdx | 1 -
docs/docs/configuration/setup-ssh-tunneling.mdx | 6 ----
docs/docs/contributing/howtos.mdx | 8 +++---
docs/docs/contributing/misc.mdx | 6 ++--
docs/docs/faq.mdx | 2 +-
.../{docusaurus.config.js => docusaurus.config.ts} | 32 ++++++++++------------
docs/package.json | 12 +-------
docs/src/pages/community.tsx | 24 +++-------------
docs/src/pages/index.tsx | 3 --
docs/src/styles/custom.css | 12 ++++++++
docs/src/styles/main.less | 3 +-
docs/static/.htaccess | 2 --
docs/tsconfig.json | 2 +-
docs/yarn.lock | 32 ++++------------------
15 files changed, 49 insertions(+), 98 deletions(-)
diff --git a/docs/README.md b/docs/README.md
index 710eb57835..ef5db9ebfd 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -18,6 +18,6 @@ under the License.
-->
This is the public documentation site for Superset, built using
-[Docusaurus 2](https://docusaurus.io/). See
+[Docusaurus 3](https://docusaurus.io/). See
[CONTRIBUTING.md](../CONTRIBUTING.md#documentation) for documentation on
contributing to documentation.
diff --git a/docs/docs/api.mdx b/docs/docs/api.mdx
index 3384754056..11e0b86fe8 100644
--- a/docs/docs/api.mdx
+++ b/docs/docs/api.mdx
@@ -4,7 +4,6 @@ hide_title: true
sidebar_position: 10
---
-import { Buffer } from 'buffer/index.js';
import SwaggerUI from 'swagger-ui-react';
import openapi from '/resources/openapi.json';
import 'swagger-ui-react/swagger-ui.css';
diff --git a/docs/docs/configuration/setup-ssh-tunneling.mdx
b/docs/docs/configuration/setup-ssh-tunneling.mdx
deleted file mode 100644
index f79248da51..0000000000
--- a/docs/docs/configuration/setup-ssh-tunneling.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: Setup SSH Tunneling
-hide_title: true
-sidebar_position: 8
-version: 1
----
diff --git a/docs/docs/contributing/howtos.mdx
b/docs/docs/contributing/howtos.mdx
index 97626de0a8..0099bd6199 100644
--- a/docs/docs/contributing/howtos.mdx
+++ b/docs/docs/contributing/howtos.mdx
@@ -10,7 +10,7 @@ version: 1
The latest documentation and tutorial are available at
https://superset.apache.org/.
-The documentation site is built using [Docusaurus 2](https://docusaurus.io/),
a modern
+The documentation site is built using [Docusaurus 3](https://docusaurus.io/),
a modern
static website generator, the source for which resides in `./docs`.
### Local Development
@@ -223,9 +223,9 @@ To run a single test file:
npm run test -- path/to/file.js
```
-### e2e Integration Testing
+### E2E Integration Testing
-For e2e testing, we recommend that you use a `docker compose` backend
+For E2E testing, we recommend that you use a `docker compose` backend
```bash
CYPRESS_CONFIG=true docker compose up --build
@@ -411,7 +411,7 @@ See [set capabilities for a
container](https://kubernetes.io/docs/tasks/configur
Once the pod is running as root and has the `SYS_PTRACE` capability it will be
able to debug the Flask app.
-You can follow the same instructions as in `docker compose`. Enter the pod and
install the required library and packages; gdb, netstat and debugpy.
+You can follow the same instructions as in `docker compose`. Enter the pod and
install the required library and packages: gdb, netstat and debugpy.
Often in a Kubernetes environment nodes are not addressable from outside the
cluster. VSCode will thus be unable to remotely connect to port 5678 on a
Kubernetes node. In order to do this you need to create a tunnel that port
forwards 5678 to your local machine.
diff --git a/docs/docs/contributing/misc.mdx b/docs/docs/contributing/misc.mdx
index bf68ea1edc..6ec8a63c50 100644
--- a/docs/docs/contributing/misc.mdx
+++ b/docs/docs/contributing/misc.mdx
@@ -3,7 +3,7 @@ sidebar_position: 6
version: 1
---
-# Misc.
+# Miscellaneous
## Reporting a Security Vulnerability
@@ -11,7 +11,7 @@ Please report security vulnerabilities to
[email protected].
In the event a community member discovers a security flaw in Superset, it is
important to follow the [Apache Security
Guidelines](https://www.apache.org/security/committers.html) and release a fix
as quickly as possible before public disclosure. Reporting security
vulnerabilities through the usual GitHub Issues channel is not ideal as it will
publicize the flaw before a fix can be applied.
-### SQL Lab Async
+## SQL Lab Async
It's possible to configure a local database to operate in `async` mode,
to work on `async` related features.
@@ -46,7 +46,7 @@ Note that:
to your production environment, and use the similar broker as well as
results backend configuration
-### Async Chart Queries
+## Async Chart Queries
It's possible to configure database queries for charts to operate in `async`
mode. This is especially useful for dashboards with many charts that may
otherwise be affected by browser connection limits. To enable async queries for
dashboards and Explore, the following dependencies are required:
diff --git a/docs/docs/faq.mdx b/docs/docs/faq.mdx
index e7b166bb21..7ae4ac4132 100644
--- a/docs/docs/faq.mdx
+++ b/docs/docs/faq.mdx
@@ -125,7 +125,7 @@ value in milliseconds in the JSON Metadata field:
Here, the entire dashboard will refresh at once if periodic refresh is on. The
stagger time of 2.5
seconds is ignored.
-**Why does ‘flask fab’ or superset freezed/hung/not responding when started
(my home directory is
+**Why does ‘flask fab’ or superset freeze/hang/not responding when started (my
home directory is
NFS mounted)?**
By default, Superset creates and uses an SQLite database at
`~/.superset/superset.db`. SQLite is
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.ts
similarity index 94%
rename from docs/docusaurus.config.js
rename to docs/docusaurus.config.ts
index f27d10e0c6..dba6b43116 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.ts
@@ -17,14 +17,13 @@
* under the License.
*/
-// @ts-check
-// Note: type annotations allow type checking and IDEs autocompletion
+import type {Config} from '@docusaurus/types'
+import type { Options, ThemeConfig } from '@docusaurus/preset-classic';
+import { themes } from 'prism-react-renderer'
-const lightCodeTheme = require("prism-react-renderer").themes.github;
-const darkCodeTheme = require("prism-react-renderer").themes.vsDark;
+const { github: lightCodeTheme, vsDark: darkCodeTheme } = themes;
-/** @type {import('@docusaurus/types').Config} */
-const config = {
+const config: Config = {
title: 'Superset',
tagline:
'Apache Superset is a modern data exploration and visualization platform',
@@ -33,8 +32,8 @@ const config = {
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: '/img/favicon.ico',
- organizationName: 'apache', // Usually your GitHub org/user name.
- projectName: 'superset', // Usually your repo name.
+ organizationName: 'apache',
+ projectName: 'superset',
themes: ['@saucelabs/theme-github-codeblock'],
plugins: [
[
@@ -199,8 +198,7 @@ const config = {
presets: [
[
'@docusaurus/preset-classic',
- /** @type {import('@docusaurus/preset-classic').Options} */
- ({
+ {
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
@@ -219,16 +217,16 @@ const config = {
theme: {
customCss: require.resolve('./src/styles/custom.css'),
},
- }),
+ } satisfies Options,
],
],
themeConfig:
- /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
- ({
+ {
colorMode: {
- defaultMode: 'light',
- disableSwitch: true,
+ defaultMode: 'dark',
+ disableSwitch: false,
+ respectPrefersColorScheme: true,
},
algolia: {
appId: 'WR5FASX5ED',
@@ -330,7 +328,7 @@ const config = {
hideable: true,
}
},
- }),
+ } satisfies ThemeConfig,
scripts: [
'/script/matomo.js',
// {
@@ -340,4 +338,4 @@ const config = {
],
};
-module.exports = config;
+export default config;
diff --git a/docs/package.json b/docs/package.json
index 46b1740751..e3440b62dd 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -17,23 +17,15 @@
"typecheck": "tsc"
},
"dependencies": {
- "@algolia/client-search": "^5.18.0",
"@ant-design/icons": "^5.5.2",
- "@docsearch/react": "^3.8.2",
"@docusaurus/core": "^3.5.2",
"@docusaurus/plugin-client-redirects": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
- "@emotion/core": "^10.1.1",
"@emotion/styled": "^10.0.27",
- "@mdx-js/react": "^3.1.0",
"@saucelabs/theme-github-codeblock": "^0.3.0",
"@superset-ui/style": "^0.14.23",
- "@svgr/webpack": "^8.1.0",
"antd": "^5.22.7",
- "buffer": "^6.0.3",
- "clsx": "^2.1.1",
"docusaurus-plugin-less": "^2.0.2",
- "file-loader": "^6.2.0",
"less": "^4.2.2",
"less-loader": "^11.0.0",
"prism-react-renderer": "^2.4.1",
@@ -41,9 +33,7 @@
"react-dom": "^18.3.1",
"react-github-btn": "^1.4.0",
"react-svg-pan-zoom": "^3.13.1",
- "stream": "^0.0.3",
- "swagger-ui-react": "^5.18.2",
- "url-loader": "^4.1.1"
+ "swagger-ui-react": "^5.18.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.7.0",
diff --git a/docs/src/pages/community.tsx b/docs/src/pages/community.tsx
index 4a3c2920eb..3edf167f88 100644
--- a/docs/src/pages/community.tsx
+++ b/docs/src/pages/community.tsx
@@ -86,7 +86,7 @@ const communityLinks = [
];
const StyledJoinCommunity = styled('section')`
- background-color: var(--ifm-off-section-background);
+ background-color: var(--ifm-background-color);
border-bottom: 1px solid var(--ifm-border-color);
.list {
max-width: 540px;
@@ -118,7 +118,7 @@ const StyledJoinCommunity = styled('section')`
.description {
font-size: 14px;
line-height: 20px;
- color: var(--ifm-secondary-text);
+ color: var(--ifm-font-base-color);
margin-top: -8px;
margin-bottom: 23px;
${mq[1]} {
@@ -143,22 +143,6 @@ const StyledCalendarIframe = styled('iframe')`
}
`;
-const StyledNewsletterIframe = styled('iframe')`
- display: block;
- max-width: 1080px;
- width: calc(100% - 40px);
- height: 285px;
- margin: 30px auto 20px;
- border: 0;
- @media (max-width: 1200px) {
- height: 380px;
- }
- @media (max-width: 679px) {
- height: 680px;
- margin-top: 15px;
- }
-`;
-
const StyledLink = styled('a')`
display: inline-flex;
align-items: center;
@@ -224,8 +208,8 @@ const Community = () => {
</a>
}
title={
- <a className="title" href={url} target="_blank">
- {title}
+ <a href={url} target="_blank">
+ <p className="title" style={{marginBottom:
0}}>{title}</p>
</a>
}
description={<p className="description">{description}</p>}
diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx
index 65b32e2e0f..139f47a05d 100644
--- a/docs/src/pages/index.tsx
+++ b/docs/src/pages/index.tsx
@@ -207,7 +207,6 @@ const StyledFeaturesList = styled('ul')`
.item {
text-align: left;
border: 1px solid var(--ifm-border-color);
- background-color: #ffffff;
border-radius: 10px;
overflow: hidden;
display: flex;
@@ -230,7 +229,6 @@ const StyledFeaturesList = styled('ul')`
}
.title {
font-size: 24px;
- color: var(--ifm-primary-text);
margin: 10px 0 0;
${mq[1]} {
font-size: 23px;
@@ -240,7 +238,6 @@ const StyledFeaturesList = styled('ul')`
.description {
font-size: 17px;
line-height: 23px;
- color: var(--ifm-secondary-text);
margin: 5px 0 0;
${mq[1]} {
font-size: 16px;
diff --git a/docs/src/styles/custom.css b/docs/src/styles/custom.css
index 15769bcb02..40ac1ad8e2 100644
--- a/docs/src/styles/custom.css
+++ b/docs/src/styles/custom.css
@@ -69,3 +69,15 @@ ul.dropdown__menu svg {
--ifm-code-padding-vertical: 3px;
--ifm-code-padding-horizontal: 5px;
}
+
+[data-theme='dark'] {
+ --ifm-color-primary: #25c2a0;
+ --ifm-color-primary-dark: #21af90;
+ --ifm-color-primary-darker: #1fa588;
+ --ifm-color-primary-darkest: #1a8870;
+ --ifm-color-primary-light: #29d5b0;
+ --ifm-color-primary-lighter: #32d8b4;
+ --ifm-color-primary-lightest: #4fddbf;
+ --ifm-font-base-color: #bbb5ac;
+ --ifm-border-color: #797063;
+}
diff --git a/docs/src/styles/main.less b/docs/src/styles/main.less
index 72403244e4..c5603566b6 100644
--- a/docs/src/styles/main.less
+++ b/docs/src/styles/main.less
@@ -114,7 +114,6 @@ a > span > svg {
.navbar {
font-size: 14px;
font-weight: 400;
- background-color: #fff;
transition: all 0.5s;
.get-started-button {
@@ -190,7 +189,7 @@ a > span > svg {
.navbar .DocSearch {
--docsearch-text-color: #187384;
--docsearch-muted-color: #187384;
- --docsearch-searchbox-background: #fff;
+ --docsearch-searchbox-background: var(--ifm-navbar-background-color);
border: 1px solid #187384;
border-radius: 10px;
diff --git a/docs/static/.htaccess b/docs/static/.htaccess
index 8ffe26ea87..179d9a0472 100644
--- a/docs/static/.htaccess
+++ b/docs/static/.htaccess
@@ -64,7 +64,5 @@ RewriteRule ^docs/installation/event-logging/$
/docs/configuration/event-logging
RewriteRule ^docs/databases.*$ /docs/configuration/databases [R=301,L]
-RewriteRule ^docs/configuration/setup-ssh-tunneling$
/docs/configuration/networking-settings [R=301,L]
-
# pre-commit hooks documentation
RewriteRule ^docs/contributing/hooks-and-linting/$
/docs/contributing/development/#git-hooks-1
diff --git a/docs/tsconfig.json b/docs/tsconfig.json
index b188faa361..19162d3217 100644
--- a/docs/tsconfig.json
+++ b/docs/tsconfig.json
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor
experience.
- "extends": "@docusaurus/tsconfig/tsconfig.json",
+ "extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
},
diff --git a/docs/yarn.lock b/docs/yarn.lock
index 494587c065..85731d84fc 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -148,7 +148,7 @@
"@algolia/requester-common" "4.23.3"
"@algolia/transporter" "4.23.3"
-"@algolia/[email protected]", "@algolia/client-search@^5.18.0":
+"@algolia/[email protected]":
version "5.18.0"
resolved
"https://registry.yarnpkg.com/@algolia/client-search/-/client-search-5.18.0.tgz#26a3b55b6783cf7eaa8c28b48b891ed245c7e708"
integrity
sha512-qI3LcFsVgtvpsBGR7aNSJYxhsR+Zl46+958ODzg8aCxIcdxiK7QEVLMJMZAR57jGqW0Lg/vrjtuLFDMfSE53qA==
@@ -1415,7 +1415,7 @@
resolved
"https://registry.yarnpkg.com/@docsearch/css/-/css-3.8.2.tgz#7973ceb6892c30f154ba254cd05c562257a44977"
integrity
sha512-y05ayQFyUmCXze79+56v/4HpycYF3uFqB78pLPrSV5ZKAlDuIAAJNhaRi8tTdRNXh05yxX/TyNnzD6LwSM89vQ==
-"@docsearch/react@^3.5.2", "@docsearch/react@^3.8.2":
+"@docsearch/react@^3.5.2":
version "3.8.2"
resolved
"https://registry.yarnpkg.com/@docsearch/react/-/react-3.8.2.tgz#7b11d39b61c976c0aa9fbde66e6b73b30f3acd42"
integrity
sha512-xCRrJQlTt8N9GU0DG4ptwHRkfnSnD/YpdeaXe02iKfqs97TkZJv60yE+1eq/tjPcVnTW8dP5qLP7itifFVV5eg==
@@ -1897,7 +1897,7 @@
"@emotion/utils" "0.11.3"
"@emotion/weak-memoize" "0.2.5"
-"@emotion/core@^10.0.28", "@emotion/core@^10.1.1":
+"@emotion/core@^10.0.28":
version "10.3.1"
resolved
"https://registry.yarnpkg.com/@emotion/core/-/core-10.3.1.tgz#4021b6d8b33b3304d48b0bb478485e7d7421c69d"
integrity
sha512-447aUEjPIm0MnE6QYIaFz9VQOHSXf4Iu6EWOIqq11EAPqinkSZmfymPTmlOE3QjLv846lH4JVZBUOtwGbuQoww==
@@ -2094,7 +2094,7 @@
unist-util-visit "^5.0.0"
vfile "^6.0.0"
-"@mdx-js/react@^3.0.0", "@mdx-js/react@^3.1.0":
+"@mdx-js/react@^3.0.0":
version "3.1.0"
resolved
"https://registry.yarnpkg.com/@mdx-js/react/-/react-3.1.0.tgz#c4522e335b3897b9a845db1dbdd2f966ae8fb0ed"
integrity
sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==
@@ -3672,7 +3672,7 @@ balanced-match@^1.0.0:
resolved
"https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity
sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
-base64-js@^1.3.1, base64-js@^1.5.1:
+base64-js@^1.5.1:
version "1.5.1"
resolved
"https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity
sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
@@ -3788,14 +3788,6 @@ buffer-from@^1.0.0:
resolved
"https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity
sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
-buffer@^6.0.3:
- version "6.0.3"
- resolved
"https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
- integrity
sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
- dependencies:
- base64-js "^1.3.1"
- ieee754 "^1.2.1"
-
[email protected]:
version "3.0.0"
resolved
"https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
@@ -4035,7 +4027,7 @@ clone-deep@^4.0.1:
kind-of "^6.0.2"
shallow-clone "^3.0.0"
-clsx@^2.0.0, clsx@^2.1.1:
+clsx@^2.0.0:
version "2.1.1"
resolved
"https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999"
integrity
sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==
@@ -4131,11 +4123,6 @@ common-path-prefix@^3.0.0:
resolved
"https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0"
integrity
sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==
-component-emitter@^2.0.0:
- version "2.0.0"
- resolved
"https://registry.yarnpkg.com/component-emitter/-/component-emitter-2.0.0.tgz#3a137dfe66fcf2efe3eab7cb7d5f51741b3620c6"
- integrity
sha512-4m5s3Me2xxlVKG9PkZpQqHQR7bgpnN7joDMJ4yvVkVXngjoITG76IaZmzmywSeRTeTpc6N6r3H3+KyUurV8OYw==
-
compressible@~2.0.16:
version "2.0.18"
resolved
"https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba"
@@ -9600,13 +9587,6 @@ std-env@^3.0.1:
resolved
"https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2"
integrity
sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==
-stream@^0.0.3:
- version "0.0.3"
- resolved
"https://registry.yarnpkg.com/stream/-/stream-0.0.3.tgz#3f3934a900a561ce3e2b9ffbd2819cead32699d9"
- integrity
sha512-aMsbn7VKrl4A2T7QAQQbzgN7NVc70vgF5INQrBXqn4dCXN1zy3L9HGgLO5s7PExmdrzTJ8uR/27aviW8or8/+A==
- dependencies:
- component-emitter "^2.0.0"
-
string-convert@^0.2.0:
version "0.2.1"
resolved
"https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97"