Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp Wallet get started docs #1114

Merged
merged 16 commits into from Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
246 changes: 77 additions & 169 deletions docusaurus.config.js
Expand Up @@ -136,232 +136,132 @@ const config = {
fromExtensions: ["html", "htm"],
redirects: [
{
from: "/guide/",
to: "/wallet/",
from: ["/guide", "/guide/common-terms", "/guide/contributors", "/wallet/how-to/get-started-building", "/wallet/how-to/set-up-dev-environment", "/guide/create-dapp", "/guide/getting-started", "/wallet/category/get-started", "/wallet/get-started/set-up-dev-environment", "/wallet/how-to/get-started-building/set-up-dev-environment"],
to: "/wallet",
},
{
from: "/guide/getting-started",
to: "/wallet/how-to/get-started-building/set-up-dev-environment",
from: "/wallet/how-to/connect",
to: "/wallet/quickstart/javascript",
},
{
from: "/guide/common-terms",
to: "/wallet/",
from: "/wallet/category/how-to",
to: "/wallet/how-to",
},
{
from: "/guide/initializing-dapps",
to: "/wallet/how-to/interact-with-smart-contracts",
from: ["/guide/mobile-getting-started", "/guide/site-compatibility-checklist", "/guide/mobile-best-practices", "/wallet/how-to/use-mobile", "/wallet/how-to/integrate-with-mobile", "/sdk"],
to: "/wallet/how-to/use-sdk",
},
{
from: "/guide/accessing-accounts",
to: "/wallet/how-to/connect/access-accounts",
from: ["/wallet/get-started/detect-metamask", "/wallet/how-to/connect/detect-metamask", "/wallet/how-to/detect-metamask", "/wallet/how-to/discover-multiple-wallets"],
to: "/wallet/how-to/detect-wallet",
},
{
from: "/guide/sending-transactions",
to: "/wallet/how-to/send-transactions",
from: ["/wallet/get-started/detect-network", "/wallet/how-to/connect/detect-network"],
to: "/wallet/how-to/detect-network",
},
{
from: "/guide/ethereum-provider",
to: "/wallet/reference/provider-api",
from: ["/guide/accessing-accounts", "/wallet/how-to/connect/access-accounts", "/wallet/get-started/access-accounts"],
to: "/wallet/how-to/access-accounts",
},
{
from: "/guide/provider-migration",
to: "/wallet/concepts/apis",
},
{
from: "/guide/rpc-api",
to: "/wallet/reference/json-rpc-api",
from: "/guide/sending-transactions",
to: "/wallet/how-to/send-transactions",
},
{
from: "/guide/signing-data",
to: "/wallet/how-to/sign-data",
},
{
from: "/guide/registering-function-names",
to: "/wallet/how-to/display/method-names",
from: "/wallet/how-to/use-siwe",
to: "/wallet/how-to/sign-data/siwe",
},
{
from: "/guide/registering-your-token",
from: ["/guide/registering-your-token", "/wallet/how-to/register-token"],
to: "/wallet/how-to/display/tokens",
},
{
from: "/guide/defining-your-icon",
from: ["/guide/registering-function-names", "/wallet/how-to/register-method-names"],
to: "/wallet/how-to/display/method-names",
},
{
from: ["/guide/defining-your-icon", "/wallet/how-to/set-icon"],
to: "/wallet/how-to/display/icon",
},
{
from: "/guide/onboarding-library",
to: "/wallet/how-to/onboard-users",
from: "/wallet/how-to/request-permissions",
to: "/wallet/how-to/manage-permissions",
},
{
from: "/guide/metamask-extension-provider",
to: "/wallet/how-to/access-provider",
},
{
from: "/guide/mobile-getting-started",
to: "/wallet/how-to/connect/set-up-sdk",
},
{
from: "/guide/site-compatibility-checklist",
to: "/wallet/how-to/connect/set-up-sdk",
},
{
from: "/guide/mobile-best-practices",
to: "/wallet/how-to/connect/set-up-sdk",
},
{
from: "/guide/snaps",
to: "/snaps/",
},
{
from: "/guide/snaps-development-guide",
to: "/snaps/how-to/develop-a-snap",
from: "/guide/initializing-dapps",
to: "/wallet/how-to/interact-with-smart-contracts",
},
{
from: "/guide/snaps-concepts",
to: "/snaps/concepts",
from: "/guide/ethereum-provider",
to: "/wallet/reference/provider-api",
},
{
from: ["/guide/snaps-rpc-api", "/snaps/reference/rpc-api"],
to: "/snaps/reference/snaps-api",
from: ["/guide/onboarding-library", "/wallet/how-to/use-onboarding-library"],
to: "/wallet/how-to/onboard-users",
},
{
from: "/guide/snaps-permissions",
to: "/snaps/how-to/request-permissions",
from: ["/wallet/get-started/run-development-network", "/wallet/how-to/get-started-building/run-devnet"],
to: "/wallet/how-to/run-devnet",
},
{
from: ["/guide/snaps-exports", "/snaps/reference/exports"],
to: "/snaps/reference/entry-points",
from: "/wallet/how-to/get-started-building/secure-dapp",
to: "/wallet/how-to/secure-dapp",
},
{
from: "/guide/snaps-patching-dependencies",
to: "/snaps/how-to/troubleshoot",
from: "/wallet/category/concepts",
to: "/wallet/concepts",
},
{
from: "/guide/create-dapp",
to: "/wallet/how-to/get-started-building/set-up-dev-environment",
from: ["/guide/provider-migration", "/wallet/concepts/provider-api", "/wallet/concepts/rpc-api", "/wallet/how-to/migrate-api"],
to: "/wallet/concepts/apis",
},
{
from: "/guide/contributors",
to: "/wallet/",
from: "/wallet/category/tutorials",
to: "/wallet/tutorials",
},
{
from: "/wallet/tutorials/simple-react-dapp",
to: "/wallet/tutorials/react-dapp-local-state",
},
{
from: "/wallet/category/how-to",
to: "/wallet/how-to",
},
{
from: "/wallet/category/concepts",
to: "/wallet/concepts",
},
{
from: "/wallet/category/tutorials",
to: "/wallet/tutorials",
},
{
from: "/wallet/category/reference",
to: "/wallet/reference",
},
{
from: "/snaps/category/get-started",
to: "/snaps/get-started",
},
{
from: "/snaps/category/how-to",
to: "/snaps/how-to",
},
{
from: "/snaps/category/concepts",
to: "/snaps/concepts",
},
{
from: "/snaps/category/tutorials",
to: "/snaps/tutorials",
},
{
from: "/snaps/category/reference",
to: "/snaps/reference",
},
{
from: "/wallet/category/get-started",
to: "/wallet/how-to/get-started-building",
},
{
from: "/wallet/get-started/set-up-dev-environment",
to: "/wallet/how-to/get-started-building/set-up-dev-environment",
},
{
from: "/wallet/get-started/run-development-network",
to: "/wallet/how-to/get-started-building/run-devnet",
},
{
from: "/wallet/how-to/secure-dapp",
to: "/wallet/how-to/get-started-building/secure-dapp",
},
{
from: ["/wallet/get-started/detect-metamask", "/wallet/how-to/connect/detect-metamask"],
to: "/wallet/how-to/connect/detect-wallet/metamask",
},
{
from: "/wallet/get-started/detect-network",
to: "/wallet/how-to/connect/detect-network",
},
{
from: "/wallet/get-started/access-accounts",
to: "/wallet/how-to/connect/access-accounts",
},
{
from: "/wallet/how-to/use-siwe",
to: "/wallet/how-to/sign-data/siwe",
},
{
from: "/wallet/how-to/use-mobile",
to: "/wallet/how-to/connect/set-up-sdk",
},
{
from: "/wallet/how-to/use-onboarding-library",
to: "/wallet/how-to/onboard-users",
},
{
from: "/wallet/how-to/register-token",
to: "/wallet/how-to/display/tokens",
},
{
from: "/wallet/how-to/register-method-names",
to: "/wallet/how-to/display/method-names",
},
{
from: "/wallet/how-to/set-icon",
to: "/wallet/how-to/display/icon",
},
{
from: "/wallet/concepts/provider-api",
to: "/wallet/concepts/apis",
from: ["/guide/rpc-api", "/wallet/reference/rpc-api"],
to: "/wallet/reference/json-rpc-api",
},
{
from: "/wallet/concepts/rpc-api",
to: "/wallet/concepts/apis",
from: "/guide/snaps",
to: "/snaps",
},
{
from: "/wallet/how-to/integrate-with-mobile",
to: "/wallet/how-to/connect/set-up-sdk",
from: "/snaps/category/get-started",
to: "/snaps/get-started",
},
{
from: "/wallet/how-to/migrate-api",
to: "/wallet/concepts/apis",
from: "/snaps/get-started/install-snaps",
to: "/snaps/get-started/install-flask",
},
{
from: "/sdk",
to: "/wallet/how-to/connect/set-up-sdk",
from: "/snaps/category/how-to",
to: "/snaps/how-to",
},
{
from: "/wallet/reference/rpc-api",
to: "/wallet/reference/json-rpc-api",
from: "/guide/snaps-development-guide",
to: "/snaps/how-to/develop-a-snap",
},
{
from: "/wallet/how-to/request-permissions",
to: "/wallet/how-to/manage-permissions",
from: "/guide/snaps-permissions",
to: "/snaps/how-to/request-permissions",
},
{
from: "/snaps/tutorials/custom-evm-accounts",
Expand All @@ -372,30 +272,42 @@ const config = {
to: "/snaps/how-to/use-3rd-party-snaps",
},
{
from: "/snaps/get-started/install-snaps",
to: "/snaps/get-started/install-flask",
from: "/guide/snaps-patching-dependencies",
to: "/snaps/how-to/troubleshoot",
},
{
from: ["/guide/snaps-concepts", "/snaps/category/concepts", "/snaps/concepts/lifecycle", "/snaps/concepts/user-interface"],
to: "/snaps/concepts/overview",
},
{
from: "/snaps/concepts/anatomy",
to: "/snaps/concepts/files",
},
{
from: ["/snaps/concepts/lifecycle", "/snaps/concepts/user-interface"],
to: "/snaps/concepts/overview",
from: "/snaps/category/tutorials",
to: "/snaps/tutorials",
},
{
from: "/wallet/how-to/discover-multiple-wallets",
to: "/wallet/how-to/connect/detect-wallet/multiple-wallets",
from: "/snaps/category/reference",
to: "/snaps/reference",
},
{
from: ["/guide/snaps-rpc-api", "/snaps/reference/rpc-api"],
to: "/snaps/reference/snaps-api",
},
{
from: ["/guide/snaps-exports", "/snaps/reference/exports"],
to: "/snaps/reference/entry-points",
}
].reduce((acc, item) => {
acc.push(item);
acc.push({ from: item.from + ".html", to: item.to });
return acc;
}, []),
createRedirects(existingPath) {
if (existingPath.includes("/connect/set-up-sdk")) {
if (existingPath.includes("/use-sdk")) {
return [
existingPath.replace("/connect/set-up-sdk", "/use-sdk"),
existingPath.replace("/use-sdk", "/connect/set-up-sdk"),
];
}
return undefined;
Expand All @@ -415,10 +327,6 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Metadata array here for the open graph image tag
metadata: [
{ name: 'og:image', content: '/img/metamaskog.jpeg' },
],
navbar: {
title: " │ ‎ Documentation",
logo: {
Expand All @@ -433,7 +341,7 @@ const config = {
label: "Wallet",
},
{
to: "/wallet/how-to/connect/set-up-sdk",
to: "/wallet/how-to/use-sdk",
label: "SDK",
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardList/CardListItem/index.tsx
Expand Up @@ -19,7 +19,7 @@ export default function CardListItem({ item }: CardListItemProps): JSX.Element {
const cardContent = (
<>
{item.title && (
<h2 className={clsx("text--truncate", styles.cardTitle)}>
<h2 className={clsx(styles.cardTitle)}>
{item.icon && (
<img src={item.icon} className={styles.cardIcon} />
)}
Expand Down
8 changes: 4 additions & 4 deletions src/components/SnapsSection.tsx
Expand Up @@ -3,7 +3,7 @@ import Card, { type CardItem } from "@site/src/components/Card";

const CardList: CardItem[] = [
{
title: "🏁 Get started with Snaps",
title: "🏁 Snaps quickstart",
link: "/snaps/get-started/quickstart",
description: (<>
Get started quickly by creating and customizing a simple Snap, using the Snaps template built
Expand All @@ -19,10 +19,10 @@ const CardList: CardItem[] = [
</>),
},
{
title: "🌐 Snaps JSON-RPC API",
link: "/snaps/reference/rpc-api",
title: "🌐 Snaps API",
link: "/snaps/reference/snaps-api",
description: (<>
Use the Snaps JSON-RPC API to modify the functionality of MetaMask and communicate between dapps and Snaps.
Use the Snaps API to modify the functionality of MetaMask and communicate between dapps and Snaps.
</>),
},
];
Expand Down