From 0bc135a1d77643594d0a5ff76d9b82d485c015b7 Mon Sep 17 00:00:00 2001 From: banasa44 Date: Fri, 17 May 2024 18:15:21 +0200 Subject: [PATCH 1/3] fix: some modification to merge staging into production --- src/css/custom.css | 8 + src/css/markdown.css | 2 +- src/data/WelcomeCards.tsx | 8 - src/pages/index.tsx | 24 +-- .../01-query-examples/01-dao-query.md | 68 ------- .../01-query-examples/02-balances-query.md | 102 ----------- .../osx/subgraph/01-query-examples/index.md | 170 +++++++++++++++++- .../version-1.3.0/osx/subgraph/_category_.yml | 2 +- .../version-1.3.0/osx/subgraph/index.md | 2 +- 9 files changed, 191 insertions(+), 195 deletions(-) delete mode 100644 versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/01-dao-query.md delete mode 100644 versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/02-balances-query.md diff --git a/src/css/custom.css b/src/css/custom.css index 2bcd6946..cc483d0a 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -45,6 +45,14 @@ --warning-color: #e1c75c; --danger-color: #e75268; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); + --ifm-color-background: +; +} + +/* Custom background for images */ +.bg-white { + --tw-bg-opacity: 1; + background-color: var(--ifm-color-background); } /* Announcement banner */ diff --git a/src/css/markdown.css b/src/css/markdown.css index 0135a1ad..2a06cbd0 100644 --- a/src/css/markdown.css +++ b/src/css/markdown.css @@ -83,7 +83,7 @@ } .markdown img { - background-color: white; + background-color: var(--ifm-color-background); padding: 8px; } diff --git a/src/data/WelcomeCards.tsx b/src/data/WelcomeCards.tsx index 1a6c9816..e0e7e520 100644 --- a/src/data/WelcomeCards.tsx +++ b/src/data/WelcomeCards.tsx @@ -3,14 +3,6 @@ import {IWelcomeCardProps} from '../components/WelcomeCard'; import {RocketIcon, PageIcon, InfoIcon} from '../components'; const welcomeCards: IWelcomeCardProps[] = [ - { - title: 'Browse Use Cases', - description: - 'Check out how developers are leveraging Aragon OSx for their projects', - icon: , - linkLabel: 'Aragon Projects Directory', - href: 'https://www.notion.so/aragonorg/Aragon-Ecosystem-Projects-36c3cfd85c3d43f0b8bebb0e2811c298?pvs=4', - }, { title: 'Join our Developer Community', description: diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 0426d3b4..26fac192 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -18,18 +18,6 @@ export default function Home(): JSX.Element { img={require('@site/static/img/welcome-image.png').default} imgAlt="Welcome to Aragon OSx" /> - - {welcomeCards.map((card, index) => ( - - ))} - Explore Products {componentCards.map((card, index) => ( @@ -43,6 +31,18 @@ export default function Home(): JSX.Element { /> ))} + + {welcomeCards.map((card, index) => ( + + ))} + ); diff --git a/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/01-dao-query.md b/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/01-dao-query.md deleted file mode 100644 index b405b520..00000000 --- a/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/01-dao-query.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: DAO Query [WIP] -sidebar_label: DAO Query ---- - -## DAO Query - -The query - -```ts -import {gql} from 'graphql-request'; - -export const QueryDao = gql` - query Dao($address: ID!) { - dao(id: $address) { - id - subdomain - metadata - createdAt - plugins { - appliedPreparation { - pluginAddress - } - appliedPluginRepo { - subdomain - } - appliedVersion { - build - release { - release - } - } - } - } - } -`; -``` - - -The return - -```json -{ - "data": { - "dao": { - "id": "0x02bbc496bebc9a06c239670cea663c43cead899f", - "subdomain": "test", - "metadata": "ipfs://QmVGCibCLPgqA8eszxQJMzQFcmQAdrkyhTGH6EB5ERivsR", - "createdAt": "1677584087", - "plugins": [ - { - "appliedPreparation": { - "pluginAddress": "0x404f4bbd06e3a42c70297633e440b11bb083d482" - }, - "appliedPluginRepo": { - "subdomain": "multisig" - }, - "appliedVersion": { - "build": 1, - "release": { - "release": 1 - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/02-balances-query.md b/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/02-balances-query.md deleted file mode 100644 index 7c4fd349..00000000 --- a/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/02-balances-query.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Balances Query [WIP] -sidebar_label: Balances Query ---- - -## Balances Query - -The query - -```ts -import {gql} from 'graphql-request'; - -export const QueryTokenBalances = gql` - query TokenBalances( - $where: TokenBalance_filter! - $limit: Int! - $skip: Int! - $direction: OrderDirection! - $sortBy: TokenBalance_orderBy! - ) { - tokenBalances( - where: $where - first: $limit - skip: $skip - orderDirection: $direction - orderBy: $sortBy - ) { - lastUpdated - __typename - ... on ERC20Balance { - balance - token { - name - decimals - symbol - id - } - } - ... on ERC721Balance { - token { - name - symbol - id - } - tokenIds - } - ... on NativeBalance { - balance - } - ... on ERC1155Balance { - metadataUri - token { - id - } - balances { - amount - id - tokenId - } - } - } - } -`; -``` - - -The return - -```json -{ - "data": { - "tokenBalances": [ - { - "lastUpdated": "1682856167", - "__typename": "ERC20Balance", - "balance": "308999000000000004456448", - "token": { - "name": "VEGAHVB", - "decimals": 18, - "symbol": "VGH", - "id": "0x63677b9f25431e361f15019637533b4228cdc3ef" - } - }, - { - "lastUpdated": "1682856587", - "__typename": "ERC20Balance", - "balance": "499999999999999991611392", - "token": { - "name": "42K", - "decimals": 18, - "symbol": "42K", - "id": "0x7604fb940b31c988405847cc2db7a90938b529fc" - } - }, - { - "lastUpdated": "1697108195", - "__typename": "NativeBalance", - "balance": "2010000000000000" - } - ] - } -} \ No newline at end of file diff --git a/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/index.md b/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/index.md index 7ecf3541..cee75c7b 100644 --- a/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/index.md +++ b/versioned_docs/version-1.3.0/osx/subgraph/01-query-examples/index.md @@ -1,8 +1,174 @@ --- -title: Query Examples [WIP] +title: Query Examples sidebar_label: Query Examples --- ## Querying in Subgraph -This section will contain useful queries. \ No newline at end of file +This section contains useful queries for interacting with Aragon subgraphs. + +Use these examples as templates to build your own queries and gain insights from the indexed blockchain data. + +## DAO Query + +The following query retrieves details about a specific DAO and its associated plugins. + +```ts +import {gql} from 'graphql-request'; + +export const QueryDao = gql` + query Dao($address: ID!) { + dao(id: $address) { + id + subdomain + metadata + createdAt + plugins { + appliedPreparation { + pluginAddress + } + appliedPluginRepo { + subdomain + } + appliedVersion { + build + release { + release + } + } + } + } + } +`; +``` + +The return + +```json +{ + "data": { + "dao": { + "id": "0x02bbc496bebc9a06c239670cea663c43cead899f", + "subdomain": "test", + "metadata": "ipfs://QmVGCibCLPgqA8eszxQJMzQFcmQAdrkyhTGH6EB5ERivsR", + "createdAt": "1677584087", + "plugins": [ + { + "appliedPreparation": { + "pluginAddress": "0x404f4bbd06e3a42c70297633e440b11bb083d482" + }, + "appliedPluginRepo": { + "subdomain": "multisig" + }, + "appliedVersion": { + "build": 1, + "release": { + "release": 1 + } + } + } + ] + } + } +} +``` + +## Balances Query + +The following query retrieves token balances, including ERC20, ERC721, ERC1155, and native balances. + +```ts +import {gql} from 'graphql-request'; + +export const QueryTokenBalances = gql` + query TokenBalances( + $where: TokenBalance_filter! + $limit: Int! + $skip: Int! + $direction: OrderDirection! + $sortBy: TokenBalance_orderBy! + ) { + tokenBalances( + where: $where + first: $limit + skip: $skip + orderDirection: $direction + orderBy: $sortBy + ) { + lastUpdated + __typename + ... on ERC20Balance { + balance + token { + name + decimals + symbol + id + } + } + ... on ERC721Balance { + token { + name + symbol + id + } + tokenIds + } + ... on NativeBalance { + balance + } + ... on ERC1155Balance { + metadataUri + token { + id + } + balances { + amount + id + tokenId + } + } + } + } +`; +``` + +The return + +```json +{ + "data": { + "tokenBalances": [ + { + "lastUpdated": "1682856167", + "__typename": "ERC20Balance", + "balance": "308999000000000004456448", + "token": { + "name": "VEGAHVB", + "decimals": 18, + "symbol": "VGH", + "id": "0x63677b9f25431e361f15019637533b4228cdc3ef" + } + }, + { + "lastUpdated": "1682856587", + "__typename": "ERC20Balance", + "balance": "499999999999999991611392", + "token": { + "name": "42K", + "decimals": 18, + "symbol": "42K", + "id": "0x7604fb940b31c988405847cc2db7a90938b529fc" + } + }, + { + "lastUpdated": "1697108195", + "__typename": "NativeBalance", + "balance": "2010000000000000" + } + ] + } +} +``` + +To learn more about Aragon Subgraph entities and fields, visit the next section, [Reference Guide](../reference-guide/index.md). diff --git a/versioned_docs/version-1.3.0/osx/subgraph/_category_.yml b/versioned_docs/version-1.3.0/osx/subgraph/_category_.yml index 65c6e33a..8ad5c5ac 100644 --- a/versioned_docs/version-1.3.0/osx/subgraph/_category_.yml +++ b/versioned_docs/version-1.3.0/osx/subgraph/_category_.yml @@ -1,3 +1,3 @@ collapsible: true collapsed: false -label: Subgraph (WiP) +label: Subgraph diff --git a/versioned_docs/version-1.3.0/osx/subgraph/index.md b/versioned_docs/version-1.3.0/osx/subgraph/index.md index d879a2bb..a62a8322 100644 --- a/versioned_docs/version-1.3.0/osx/subgraph/index.md +++ b/versioned_docs/version-1.3.0/osx/subgraph/index.md @@ -1,5 +1,5 @@ --- -title: Aragon Subgraph [WIP] +title: Aragon Subgraph sidebar_label: Introduction sidebar_position: 6 --- From 8175f552579953bf40202dfd8dafbd0b5a4f6d3a Mon Sep 17 00:00:00 2001 From: banasa44 Date: Tue, 21 May 2024 15:23:23 +0200 Subject: [PATCH 2/3] fix: disable dark theme, change labels for tutorials --- docs/osx/02-how-to-guides/01-dao/index.md | 2 +- docs/osx/02-how-to-guides/02-plugin-development/index.md | 2 +- docusaurus.config.js | 4 ++++ .../version-1.3.0/osx/02-how-to-guides/01-dao/index.md | 2 +- .../osx/02-how-to-guides/02-plugin-development/index.md | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/osx/02-how-to-guides/01-dao/index.md b/docs/osx/02-how-to-guides/01-dao/index.md index 0fbbbaac..266deb41 100644 --- a/docs/osx/02-how-to-guides/01-dao/index.md +++ b/docs/osx/02-how-to-guides/01-dao/index.md @@ -1,6 +1,6 @@ --- title: How to Operate a DAO -sidebar_title: Operating a DAO +sidebar_label: Operating a DAO --- DAOs are decentralized autonomous organizations. They are a group of people managing on-chain assets through a set of smart contracts. diff --git a/docs/osx/02-how-to-guides/02-plugin-development/index.md b/docs/osx/02-how-to-guides/02-plugin-development/index.md index 8cf0d3cd..e9449456 100644 --- a/docs/osx/02-how-to-guides/02-plugin-development/index.md +++ b/docs/osx/02-how-to-guides/02-plugin-development/index.md @@ -1,6 +1,6 @@ --- title: How to build a DAO Plugin -sidebar_title: Developing a Plugin +sidebar_label: Developing a Plugin --- ## Plugin Development Quickstart Guide diff --git a/docusaurus.config.js b/docusaurus.config.js index 3e7ba407..76a218c9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -137,6 +137,10 @@ const config = { ], copyright: `Copyright © ${new Date().getFullYear()} Aragon Association, Inc.`, }, + colorMode: { + defaultMode: 'light', + disableSwitch: false, + }, prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, diff --git a/versioned_docs/version-1.3.0/osx/02-how-to-guides/01-dao/index.md b/versioned_docs/version-1.3.0/osx/02-how-to-guides/01-dao/index.md index 0fbbbaac..266deb41 100644 --- a/versioned_docs/version-1.3.0/osx/02-how-to-guides/01-dao/index.md +++ b/versioned_docs/version-1.3.0/osx/02-how-to-guides/01-dao/index.md @@ -1,6 +1,6 @@ --- title: How to Operate a DAO -sidebar_title: Operating a DAO +sidebar_label: Operating a DAO --- DAOs are decentralized autonomous organizations. They are a group of people managing on-chain assets through a set of smart contracts. diff --git a/versioned_docs/version-1.3.0/osx/02-how-to-guides/02-plugin-development/index.md b/versioned_docs/version-1.3.0/osx/02-how-to-guides/02-plugin-development/index.md index 8cf0d3cd..e9449456 100644 --- a/versioned_docs/version-1.3.0/osx/02-how-to-guides/02-plugin-development/index.md +++ b/versioned_docs/version-1.3.0/osx/02-how-to-guides/02-plugin-development/index.md @@ -1,6 +1,6 @@ --- title: How to build a DAO Plugin -sidebar_title: Developing a Plugin +sidebar_label: Developing a Plugin --- ## Plugin Development Quickstart Guide From d923567d2ef15cec13d7142272a64d4f9378de00 Mon Sep 17 00:00:00 2001 From: banasa44 Date: Tue, 21 May 2024 15:38:52 +0200 Subject: [PATCH 3/3] fix: change style for welcomecard --- docusaurus.config.js | 2 +- src/pages/index.tsx | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 76a218c9..d153d336 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -139,7 +139,7 @@ const config = { }, colorMode: { defaultMode: 'light', - disableSwitch: false, + disableSwitch: true, }, prism: { theme: lightCodeTheme, diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 26fac192..9f9385fd 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -31,7 +31,7 @@ export default function Home(): JSX.Element { /> ))} - + {welcomeCards.map((card, index) => ( ))} - + ); @@ -56,7 +56,13 @@ const ComponentCardsWrapper = styled.div.attrs({ })``; const WelcomeCardsWrapper = styled.div.attrs({ className: 'flex md:flex-row md:space-x-4 md:space-y-0 flex-col space-y-4', -})``; +})` + display: flex; + justify-content: center; /* Centers children horizontally */ + align-items: center; /* Centers children vertically */ + margin: auto; /* Centers the wrapper itself within its parent */ +`; + const ComponentCardsTitle = styled.p.attrs({ className: 'font-medium text-xl', })`