From 423f8ac412f5a32f40f70288f158cf7bc7ad2366 Mon Sep 17 00:00:00 2001 From: Avik-creator Date: Thu, 14 Nov 2024 17:28:37 +0530 Subject: [PATCH 01/15] FEAT: Added Installer initial Version. --- learn/_sidebar.json | 4 +- learn/installers.mdx | 13 ++ src/components/Installer/index.jsx | 180 +++++++++++++++++++++ src/components/Installer/styles.module.css | 72 +++++++++ src/pages/index.jsx | 16 +- 5 files changed, 276 insertions(+), 9 deletions(-) create mode 100644 learn/installers.mdx create mode 100644 src/components/Installer/index.jsx create mode 100644 src/components/Installer/styles.module.css diff --git a/learn/_sidebar.json b/learn/_sidebar.json index 98aacb96..8cd239ff 100644 --- a/learn/_sidebar.json +++ b/learn/_sidebar.json @@ -1,5 +1,6 @@ [ "faq", + { "type": "category", "label": "CEPs", @@ -13,5 +14,6 @@ "dirName": "ceps" } ] - } + }, + "installers" ] diff --git a/learn/installers.mdx b/learn/installers.mdx new file mode 100644 index 00000000..1ca5b086 --- /dev/null +++ b/learn/installers.mdx @@ -0,0 +1,13 @@ +--- +title: Conda Installers +sidebar_position: 1 +--- + +# Conda Installation Help + +Choose the right conda installer for your system using our interactive selector below: + + +import CondaInstaller from '../src/components/Installer'; + + diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx new file mode 100644 index 00000000..9a162d28 --- /dev/null +++ b/src/components/Installer/index.jsx @@ -0,0 +1,180 @@ +import React, { useState } from 'react'; +import styles from './styles.module.css'; + +export default function CondaInstallerSelector() { + const [os, setOs] = useState(''); + const [arch, setArch] = useState(''); + const [installerType, setInstallerType] = useState(''); + + const osArchitectures = { + Linux: ['x64', 'aarch64', 'ppc64le'], + macOS: ['x64', 'ARM64'], + Windows: ['x64', 'ARM64 (Beta)'], + }; + + const installerData = { + Anaconda: { + name: 'Anaconda', + url: 'https://docs.anaconda.com/free/anaconda/install/index.html', + defaultChannel: 'defaults', + description: 'Complete distribution for scientific Python development', + }, + Miniconda: { + name: 'Miniconda', + url: 'https://docs.conda.io/en/latest/miniconda.html', + defaultChannel: 'defaults', + description: 'Minimal conda installer with Python', + }, + Miniforge: { + name: 'Miniforge', + url: 'https://github.com/conda-forge/miniforge', + defaultChannel: 'conda-forge', + description: 'Community-driven minimal installer using conda-forge', + }, + Mambaforge: { + name: 'Mambaforge', + url: 'https://github.com/conda-forge/miniforge#mambaforge', + defaultChannel: 'conda-forge', + description: 'Miniforge variant with mamba as default package manager', + }, + Micromamba: { + name: 'Micromamba', + url: 'https://mamba.readthedocs.io/en/latest/installation.html#micromamba', + defaultChannel: 'conda-forge', + description: 'Standalone fast package manager (no conda required)', + isStandalone: true, + }, + Pixi: { + name: 'Pixi', + url: 'https://prefix.dev/docs/pixi/installation', + defaultChannel: 'conda-forge', + description: 'Modern package management solution for Python, C++, and R', + isStandalone: true, + }, + }; + + const getInstallerDetails = () => { + if (!os || !installerType) { + return null; + } + return installerData[installerType]; + }; + + const installerDetails = getInstallerDetails(); + + return ( +
+
+

Conda Installer Selector

+

+ Choose your operating system, architecture, and installer type +

+ +
+
+ + +
+ + {os && ( +
+ + +
+ )} + +
+ + +
+ + {installerDetails && ( +
+
+ Selected Configuration: +
    +
  • + OS: + {os} +
  • + {arch && ( +
  • + Architecture: + {arch} +
  • + )} +
  • + Installer: + {installerDetails.name} +
  • +
  • + Default Channel: + {installerDetails.defaultChannel} +
  • +
+
+ +
+

{installerDetails.description}

+ + Installation Guide → + +
+ + {installerDetails.isStandalone && ( +
+

+ ⚠️ This is a standalone tool that does not require a full conda installation. +

+
+ )} +
+ )} +
+
+
+ ); +} diff --git a/src/components/Installer/styles.module.css b/src/components/Installer/styles.module.css new file mode 100644 index 00000000..d732cbda --- /dev/null +++ b/src/components/Installer/styles.module.css @@ -0,0 +1,72 @@ +.container { + display: flex; + justify-content: center; + align-items: center; + +} + +.selectorWrapper { + margin: 2rem 0; + padding: 1rem; + border: 1px solid green; + border-radius: 8px; + max-width: 600px; + width: 100%; +} + +.title { + margin-bottom: 1rem; + color: green; +} + +.description { + margin-bottom: 1rem; +} + +.formGroup { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.label { + display: block; + margin-bottom: 0.5rem; +} + +.select { + width: 100%; + padding: 0.5rem; + border-radius: 4px; + border: 1px solid #ccc; +} + +.detailsWrapper { + margin-top: 1rem; + padding: 1rem; + background-color: #f8f9fa; + border-radius: 4px; +} + +.detailsList { + margin-top: 0.5rem; + padding-left: 1.5rem; +} + +.description { + margin-top: 1rem; +} + +.link { + display: inline-block; + margin-top: 0.5rem; + color: #0f6c12; + text-decoration: underline; +} + +.standaloneWarning { + margin-top: 1rem; + padding: 1rem; + background-color: #e8f0fe; + border-radius: 4px; +} diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 417db6b2..68983251 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -1,11 +1,11 @@ -import React from "react"; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -import Layout from "@theme/Layout"; -import Header from "../components/Header"; -import Info from "../components/Info"; -import Features from "../components/Features"; -import News from "../components/News"; -import styles from "./index.module.css"; +import React from 'react'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Layout from '@theme/Layout'; +import Header from '../components/Header'; +import Info from '../components/Info'; +import Features from '../components/Features'; +import News from '../components/News'; +import styles from './index.module.css'; export default function Home() { const { siteConfig } = useDocusaurusContext(); From 52b1d686f885be8e3f1c52e89b099029378d5d16 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:07:07 +0000 Subject: [PATCH 02/15] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/components/Installer/index.jsx | 97 +++++++++++++++++------------- src/pages/index.jsx | 16 ++--- 2 files changed, 62 insertions(+), 51 deletions(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 9a162d28..e98d4591 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -1,54 +1,54 @@ -import React, { useState } from 'react'; -import styles from './styles.module.css'; +import React, { useState } from "react"; +import styles from "./styles.module.css"; export default function CondaInstallerSelector() { - const [os, setOs] = useState(''); - const [arch, setArch] = useState(''); - const [installerType, setInstallerType] = useState(''); + const [os, setOs] = useState(""); + const [arch, setArch] = useState(""); + const [installerType, setInstallerType] = useState(""); const osArchitectures = { - Linux: ['x64', 'aarch64', 'ppc64le'], - macOS: ['x64', 'ARM64'], - Windows: ['x64', 'ARM64 (Beta)'], + Linux: ["x64", "aarch64", "ppc64le"], + macOS: ["x64", "ARM64"], + Windows: ["x64", "ARM64 (Beta)"], }; const installerData = { Anaconda: { - name: 'Anaconda', - url: 'https://docs.anaconda.com/free/anaconda/install/index.html', - defaultChannel: 'defaults', - description: 'Complete distribution for scientific Python development', + name: "Anaconda", + url: "https://docs.anaconda.com/free/anaconda/install/index.html", + defaultChannel: "defaults", + description: "Complete distribution for scientific Python development", }, Miniconda: { - name: 'Miniconda', - url: 'https://docs.conda.io/en/latest/miniconda.html', - defaultChannel: 'defaults', - description: 'Minimal conda installer with Python', + name: "Miniconda", + url: "https://docs.conda.io/en/latest/miniconda.html", + defaultChannel: "defaults", + description: "Minimal conda installer with Python", }, Miniforge: { - name: 'Miniforge', - url: 'https://github.com/conda-forge/miniforge', - defaultChannel: 'conda-forge', - description: 'Community-driven minimal installer using conda-forge', + name: "Miniforge", + url: "https://github.com/conda-forge/miniforge", + defaultChannel: "conda-forge", + description: "Community-driven minimal installer using conda-forge", }, Mambaforge: { - name: 'Mambaforge', - url: 'https://github.com/conda-forge/miniforge#mambaforge', - defaultChannel: 'conda-forge', - description: 'Miniforge variant with mamba as default package manager', + name: "Mambaforge", + url: "https://github.com/conda-forge/miniforge#mambaforge", + defaultChannel: "conda-forge", + description: "Miniforge variant with mamba as default package manager", }, Micromamba: { - name: 'Micromamba', - url: 'https://mamba.readthedocs.io/en/latest/installation.html#micromamba', - defaultChannel: 'conda-forge', - description: 'Standalone fast package manager (no conda required)', + name: "Micromamba", + url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba", + defaultChannel: "conda-forge", + description: "Standalone fast package manager (no conda required)", isStandalone: true, }, Pixi: { - name: 'Pixi', - url: 'https://prefix.dev/docs/pixi/installation', - defaultChannel: 'conda-forge', - description: 'Modern package management solution for Python, C++, and R', + name: "Pixi", + url: "https://prefix.dev/docs/pixi/installation", + defaultChannel: "conda-forge", + description: "Modern package management solution for Python, C++, and R", isStandalone: true, }, }; @@ -73,7 +73,7 @@ export default function CondaInstallerSelector() {
setArch(e.target.value)} className={styles.select}> + {arch && ( -
  • - Architecture: - {arch} -
  • +
  • + Architecture: + {arch} +
  • )}
  • Installer: @@ -159,7 +164,12 @@ export default function CondaInstallerSelector() {

    {installerDetails.description}

    - + Installation Guide →
    @@ -167,7 +177,8 @@ export default function CondaInstallerSelector() { {installerDetails.isStandalone && (

    - ⚠️ This is a standalone tool that does not require a full conda installation. + ⚠️ This is a standalone tool that does not require a full + conda installation.

    )} diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 68983251..417db6b2 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -1,11 +1,11 @@ -import React from 'react'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import Header from '../components/Header'; -import Info from '../components/Info'; -import Features from '../components/Features'; -import News from '../components/News'; -import styles from './index.module.css'; +import React from "react"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import Header from "../components/Header"; +import Info from "../components/Info"; +import Features from "../components/Features"; +import News from "../components/News"; +import styles from "./index.module.css"; export default function Home() { const { siteConfig } = useDocusaurusContext(); From a0087983b279b764efcf8458588183e8b50bd345 Mon Sep 17 00:00:00 2001 From: Avik-creator Date: Thu, 14 Nov 2024 17:43:05 +0530 Subject: [PATCH 03/15] FIX: Fixed lint Issues. --- src/components/Installer/index.jsx | 10 +++++----- src/components/Installer/styles.module.css | 15 +++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 9a162d28..829c91ac 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -64,13 +64,13 @@ export default function CondaInstallerSelector() { return (
    -
    +

    Conda Installer Selector

    Choose your operating system, architecture, and installer type

    -
    +
    {installerDetails && ( -
    +
    Selected Configuration: -
      +
      • OS: {os} @@ -165,7 +165,7 @@ export default function CondaInstallerSelector() {
    {installerDetails.isStandalone && ( -
    +

    ⚠️ This is a standalone tool that does not require a full conda installation.

    diff --git a/src/components/Installer/styles.module.css b/src/components/Installer/styles.module.css index d732cbda..ef2e7049 100644 --- a/src/components/Installer/styles.module.css +++ b/src/components/Installer/styles.module.css @@ -2,10 +2,9 @@ display: flex; justify-content: center; align-items: center; - } -.selectorWrapper { +.selector_wrapper { margin: 2rem 0; padding: 1rem; border: 1px solid green; @@ -23,7 +22,7 @@ margin-bottom: 1rem; } -.formGroup { +.form_group { display: flex; flex-direction: column; gap: 1rem; @@ -41,22 +40,18 @@ border: 1px solid #ccc; } -.detailsWrapper { +.details_wrapper { margin-top: 1rem; padding: 1rem; background-color: #f8f9fa; border-radius: 4px; } -.detailsList { +.details_list { margin-top: 0.5rem; padding-left: 1.5rem; } -.description { - margin-top: 1rem; -} - .link { display: inline-block; margin-top: 0.5rem; @@ -64,7 +59,7 @@ text-decoration: underline; } -.standaloneWarning { +.standalone_warning { margin-top: 1rem; padding: 1rem; background-color: #e8f0fe; From 720c6d9cf8a4aca505511338032ecc38765477fe Mon Sep 17 00:00:00 2001 From: Avik-creator Date: Thu, 14 Nov 2024 17:44:14 +0530 Subject: [PATCH 04/15] FIX: Fixed minor issues. --- src/components/Installer/index.jsx | 72 +++++++++++++++--------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 3229441b..7f73b123 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -1,54 +1,54 @@ -import React, { useState } from "react"; -import styles from "./styles.module.css"; +import React, { useState } from 'react'; +import styles from './styles.module.css'; export default function CondaInstallerSelector() { - const [os, setOs] = useState(""); - const [arch, setArch] = useState(""); - const [installerType, setInstallerType] = useState(""); + const [os, setOs] = useState(''); + const [arch, setArch] = useState(''); + const [installerType, setInstallerType] = useState(''); const osArchitectures = { - Linux: ["x64", "aarch64", "ppc64le"], - macOS: ["x64", "ARM64"], - Windows: ["x64", "ARM64 (Beta)"], + Linux: ['x64', 'aarch64', 'ppc64le'], + macOS: ['x64', 'ARM64'], + Windows: ['x64', 'ARM64 (Beta)'], }; const installerData = { Anaconda: { - name: "Anaconda", - url: "https://docs.anaconda.com/free/anaconda/install/index.html", - defaultChannel: "defaults", - description: "Complete distribution for scientific Python development", + name: 'Anaconda', + url: 'https://docs.anaconda.com/free/anaconda/install/index.html', + defaultChannel: 'defaults', + description: 'Complete distribution for scientific Python development', }, Miniconda: { - name: "Miniconda", - url: "https://docs.conda.io/en/latest/miniconda.html", - defaultChannel: "defaults", - description: "Minimal conda installer with Python", + name: 'Miniconda', + url: 'https://docs.conda.io/en/latest/miniconda.html', + defaultChannel: 'defaults', + description: 'Minimal conda installer with Python', }, Miniforge: { - name: "Miniforge", - url: "https://github.com/conda-forge/miniforge", - defaultChannel: "conda-forge", - description: "Community-driven minimal installer using conda-forge", + name: 'Miniforge', + url: 'https://github.com/conda-forge/miniforge', + defaultChannel: 'conda-forge', + description: 'Community-driven minimal installer using conda-forge', }, Mambaforge: { - name: "Mambaforge", - url: "https://github.com/conda-forge/miniforge#mambaforge", - defaultChannel: "conda-forge", - description: "Miniforge variant with mamba as default package manager", + name: 'Mambaforge', + url: 'https://github.com/conda-forge/miniforge#mambaforge', + defaultChannel: 'conda-forge', + description: 'Miniforge variant with mamba as default package manager', }, Micromamba: { - name: "Micromamba", - url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba", - defaultChannel: "conda-forge", - description: "Standalone fast package manager (no conda required)", + name: 'Micromamba', + url: 'https://mamba.readthedocs.io/en/latest/installation.html#micromamba', + defaultChannel: 'conda-forge', + description: 'Standalone fast package manager (no conda required)', isStandalone: true, }, Pixi: { - name: "Pixi", - url: "https://prefix.dev/docs/pixi/installation", - defaultChannel: "conda-forge", - description: "Modern package management solution for Python, C++, and R", + name: 'Pixi', + url: 'https://prefix.dev/docs/pixi/installation', + defaultChannel: 'conda-forge', + description: 'Modern package management solution for Python, C++, and R', isStandalone: true, }, }; @@ -73,7 +73,7 @@ export default function CondaInstallerSelector() {
    { setOs(e.target.value); - setArch(''); + setArch(""); }} className={styles.select} > @@ -97,7 +97,7 @@ export default function CondaInstallerSelector() { {os && (
    Date: Fri, 15 Nov 2024 00:25:11 +0530 Subject: [PATCH 06/15] Update src/components/Installer/index.jsx Co-authored-by: Katherine Kinnaman --- src/components/Installer/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 3229441b..04434f1a 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -21,7 +21,7 @@ export default function CondaInstallerSelector() { }, Miniconda: { name: "Miniconda", - url: "https://docs.conda.io/en/latest/miniconda.html", + url: "https://docs.anaconda.com/miniconda/index.html", defaultChannel: "defaults", description: "Minimal conda installer with Python", }, From 0c733532596cc3039fc66ee661d03068efe46821 Mon Sep 17 00:00:00 2001 From: Avik Mukherjee <77090462+Avik-creator@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:25:21 +0530 Subject: [PATCH 07/15] Update src/components/Installer/index.jsx Co-authored-by: Katherine Kinnaman --- src/components/Installer/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 04434f1a..a5b34005 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -15,7 +15,7 @@ export default function CondaInstallerSelector() { const installerData = { Anaconda: { name: "Anaconda", - url: "https://docs.anaconda.com/free/anaconda/install/index.html", + url: "https://docs.anaconda.com/anaconda/install/index.html", defaultChannel: "defaults", description: "Complete distribution for scientific Python development", }, From 8527b27118396e0c2b38453498e2c57108d56318 Mon Sep 17 00:00:00 2001 From: Avik Mukherjee <77090462+Avik-creator@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:25:36 +0530 Subject: [PATCH 08/15] Update learn/installers.mdx Co-authored-by: Jannis Leidel --- learn/installers.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn/installers.mdx b/learn/installers.mdx index 1ca5b086..231034c3 100644 --- a/learn/installers.mdx +++ b/learn/installers.mdx @@ -1,5 +1,5 @@ --- -title: Conda Installers +title: Installers sidebar_position: 1 --- From b37534e385923c727aadc3979b9b2d7d3d28fb2a Mon Sep 17 00:00:00 2001 From: Avik Mukherjee <77090462+Avik-creator@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:25:43 +0530 Subject: [PATCH 09/15] Update src/components/Installer/index.jsx Co-authored-by: Jannis Leidel --- src/components/Installer/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index a5b34005..b4b85fdc 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -23,7 +23,7 @@ export default function CondaInstallerSelector() { name: "Miniconda", url: "https://docs.anaconda.com/miniconda/index.html", defaultChannel: "defaults", - description: "Minimal conda installer with Python", + description: "Minimal installation of Anaconda Distribution", }, Miniforge: { name: "Miniforge", From 508bfcebdd50ebf690bc304c9290174c2459041f Mon Sep 17 00:00:00 2001 From: Avik Mukherjee <77090462+Avik-creator@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:25:53 +0530 Subject: [PATCH 10/15] Update src/components/Installer/index.jsx Co-authored-by: Jannis Leidel --- src/components/Installer/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index b4b85fdc..1bebdd44 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -17,7 +17,7 @@ export default function CondaInstallerSelector() { name: "Anaconda", url: "https://docs.anaconda.com/anaconda/install/index.html", defaultChannel: "defaults", - description: "Complete distribution for scientific Python development", + description: "A Python/R data science distribution containing conda", }, Miniconda: { name: "Miniconda", From 61042d0cd3d127114cfa5ce8c6c0db688d27a033 Mon Sep 17 00:00:00 2001 From: Avik Mukherjee <77090462+Avik-creator@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:26:03 +0530 Subject: [PATCH 11/15] Update src/components/Installer/index.jsx Co-authored-by: Jannis Leidel --- src/components/Installer/index.jsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 1bebdd44..76553919 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -31,12 +31,6 @@ export default function CondaInstallerSelector() { defaultChannel: "conda-forge", description: "Community-driven minimal installer using conda-forge", }, - Mambaforge: { - name: "Mambaforge", - url: "https://github.com/conda-forge/miniforge#mambaforge", - defaultChannel: "conda-forge", - description: "Miniforge variant with mamba as default package manager", - }, Micromamba: { name: "Micromamba", url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba", From 3a3680be3a7c6693fda0a2a782e9ceb66c77ebc2 Mon Sep 17 00:00:00 2001 From: Avik Mukherjee <77090462+Avik-creator@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:26:10 +0530 Subject: [PATCH 12/15] Update src/components/Installer/index.jsx Co-authored-by: Jannis Leidel --- src/components/Installer/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 76553919..61053b0e 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -14,7 +14,7 @@ export default function CondaInstallerSelector() { const installerData = { Anaconda: { - name: "Anaconda", + name: "Anaconda Distribution", url: "https://docs.anaconda.com/anaconda/install/index.html", defaultChannel: "defaults", description: "A Python/R data science distribution containing conda", From 57d7282ead4cee346e17eb50d8e047c945221c66 Mon Sep 17 00:00:00 2001 From: Avik-creator Date: Fri, 15 Nov 2024 21:11:34 +0530 Subject: [PATCH 13/15] FEAT: Added Spacing Between the Selected Configuration. --- src/components/Installer/index.jsx | 70 ++++++++++++---------- src/components/Installer/styles.module.css | 15 +++++ 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/src/components/Installer/index.jsx b/src/components/Installer/index.jsx index 61053b0e..f26bf604 100644 --- a/src/components/Installer/index.jsx +++ b/src/components/Installer/index.jsx @@ -1,54 +1,54 @@ -import React, { useState } from "react"; -import styles from "./styles.module.css"; +import React, { useState } from 'react'; +import styles from './styles.module.css'; export default function CondaInstallerSelector() { - const [os, setOs] = useState(""); - const [arch, setArch] = useState(""); - const [installerType, setInstallerType] = useState(""); + const [os, setOs] = useState(''); + const [arch, setArch] = useState(''); + const [installerType, setInstallerType] = useState(''); const osArchitectures = { - Linux: ["x64", "aarch64", "ppc64le"], - macOS: ["x64", "ARM64"], - Windows: ["x64", "ARM64 (Beta)"], + Linux: ['x64', 'aarch64', 'ppc64le'], + macOS: ['x64', 'ARM64'], + Windows: ['x64', 'ARM64 (Beta)'], }; const installerData = { Anaconda: { - name: "Anaconda Distribution", - url: "https://docs.anaconda.com/anaconda/install/index.html", - defaultChannel: "defaults", - description: "A Python/R data science distribution containing conda", + name: 'Anaconda Distribution', + url: 'https://docs.anaconda.com/anaconda/install/index.html', + defaultChannel: 'defaults', + description: 'A Python/R data science distribution containing conda', }, Miniconda: { - name: "Miniconda", - url: "https://docs.anaconda.com/miniconda/index.html", - defaultChannel: "defaults", - description: "Minimal installation of Anaconda Distribution", + name: 'Miniconda', + url: 'https://docs.anaconda.com/miniconda/index.html', + defaultChannel: 'defaults', + description: 'Minimal installation of Anaconda Distribution', }, Miniforge: { - name: "Miniforge", - url: "https://github.com/conda-forge/miniforge", - defaultChannel: "conda-forge", - description: "Community-driven minimal installer using conda-forge", + name: 'Miniforge', + url: 'https://github.com/conda-forge/miniforge', + defaultChannel: 'conda-forge', + description: 'Community-driven minimal installer using conda-forge', }, Micromamba: { - name: "Micromamba", - url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba", - defaultChannel: "conda-forge", - description: "Standalone fast package manager (no conda required)", + name: 'Micromamba', + url: 'https://mamba.readthedocs.io/en/latest/installation.html#micromamba', + defaultChannel: 'conda-forge', + description: 'Standalone fast package manager (no conda required)', isStandalone: true, }, Pixi: { - name: "Pixi", - url: "https://prefix.dev/docs/pixi/installation", - defaultChannel: "conda-forge", - description: "Modern package management solution for Python, C++, and R", + name: 'Pixi', + url: 'https://prefix.dev/docs/pixi/installation', + defaultChannel: 'conda-forge', + description: 'Modern package management solution for Python, C++, and R', isStandalone: true, }, }; const getInstallerDetails = () => { - if (!os || !installerType) { + if (!os || !installerType || !arch) { return null; } return installerData[installerType]; @@ -67,7 +67,7 @@ export default function CondaInstallerSelector() {
    { setOs(e.target.value); - setArch(''); + setArch(""); }} className={styles.select} > @@ -91,7 +91,7 @@ export default function CondaInstallerSelector() { {os && (
    Selected Configuration:
      -
    • - OS: - {' '} - {os} -
    • - {arch && ( -
    • - Architecture: - {' '} - {arch} -
    • - )} -
    • - Installer: - {' '} - {installerDetails.name} -
    • -
    • - Default Channel: - {' '} - {installerDetails.defaultChannel} -
    • +
    • OS: {os}
    • + {arch &&
    • Architecture: {arch}
    • } +
    • Installer: {installerDetails.name}
    • +
    • Default Channel: {installerDetails.defaultChannel}
    From d82a741866432b04c3af454dde63819014b57cd0 Mon Sep 17 00:00:00 2001 From: Avik-creator Date: Fri, 15 Nov 2024 21:13:54 +0530 Subject: [PATCH 15/15] FEAT: Fixed Lint Issues. --- src/components/Installer/styles.module.css | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/Installer/styles.module.css b/src/components/Installer/styles.module.css index 438d122a..b7884a77 100644 --- a/src/components/Installer/styles.module.css +++ b/src/components/Installer/styles.module.css @@ -47,7 +47,6 @@ border-radius: 4px; } - .details_list { margin-top: 0.5rem; padding-left: 1.5rem; @@ -67,16 +66,16 @@ border-radius: 4px; } -@media(prefers-color-scheme: dark){ - .details_wrapper { - background-color: #0f6c12; - color: white; - } +@media (prefers-color-scheme: dark) { + .details_wrapper { + background-color: #0f6c12; + color: white; + } - .link { - color: white; - display: inline-block; - margin-top: 0.5rem; - text-decoration: underline; - } + .link { + color: white; + display: inline-block; + margin-top: 0.5rem; + text-decoration: underline; + } }