From a17497c6b981d8bbd1f423e6a40661b0ab20fbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Sat, 2 Dec 2023 06:03:39 +0000 Subject: [PATCH 01/11] update docs navbar --- docs/modules/ROOT/nav.adoc | 54 ++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 6e442514d..e9606d6ef 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,33 +1,41 @@ * xref:index.adoc[Overview] -//* xref:wizard.adoc[Wizard] -//* xref:extensibility.adoc[Extensibility] -* xref:interfaces.adoc[Interfaces and Dispatchers] -* xref:upgrades.adoc[Upgrades] -** xref:/api/upgrades.adoc[API Reference] -* xref:accounts.adoc[Accounts] +* Learn + +** xref:interfaces.adoc[Interfaces and Dispatchers] ** xref:/guides/deployment.adoc[Counterfactual deployments] -** xref:/api/account.adoc[API Reference] -* xref:access.adoc[Access Control] -** xref:/api/access.adoc[API Reference] +//* xref:extensibility.adoc[Extensibility] +// * xref:udc.adoc[Universal Deployer Contract] +// * xref:utilities.adoc[Utilities] -* Tokens -** xref:erc20.adoc[ERC20] -*** xref:/guides/erc20-supply.adoc[Creating Supply] -*** xref:/api/erc20.adoc[API Reference] +* Modules -** xref:erc721.adoc[ERC721] -*** xref:/api/erc721.adoc[API Reference] -// ** xref:erc1155.adoc[ERC1155] +** xref:access.adoc[Access Control] +*** xref:/api/access.adoc[API Reference] -* xref:security.adoc[Security] -** xref:/api/security.adoc[API Reference] +** xref:accounts.adoc[Accounts] +*** xref:/api/account.adoc[API Reference] -* xref:introspection.adoc[Introspection] -** xref:/api/introspection.adoc[API Reference] +** xref:introspection.adoc[Introspection] +*** xref:/api/introspection.adoc[API Reference] -// * xref:udc.adoc[Universal Deployer Contract] -// * xref:utilities.adoc[Utilities] +** xref:upgrades.adoc[Upgrades] +*** xref:/api/upgrades.adoc[API Reference] + +** xref:security.adoc[Security] +*** xref:/api/security.adoc[API Reference] + +** Tokens +*** xref:erc20.adoc[ERC20] +**** xref:/guides/erc20-supply.adoc[Creating Supply] +**** xref:/api/erc20.adoc[API Reference] + +*** xref:erc721.adoc[ERC721] +**** xref:/api/erc721.adoc[API Reference] +// ** xref:erc1155.adoc[ERC1155] + +* See also -* xref:contracts::index.adoc[Contracts for Solidity] +** xref:wizard.adoc[Wizard] +** xref:contracts::index.adoc[Contracts for Solidity] From e0c42c9957669532be2f67ac2c54c3f56a8cadde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Sat, 2 Dec 2023 06:24:42 +0000 Subject: [PATCH 02/11] complete navbar --- docs/modules/ROOT/nav.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index e9606d6ef..275503c1a 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -2,12 +2,10 @@ * Learn +* xref:extensibility.adoc[Extensibility] ** xref:interfaces.adoc[Interfaces and Dispatchers] ** xref:/guides/deployment.adoc[Counterfactual deployments] - -//* xref:extensibility.adoc[Extensibility] -// * xref:udc.adoc[Universal Deployer Contract] -// * xref:utilities.adoc[Utilities] +* xref:udc.adoc[Universal Deployer Contract] * Modules @@ -20,9 +18,6 @@ ** xref:introspection.adoc[Introspection] *** xref:/api/introspection.adoc[API Reference] -** xref:upgrades.adoc[Upgrades] -*** xref:/api/upgrades.adoc[API Reference] - ** xref:security.adoc[Security] *** xref:/api/security.adoc[API Reference] @@ -33,7 +28,12 @@ *** xref:erc721.adoc[ERC721] **** xref:/api/erc721.adoc[API Reference] -// ** xref:erc1155.adoc[ERC1155] +** xref:erc1155.adoc[ERC1155] + +** xref:upgrades.adoc[Upgrades] +*** xref:/api/upgrades.adoc[API Reference] + +* xref:utilities.adoc[Utilities] * See also From 147eaf36f1d76f340458b923f1bf14c5d4113792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Sat, 2 Dec 2023 06:25:49 +0000 Subject: [PATCH 03/11] fix navbar --- docs/modules/ROOT/nav.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 275503c1a..c1024dfab 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -2,10 +2,10 @@ * Learn -* xref:extensibility.adoc[Extensibility] +** xref:extensibility.adoc[Extensibility] ** xref:interfaces.adoc[Interfaces and Dispatchers] ** xref:/guides/deployment.adoc[Counterfactual deployments] -* xref:udc.adoc[Universal Deployer Contract] +** xref:udc.adoc[Universal Deployer Contract] * Modules @@ -28,7 +28,7 @@ *** xref:erc721.adoc[ERC721] **** xref:/api/erc721.adoc[API Reference] -** xref:erc1155.adoc[ERC1155] +*** xref:erc1155.adoc[ERC1155] ** xref:upgrades.adoc[Upgrades] *** xref:/api/upgrades.adoc[API Reference] From 716402ce433bcca1c8ac1990615bae1e46dcdc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Sat, 2 Dec 2023 06:26:43 +0000 Subject: [PATCH 04/11] fix navbar --- docs/modules/ROOT/nav.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index c1024dfab..7a1d77fed 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -33,7 +33,7 @@ ** xref:upgrades.adoc[Upgrades] *** xref:/api/upgrades.adoc[API Reference] -* xref:utilities.adoc[Utilities] +** xref:utilities.adoc[Utilities] * See also From 3e912c00ec00f43e4d0d7e2ea75ef16ae8ae5bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Sat, 2 Dec 2023 07:02:50 +0000 Subject: [PATCH 05/11] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15a61afa6..1bbff9e43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +### Changed + +- Docsite navbar From 8d4ed8720144a949e95ce06444232050220c3a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Sat, 2 Dec 2023 07:03:32 +0000 Subject: [PATCH 06/11] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bbff9e43..edf9f65d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,4 +9,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Docsite navbar +- Docsite navbar (#838) From 76fe93327634a21c9d5e981ca732e42f71d7e5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Wed, 13 Dec 2023 04:44:48 +0000 Subject: [PATCH 07/11] fix changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 634d58a3a..43f2a6127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Changed - -======= ### Added - Utilities documentation (#825) From fc7b2b911f5b1017a655afe1684ececf92a6e3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Wed, 13 Dec 2023 04:53:38 +0000 Subject: [PATCH 08/11] update wizard and rename usage -> components --- docs/modules/ROOT/nav.adoc | 2 +- docs/modules/ROOT/pages/{usage.adoc => components.adoc} | 4 +--- docs/modules/ROOT/pages/wizard.adoc | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename docs/modules/ROOT/pages/{usage.adoc => components.adoc} (99%) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index ce8498169..e8d57eb5d 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -3,7 +3,7 @@ * Learn -** xref:usage.adoc[Components] +** xref:components.adoc[Components] ** xref:presets.adoc[Presets] ** xref:interfaces.adoc[Interfaces and Dispatchers] ** xref:guides/deployment.adoc[Counterfactual deployments] diff --git a/docs/modules/ROOT/pages/usage.adoc b/docs/modules/ROOT/pages/components.adoc similarity index 99% rename from docs/modules/ROOT/pages/usage.adoc rename to docs/modules/ROOT/pages/components.adoc index 2f8c3dc72..21d01a005 100644 --- a/docs/modules/ROOT/pages/usage.adoc +++ b/docs/modules/ROOT/pages/components.adoc @@ -1,9 +1,7 @@ -= Usage += Components The following documentation provides reasoning and examples on how to use Contracts for Cairo components. -== Components - :shamans-post: https://community.starknet.io/t/cairo-components/101136#components-1[Starknet Shamans post] :cairo-book: https://book.cairo-lang.org/ch99-01-05-00-components.html[Cairo book] diff --git a/docs/modules/ROOT/pages/wizard.adoc b/docs/modules/ROOT/pages/wizard.adoc index e1bdb4c54..d086e7ac2 100644 --- a/docs/modules/ROOT/pages/wizard.adoc +++ b/docs/modules/ROOT/pages/wizard.adoc @@ -5,7 +5,7 @@ Not sure where to start? Use the interactive generator below to bootstrap your contract and learn about the components offered in OpenZeppelin Cairo Contracts. -NOTE: We strongly recommend checking the xref:extensibility.adoc[Extensibility Pattern] to understand how to extend from our library. +NOTE: We strongly recommend checking the xref:components.adoc[Components] section to understand how to extend from our library. ++++ From 7e7760b3044174f2aa67f59b8613cd95b75e54c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Wed, 13 Dec 2023 07:03:11 +0000 Subject: [PATCH 09/11] fix broken links --- docs/modules/ROOT/pages/components.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/components.adoc b/docs/modules/ROOT/pages/components.adoc index 21d01a005..7f47f2be1 100644 --- a/docs/modules/ROOT/pages/components.adoc +++ b/docs/modules/ROOT/pages/components.adoc @@ -16,7 +16,7 @@ TIP: For more information on the construction and design of Starknet components, === Setup :initializable-component: xref:/security.adoc#initializable[InitializableComponent] -:accessing-storage: xref:/usage.adoc#accessing_component_storage[Accessing component storage] +:accessing-storage: xref:accessing_component_storage[Accessing component storage] The contract should first import the component and declare it with the `component!` macro: @@ -247,7 +247,7 @@ mod MyContract { == Customization -:security: xref:/usage.adoc#security[Security] +:security: xref:security[Security] WARNING: Customizing implementations and accessing component storage can potentially corrupt the state, bypass security checks, and undermine the component logic. *Exercise extreme caution*. See {security}. From be1853fad422eb17de7638badf76970d95c27db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Wed, 13 Dec 2023 07:04:09 +0000 Subject: [PATCH 10/11] reordered changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43f2a6127..3d657f5e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Utilities documentation (#825) -- Usage docs (#823) - Documentation for SRC5 migration (#821) +- Usage docs (#823) +- Utilities documentation (#825) - Documentation for presets (#832) ### Changed -- Docsite navbar (#838) - Use ComponentState in tests (#836) +- Docsite navbar (#838) From 7cd6673c196807b9bda85993ecad6db6725d858c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Wed, 13 Dec 2023 13:32:44 +0000 Subject: [PATCH 11/11] fix default collapsed sections --- docs/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/antora.yml b/docs/antora.yml index 3a76750c6..9aa50d9e2 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -5,4 +5,4 @@ nav: - modules/ROOT/nav.adoc asciidoc: attributes: - page-sidebar-collapse-default: true + page-sidebar-collapse-default: 'Access Control,Accounts,Introspection,Security,ERC20,ERC721,Upgrades'