From 95b3ae7d7fb81c80a5dc18cdf1c18e35edbcdece Mon Sep 17 00:00:00 2001
From: ronny-mysten <118224482+ronny-mysten@users.noreply.github.com>
Date: Thu, 20 Feb 2025 12:27:41 -0700
Subject: [PATCH] [docs] Remove move book topics (#21295)
## Description
Deletes the dynamic field topics that are part of the move book and
updates linking. Also fixes a recent change that killed the landing
pages pillbox descriptions. Lastly, cleans up the concepts page
pillboxes.
## Test plan
How did you test the new or updated feature?
---
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] gRPC:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
---
docs/content/concepts.mdx | 12 +++++++-----
docs/content/concepts/dynamic-fields.mdx | 7 +++++++
docs/content/concepts/dynamic-fields/tables-bags.mdx | 7 +++++++
docs/content/concepts/object-model.mdx | 4 +++-
docs/content/concepts/object-ownership.mdx | 6 ------
.../concepts/tokenomics/vesting-strategies.mdx | 1 +
.../guides/developer/app-examples/reviews-rating.mdx | 4 ++--
.../guides/developer/app-examples/tic-tac-toe.mdx | 2 +-
.../guides/developer/app-examples/weather-oracle.mdx | 4 ++--
.../guides/developer/getting-started/graphql-rpc.mdx | 2 +-
.../guides/operator/bridge-node-configuration.mdx | 1 +
docs/content/sidebars/concepts.js | 9 ---------
docs/content/standards/kiosk-apps.mdx | 2 +-
docs/site/src/components/Cards/index.tsx | 12 ++++++------
14 files changed, 39 insertions(+), 34 deletions(-)
diff --git a/docs/content/concepts.mdx b/docs/content/concepts.mdx
index 79b6f82ca8474..d2def3a984bc4 100644
--- a/docs/content/concepts.mdx
+++ b/docs/content/concepts.mdx
@@ -8,15 +8,17 @@ Sui is different than other blockchains. The concepts explored in this section p
## Move
-
-
+
+
+
+A comprehensive guide to the Move programming language on the Sui blockchain.
+
## Objects
-
@@ -30,7 +32,7 @@ Sui is different than other blockchains. The concepts explored in this section p
## Tokenomics
-
+
-
+
diff --git a/docs/content/concepts/dynamic-fields.mdx b/docs/content/concepts/dynamic-fields.mdx
index 4267c1578357b..2dd48cc4e0793 100644
--- a/docs/content/concepts/dynamic-fields.mdx
+++ b/docs/content/concepts/dynamic-fields.mdx
@@ -1,8 +1,15 @@
---
title: Dynamic (Object) Fields
description: Dynamic fields and dynamic object fields on Sui are added and removed dynamically, affect gas only when accessed, and store heterogeneous values.
+draft: true
---
+:::warning
+
+This topic is now covered in [The Move Book](https://move-book.com/programmability/dynamic-collections.html). Update your bookmarks to the new location as this page will be deleted soon and without further notice.
+
+:::
+
There are various ways to use object fields to store primitive data and other objects (wrapping), but there are a few limitations to these:
1. Object's have a finite set of fields keyed by identifiers that are fixed when you publish its module (limited to the fields in the `struct` declaration).
diff --git a/docs/content/concepts/dynamic-fields/tables-bags.mdx b/docs/content/concepts/dynamic-fields/tables-bags.mdx
index 23013ed6a6ef2..97216cb6ce327 100644
--- a/docs/content/concepts/dynamic-fields/tables-bags.mdx
+++ b/docs/content/concepts/dynamic-fields/tables-bags.mdx
@@ -1,8 +1,15 @@
---
title: Table and Bag
description: Sui provides `Table` and `Bag` collections built using dynamic fields, but with additional support to count the number of entries they contain to protect against accidental deletion when non-empty.
+draft: true
---
+:::warning
+
+This topic is now covered in [The Move Book](https://move-book.com/programmability/dynamic-fields.html). Update your bookmarks to the new location as this page will be deleted soon and without further notice.
+
+:::
+
You can extend existing objects using [dynamic fields](../dynamic-fields.mdx). Note that it's possible to delete an object that still has (potentially non-drop) dynamic fields. This might not be a concern when adding a small number of statically known additional fields to an object, but is particularly undesirable for on-chain collection types that could be holding unboundedly many key-value pairs as dynamic fields.
This topic describes two such collections -- Table and Bag -- built using dynamic fields, but with additional support to count the number of entries they contain, and protect against accidental deletion when non-empty.
diff --git a/docs/content/concepts/object-model.mdx b/docs/content/concepts/object-model.mdx
index a9b6111a01093..1f91882a94f96 100644
--- a/docs/content/concepts/object-model.mdx
+++ b/docs/content/concepts/object-model.mdx
@@ -66,4 +66,6 @@ Select a network from the following tabs to see the currently configured limits
- [Object and Package Versioning](./versioning.mdx): Versioning provides the ability to upgrade packages and objects on the Sui network.
- [Object Ownership](./object-ownership.mdx): Every object has an owner field that dictates how you can use it in transactions.
- [`sui-protocol-config`](https://github.com/MystenLabs/sui/blob/main/crates/sui-protocol-config/src/lib.rs): Crate that defines the `ProtocolConfig` struct with limit definitions.
-- [Building against Limits](https://move-book.com/guides/building-against-limits.html): The Move Book provides a concise overview for limits most projects deal with.
\ No newline at end of file
+- [Building against Limits](https://move-book.com/guides/building-against-limits.html): The Move Book provides a concise overview for limits most projects deal with.
+- [The Move Book](https://move-book.com/): A comprehensive guide to the Move programming language used on the Sui network.
+- [The Move Reference](https://move-book.com/reference/): Reference guide for the Move language.
\ No newline at end of file
diff --git a/docs/content/concepts/object-ownership.mdx b/docs/content/concepts/object-ownership.mdx
index a2ab513c6e644..4abfcae1bdddc 100644
--- a/docs/content/concepts/object-ownership.mdx
+++ b/docs/content/concepts/object-ownership.mdx
@@ -11,12 +11,6 @@ An address-owned object is owned by a specific 32-byte address that is either an
Go to [Address-Owned Objects](./object-ownership/address-owned.mdx).
-## Dynamic fields
-
-Dynamic fields and dynamic object fields on Sui are added and removed dynamically, affect gas only when accessed, and store heterogeneous values.
-
-Go to [Dynamic (Object) Fields](./dynamic-fields.mdx).
-
## Immutable
An immutable object is an object that can't be mutated, transferred, or deleted. Immutable objects have no owner, so anyone can use them.
diff --git a/docs/content/concepts/tokenomics/vesting-strategies.mdx b/docs/content/concepts/tokenomics/vesting-strategies.mdx
index 6b06783277a3e..1eb1d419c0059 100644
--- a/docs/content/concepts/tokenomics/vesting-strategies.mdx
+++ b/docs/content/concepts/tokenomics/vesting-strategies.mdx
@@ -1,5 +1,6 @@
---
title: Token Vesting Strategies
+description: If you plan to launch a token on Sui, then you might consider implementing a vesting strategy to strengthen the long-term outlook of your token.
---
If you plan to launch a token on Sui, then you might consider implementing a vesting strategy to strengthen the long-term outlook of your token. A vesting strategy typically releases your tokens to team members, investors, or other early stakeholders over time, rather than releasing them all at once.
diff --git a/docs/content/guides/developer/app-examples/reviews-rating.mdx b/docs/content/guides/developer/app-examples/reviews-rating.mdx
index a5c4057d30512..ec56bb5f11594 100644
--- a/docs/content/guides/developer/app-examples/reviews-rating.mdx
+++ b/docs/content/guides/developer/app-examples/reviews-rating.mdx
@@ -95,7 +95,7 @@ public fun register_service(db: &mut Dashboard, service_id: ID) {
A `Dashboard` is a [shared object](../../../concepts/object-ownership/shared.mdx), so any service owner can register their service to a dashboard.
A service owner should look for dashboards that best match their service attribute and register.
-A [dynamic field](../../../concepts/dynamic-fields.mdx) stores the list of services that are registered to a dashboard.
+A dynamic field stores the list of services that are registered to a dashboard. Learn more about dynamic fields in [The Move Book](https://move-book.com/programmability/dynamic-fields.html).
A service may be registered to multiple dashboards at the same time. For example, a Chinese-Italian fusion restaurant may be registered to both the Chinese and Italian dashboards.
:::info
@@ -179,7 +179,7 @@ In other words, anyone can go to a transaction explorer and find a review object
:::info
-See [Table and Bag](../../../concepts/dynamic-fields/tables-bags.mdx) for more information on the differences between `Table` and `ObjectTable`.
+See [Dynamic Collections](https://move-book.com/programmability/dynamic-collections.html) in The Move Book for more information on the differences between `Table` and `ObjectTable`.
:::
diff --git a/docs/content/guides/developer/app-examples/tic-tac-toe.mdx b/docs/content/guides/developer/app-examples/tic-tac-toe.mdx
index 6e16de5cf6cb6..c00389d200ad2 100644
--- a/docs/content/guides/developer/app-examples/tic-tac-toe.mdx
+++ b/docs/content/guides/developer/app-examples/tic-tac-toe.mdx
@@ -22,7 +22,7 @@ The guide is divided into three parts that each cover a different implementation
- **Owned objects:** The guide teaches you how to use [owned objects](../../../concepts/object-ownership/address-owned.mdx), in this case to act as the game board in the centralized and multisig version of tic-tac-toe. Owned objects are objects that are owned by a single account and can only be modified by that account. In this case, the game board is owned by a game admin, who is responsible for updating the board with each player's move.
- **Shared objects:** The guide teaches you how to use [shared objects](../../../concepts/object-ownership/shared.mdx), in this case to act as the game board in the more decentralized version of tic-tac-toe. Shared objects are objects that can be modified by multiple accounts. In this case, the game board is shared between the two players, allowing them to update the board directly.
- **Multisig accounts:** The guide teaches you how to use [multisig accounts](https://sdk.mystenlabs.com/typescript/cryptography/multisig) to share ownership of the game board between two players. Multisig accounts are accounts that require a certain threshold of signatures to authorize a transaction. In this case, the game board is owned by a 1-of-2 multisig account.
-- **Dynamic object fields:** The guide teaches you how to use [dynamic object fields](../../../concepts/dynamic-fields.mdx), in this case to transfer the actions of the players to the game board, which will be retrieved by the game admin.
+- **Dynamic object fields:** The guide teaches you how to use dynamic object fields, in this case to transfer the actions of the players to the game board, which will be retrieved by the game admin. See [The Move Book](https://move-book.com/programmability/dynamic-object-fields.html) to learn more about dynamic object fields.
## What you need
diff --git a/docs/content/guides/developer/app-examples/weather-oracle.mdx b/docs/content/guides/developer/app-examples/weather-oracle.mdx
index 0ae821b671231..ebf7b347485c0 100644
--- a/docs/content/guides/developer/app-examples/weather-oracle.mdx
+++ b/docs/content/guides/developer/app-examples/weather-oracle.mdx
@@ -96,11 +96,11 @@ fun init(otw: WEATHER, ctx: &mut TxContext) {
- The first struct, `AdminCap`, is a capability.
- The second struct, `WEATHER`, is a one-time witness that ensures only a single instance of this `Weather` ever exists. See [One Time Witness](https://move-book.com/programmability/one-time-witness.html) in The Move Book for more information.
-- The `WeatherOracle` struct works as a registry and stores the `geoname_id`s of the `CityWeatherOracle`s as [dynamic fields](concepts/dynamic-fields.mdx).
+- The `WeatherOracle` struct works as a registry and stores the `geoname_id`s of the `CityWeatherOracle`s as dynamic fields. See [The Move Book](https://move-book.com/programmability/dynamic-fields.html) to learn more about dynamic fields.
- The `init` function creates and sends the `Publisher` and `AdminCap` objects to the sender. Also, it creates a [shared object](concepts/object-ownership/shared.mdx) for all the `CityWeatherOracle`s. See [Module Initializer](https://move-book.com/programmability/module-initializer.html) in The Move Book for more information.
So far, you've set up the data structures within the module.
-Now, create a function that initializes a `CityWeatherOracle` and adds it as [dynamic fields](concepts/dynamic-fields.mdx) to the `WeatherOracle` object:
+Now, create a function that initializes a `CityWeatherOracle` and adds it as dynamic fields to the `WeatherOracle` object:
```rust title='weather.move'
public fun add_city(
diff --git a/docs/content/guides/developer/getting-started/graphql-rpc.mdx b/docs/content/guides/developer/getting-started/graphql-rpc.mdx
index 83524e49fafae..8794e4884ddf4 100644
--- a/docs/content/guides/developer/getting-started/graphql-rpc.mdx
+++ b/docs/content/guides/developer/getting-started/graphql-rpc.mdx
@@ -250,7 +250,7 @@ fragment MoveValueFields on MoveValue {
## Fetching all dynamic fields on an object
-This query can be used to paginate over the dynamic fields of an object. This works even when the object in question is [wrapped](../../../concepts/object-ownership/wrapped.mdx), by using the owner query, so can be used for iterating over the elements of on-chain data structures, like [Tables and Bags](../../../concepts/dynamic-fields/tables-bags.mdx).
+This query can be used to paginate over the dynamic fields of an object. This works even when the object in question is [wrapped](../../../concepts/object-ownership/wrapped.mdx), by using the owner query, so can be used for iterating over the elements of on-chain data structures, like tables and bags. See [The Move Book](https://move-book.com/programmability/dynamic-collections.html) to learn more about dynamic collections available in Move.
:::info
This example uses [fragments](../../../concepts/graphql-rpc.mdx#fragments) and [variables](../../../concepts/graphql-rpc.mdx#variables).
diff --git a/docs/content/guides/operator/bridge-node-configuration.mdx b/docs/content/guides/operator/bridge-node-configuration.mdx
index af7c6ae5e5dbd..80565402bb57a 100644
--- a/docs/content/guides/operator/bridge-node-configuration.mdx
+++ b/docs/content/guides/operator/bridge-node-configuration.mdx
@@ -1,6 +1,7 @@
---
title: Sui Bridge Validator Node Configuration
sidebar_label: Sui Bridge Node Configuration
+description: Correct configuration of your node ensures optimal performance and valid metrics data.
---
Running a Bridge Validator Node (Bridge Node) requires registering your node with the bridge committee. Correct configuration of your node ensures optimal performance and valid metrics data. Follow this topic to make sure your Bridge Node is set up properly.
diff --git a/docs/content/sidebars/concepts.js b/docs/content/sidebars/concepts.js
index 5b704c864622d..f49c1f6dfe35a 100644
--- a/docs/content/sidebars/concepts.js
+++ b/docs/content/sidebars/concepts.js
@@ -34,15 +34,6 @@ const concepts = [
'concepts/object-ownership/wrapped',
],
},
- {
- type: 'category',
- label: 'Dynamic Fields',
- link: {
- type: 'doc',
- id: 'concepts/dynamic-fields',
- },
- items: ['concepts/dynamic-fields/tables-bags'],
- },
{
type: 'category',
label: 'Transfers',
diff --git a/docs/content/standards/kiosk-apps.mdx b/docs/content/standards/kiosk-apps.mdx
index 81d5b63be3ad5..05c95046644f2 100644
--- a/docs/content/standards/kiosk-apps.mdx
+++ b/docs/content/standards/kiosk-apps.mdx
@@ -186,7 +186,7 @@ Use the `can_place(kiosk: &Kiosk): bool` function to check if the app has t
## App storage
-Every app gets its isolated storage as a [bag type](../concepts/dynamic-fields/tables-bags.mdx) that only the app module can access (providing the app witness). After you install an app, it can use the storage to store its data. Ideally, the storage should be managed in a way that allows the app to be removed from the kiosk if there are no active trades or other activities happening at the moment.
+Every app gets its isolated storage as a bag type that only the app module can access (providing the app witness). See [The Move Book](https://move-book.com/programmability/dynamic-collections.html) to learn more about dynamic collections, like bags, available in Move. After you install an app, it can use the storage to store its data. Ideally, the storage should be managed in a way that allows the app to be removed from the kiosk if there are no active trades or other activities happening at the moment.
The storage is always available to the app if it is installed. The owner of a kiosk can't access the storage of the app if the logic for it is not implemented.
diff --git a/docs/site/src/components/Cards/index.tsx b/docs/site/src/components/Cards/index.tsx
index 598a1372d7b41..030c9bf1009d4 100644
--- a/docs/site/src/components/Cards/index.tsx
+++ b/docs/site/src/components/Cards/index.tsx
@@ -1,10 +1,9 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
-import React, { useEffect, useState, useContext } from "react";
+import React, { useEffect, useState } from "react";
import { useHistory } from "@docusaurus/router";
-import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
-import {usePluginData} from '@docusaurus/useGlobalData';
+import { usePluginData } from "@docusaurus/useGlobalData";
import styles from "./styles.module.css";
export function Card(props) {
@@ -20,8 +19,8 @@ export function Card(props) {
const { descriptions } = usePluginData("sui-description-plugin");
let h = props.href;
- if (h.match(/^\//)) {
- h = h.substring(1);
+ if (!h.match(/^\//)) {
+ h = `/${h}`;
}
const d = descriptions.find((desc) => desc["id"] === h);
let description = "";
@@ -51,7 +50,8 @@ export function Card(props) {
}
export function Cards({ children, ...props }) {
- let twClassList = "grid-card gap-8 grid xl:grid-rows-${Math.ceil(children.length/3)} lg:grid-rows-${Math.ceil(children.length/2)} xl:grid-cols-3 lg:grid-cols-2 justify-start pb-8";
+ let twClassList =
+ "grid-card gap-8 grid xl:grid-rows-${Math.ceil(children.length/3)} lg:grid-rows-${Math.ceil(children.length/2)} xl:grid-cols-3 lg:grid-cols-2 justify-start pb-8";
return (
{children}