Skip to content

Commit

Permalink
Update docs navbar (#838)
Browse files Browse the repository at this point in the history
* update docs navbar

* complete navbar

* fix navbar

* fix navbar

* update changelog

* update changelog

* fix changelog

* update wizard and rename usage -> components

* fix broken links

* reordered changelog

* fix default collapsed sections
  • Loading branch information
martriay authored Dec 13, 2023
1 parent 439c144 commit e7f63bb
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 34 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +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

- Use ComponentState in tests (#836)
- Docsite navbar (#838)
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
54 changes: 29 additions & 25 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
* xref:index.adoc[Overview]
//* xref:wizard.adoc[Wizard]
* xref:usage.adoc[Usage]
* xref:interfaces.adoc[Interfaces and Dispatchers]
* xref:upgrades.adoc[Upgrades]
** xref:/api/upgrades.adoc[API Reference]
* xref:wizard.adoc[Wizard]
* xref:accounts.adoc[Accounts]
** xref:/guides/deployment.adoc[Counterfactual deployments]
** xref:/api/account.adoc[API Reference]
* Learn
* xref:access.adoc[Access Control]
** xref:/api/access.adoc[API Reference]
** xref:components.adoc[Components]
** xref:presets.adoc[Presets]
** xref:interfaces.adoc[Interfaces and Dispatchers]
** xref:guides/deployment.adoc[Counterfactual deployments]
// ** xref:udc.adoc[Universal Deployer Contract]

* 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:/guides/src5-migration.adoc[Migrating ERC165 to SRC5]
** xref:/api/introspection.adoc[API Reference]
** xref:introspection.adoc[Introspection]
*** xref:/guides/src5-migration.adoc[Migrating ERC165 to SRC5]
*** xref:/api/introspection.adoc[API Reference]

// * xref:udc.adoc[Universal Deployer Contract]
* xref:utilities.adoc[Utilities]
** xref:security.adoc[Security]
*** xref:/api/security.adoc[API Reference]
* xref:/presets.adoc[Presets]
** 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]
** xref:upgrades.adoc[Upgrades]
*** xref:/api/upgrades.adoc[API Reference]

** xref:utilities.adoc[Utilities]

* xref:contracts::index.adoc[Contracts for Solidity]
Original file line number Diff line number Diff line change
@@ -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]

Expand All @@ -18,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:

Expand Down Expand Up @@ -249,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}.
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/wizard.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

++++
<script async src="https://wizard.openzeppelin.com/build/embed.js"></script>
Expand Down

0 comments on commit e7f63bb

Please sign in to comment.