Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Jul 11, 2024
2 parents ea66d7a + 945203e commit 8d85f2b
Show file tree
Hide file tree
Showing 36 changed files with 543 additions and 269 deletions.
2 changes: 1 addition & 1 deletion developer-tools/dashboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Banner from '@site/src/components/Banner'

# Infura dashboard documentation

The Infura dashboard provides users with a comprehensive overview and control of their blockchain infrastructure. It serves
The Infura dashboard provides developers with a comprehensive overview and control of their blockchain infrastructure. It serves
as a central hub for managing API keys and access, monitoring usage, and accessing account and billing information.

<Banner>
Expand Down
23 changes: 14 additions & 9 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ const config = {
label: "What's new?",
position: "right",
},
{
href: "https://support.metamask.io/",
label: "User support",
position: "right",
},
/* Language drop down
{
type: "localeDropdown",
Expand All @@ -225,17 +230,9 @@ const config = {
title: "Documentation",
items: [
{
label: "Home",
to: "/",
},
{
label: "MetaMask wallet",
label: "Wallet",
to: "/wallet",
},
{
label: "MetaMask SDK",
to: "/wallet/how-to/use-sdk",
},
{
label: "Snaps",
to: "/snaps",
Expand All @@ -244,6 +241,10 @@ const config = {
label: "Services",
to: "/services",
},
{
label: "Infura dashboard",
to: "/developer-tools/dashboard",
},
],
},
{
Expand Down Expand Up @@ -282,6 +283,10 @@ const config = {
label: "Contribute to the docs",
href: "https://github.com/MetaMask/metamask-docs/blob/main/CONTRIBUTING.md",
},
{
label: "MetaMask user support",
href: "https://support.metamask.io/",
},
],
},
{
Expand Down
2 changes: 2 additions & 0 deletions services/reference/blast/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import CardList from '@site/src/components/CardList'
Blast is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).

Infura provides Open Beta access to Blast. During this period, there might be feature limitations. Performance issues are not expected, but they are possible as we optimize and stabilize the service.

:::

Blast is an Ethereum layer 2 (L2) scaling solution that uses an optimistic rollup architecture, providing a
Expand Down
2 changes: 2 additions & 0 deletions services/reference/mantle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import CardList from '@site/src/components/CardList'
Mantle is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).

Infura provides Open Beta access to Mantle. During this period, there might be feature limitations. Performance issues are not expected, but they are possible as we optimize and stabilize the service.

:::

Mantle is an Ethereum layer 2 (L2) scaling solution that leverages an optimistic rollup architecture
Expand Down
2 changes: 1 addition & 1 deletion services/reference/zksync/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CardList from '@site/src/components/CardList'
ZKsync Era is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).

Infura provides public beta access to ZKsync Era.
Infura provides Open Beta access to the ZKsync Era network. During this period, there might be feature limitations. Performance issues are not expected, but they are possible as we optimize and stabilize the service.

Currently, historical state data starting from June 19th, 2024 is available. Full historical state information for ZKsync Era will be announced when it is available.

Expand Down
4 changes: 4 additions & 0 deletions snaps/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,7 @@ MetaMask Snaps team and community on [GitHub discussions](https://github.com/Met
and the **mm-snaps-dev** channel on [Consensys Discord](https://discord.gg/consensys).

See the full list of [Snaps resources](learn/resources.md) for more information.

:::info MetaMask user support
If you need MetaMask user support, visit the [MetaMask Help Center](https://support.metamask.io/).
:::
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type CardItem = {

export default function Card({ title, link, description }: CardItem) {
return (
<div className="col col--4 margin-top--sm margin-bottom--md">
<div className="col col--6 margin-bottom--lg">
<Link className={clsx(styles.root, "card")} href={link}>
<div className="card__header">
<h3>{title}</h3>
Expand Down
43 changes: 43 additions & 0 deletions src/components/CardSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from "react";
import Card, { type CardItem } from "@site/src/components/Card";

const CardList: CardItem[] = [
{
title: "Wallet",
link: "/wallet",
description: (<>
Integrate your dapp with MetaMask using the Wallet API. You can interact with your users&apos; Ethereum accounts from multiple dapp platforms.
</>),
},
{
title: "Snaps",
link: "/snaps",
description: (<>
Extend the functionality of MetaMask using Snaps. You can create a Snap to add support for custom networks, account types, APIs, and more.
</>),
},
{
title: "Services",
link: "/services",
description: (<>
Power your dapp or Snap using services provided by MetaMask and Infura. This includes APIs aimed at optimizing essential development tasks.
</>),
},
{
title: "Infura dashboard",
link: "/developer-tools/dashboard",
description: (<>
Use the Infura dashboard as a central hub for managing your Infura API keys, monitoring usage, and accessing account and billing information.
</>),
},
];

export default function CardSection(): JSX.Element {
return (
<section className="container margin-top--sm margin-bottom--lg">
<div className="row">
{CardList.map((props, idx) => (<Card key={idx} {...props} />))}
</div>
</section>
);
}
24 changes: 8 additions & 16 deletions src/components/CodeTerminal/CodeTerminal.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React, { useState, useMemo } from "react"
import useUser from "@site/src/hooks/useUser"
import TerminalViewBox from "./TerminalViewBox"
import ControlPanel from "./ControlPanel"
import { INFO_MSG } from "./AlertMsg"
import MessageBox from "@site/src/components/MessageBox/MessageBox"
import Select from "react-dropdown-select"
import { INIT_REQ_SET } from "@site/src/lib/constants"
import { trackClickForSegmentAnalytics } from "@site/src/lib/segmentAnalytics"
import Heading from "@theme/Heading"
import React, { useState, useMemo } from "react";
import useUser from "@site/src/hooks/useUser";
import TerminalViewBox from "./TerminalViewBox";
import ControlPanel from "./ControlPanel";
import { INFO_MSG } from "./AlertMsg";
import MessageBox from "@site/src/components/MessageBox/MessageBox";
import { INIT_REQ_SET } from "@site/src/lib/constants";
import Heading from '@theme/Heading'

const CodeTerminal = () => {
const { user, keys, loading: keysLoading } = useUser()
Expand Down Expand Up @@ -98,12 +96,6 @@ const CodeTerminal = () => {
method: "GET",
}
}
trackClickForSegmentAnalytics({
type: "Submit Button",
clickText: "Send Request",
location: "https://docs.infura.io/",
userId: user.id,
})
try {
const res = await fetch(URL, params)
if (res.ok) {
Expand Down
46 changes: 41 additions & 5 deletions src/components/ParserOpenRPC/AuthBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from "react"
import Link from "@docusaurus/Link"
import styles from "./styles.module.css"
import global from "../global.module.css"
import React from "react";
import Link from "@docusaurus/Link";
import styles from "./styles.module.css";
import global from "../global.module.css";
import { EIP6963ProviderDetail } from "@site/src/hooks/store.ts"

interface AuthBoxProps {
isMetamaskInstalled: boolean
metamaskProviders: any;
handleConnect: (i) => void;
selectedProvider?: number;
}

const MetamaskInstallMessage = () => (
Expand All @@ -19,6 +22,39 @@ const MetamaskInstallMessage = () => (
</div>
)

<<<<<<< HEAD
export const AuthBox = ({ isMetamaskInstalled }: AuthBoxProps) => {
return <>{!isMetamaskInstalled ? <MetamaskInstallMessage /> : null}</>
}
=======
export const AuthBox = ({ metamaskProviders = [], selectedProvider, handleConnect }: AuthBoxProps) => {
if (metamaskProviders.length === 0) {
return <MetamaskInstallMessage />
}

if (metamaskProviders.length > 0) {
return null
}

return (
<div className={styles.msgWrapper}>
<p>Select a MetaMask provider to use interactive features:</p>
<div className={styles.mmBtnRow}>
{metamaskProviders.map((provider: EIP6963ProviderDetail, i) => (
<div key={provider.info.uuid} className={styles.mmBtnCol}>
<button className={styles.mmBtn} onClick={() => handleConnect(i)}>
<img
src={provider.info.icon}
alt={provider.info.name}
width="30"
/>
<div className="padding-left--md">{provider.info.name}</div>
{selectedProvider === i && <span className={styles.mmBtnCheck}>&#10003;</span>}
</button>
</div>
))}
</div>
</div>
);
};
>>>>>>> main
34 changes: 34 additions & 0 deletions src/components/ParserOpenRPC/AuthBox/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,37 @@
font-size: 14px;
line-height: 22px;
}

.mmBtnRow {
display: flex;
flex-wrap: wrap;
}

.mmBtnCol {
width: 100%;
margin-bottom: 10px;
}

.mmBtn {
position: relative;
display: flex;
align-items: center;
padding: 16px 30px 16px 20px;
width: 100%;
background: none;
border-radius: 10px;
outline: none;
font-size: 16px;
font-weight: 500;
line-height: 22px;
border: 1px solid rgba(3, 118, 201, 1);
color: rgba(3, 118, 201, 1);
}

.mmBtnCheck {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 15px;
font-size: 16px;
}
4 changes: 1 addition & 3 deletions src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ export const CollapseBox = ({
)}
></div>
</button>
<Collapsible lazy collapsed={collapsed}>
{children}
</Collapsible>
<Collapsible animation={{ duration: 100, easing: "ease-in" }} lazy={false} collapsed={collapsed}>{children}</Collapsible>
</div>
)
}
9 changes: 5 additions & 4 deletions src/components/ParserOpenRPC/CollapseBox/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
padding: 12px 22px;
margin-bottom: 1px;
cursor: pointer;
transition-property: "border-color", "background-color";
transition-duration: 0.2s;
transition-timing-function: ease;
/*transition-property: 'border-color', 'background-color';*/
/*transition-duration: .2s;*/
/*transition-timing-function: ease;*/
}

.collapseIcon {
Expand All @@ -34,7 +34,7 @@
border-top: 2px solid #0376c9;
border-right: 2px solid #0376c9;
transform: rotate(45deg);
transition: transform 0.2s ease;
/*transition: transform .2s ease;*/
}

.collapseBtn:hover {
Expand All @@ -61,6 +61,7 @@
border-color: transparent;
width: 100%;
border-radius: 0;
border-bottom: 1px solid #848C96;
}

.collapsedBtnView:hover {
Expand Down
5 changes: 4 additions & 1 deletion src/components/ParserOpenRPC/DetailsBox/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
}

.paramItemWrapper {
border-top: 1px solid #848c96;
padding: 0 1rem;
}

.paramItemWrapper:not(:first-child) {
border-top: 1px solid #848C96;
}

.borderTopLine {
border-top: 1px solid #848c96;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,8 @@ export const ConditionalField = (props: FieldTemplateProps) => {
className={clsx(styles.tableValueRow, styles.tableValueRowPadding)}
>
{formData === undefined ? "" : String(formData)}
<span className={styles.tableColumnType}>
<span
className={styles.dropdown}
onClick={() => {
setIsOpened(!isOpened)
}}
>
<span className={clsx(styles.tableColumnType, styles.tableColumnTypeDropdown)} onClick={() => { setIsOpened(!isOpened); }}>
<span className={styles.dropdown}>
{schema?.anyOf ? "anyOf" : "oneOf"}
<span
className={clsx(
Expand Down Expand Up @@ -114,7 +109,7 @@ export const ConditionalField = (props: FieldTemplateProps) => {
onClick={onDropdownOptionClick}
data-value={listItem.title}
>
{`${listItem.title}: ${listItem?.enum ? "enum" : listItem.type}`}
{listItem.title}
</li>
))}
</ul>
Expand Down
15 changes: 10 additions & 5 deletions src/components/ParserOpenRPC/InteractiveBox/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,18 @@
line-height: 24px;
font-size: 14px;
}
.tableColumnTypeDropdown {
width: 100%;
justify-content: flex-end;
}
.tableColumnTypeDropdown:hover {
cursor: pointer;
}
.tableLabelIconError {
width: 11px;
position: absolute;
left: 4px;
width: 13px;
height: 11px;
margin-left: 8px;
background: url("/img/icons/error-icon.svg") no-repeat 50% 50%;
}
.tableColumnIcon {
Expand Down Expand Up @@ -105,9 +113,6 @@
.deleteIconCentered {
top: 50%;
}
.deleteIconComplex {
top: 27px;
}
.dropdown {
display: flex;
align-items: center;
Expand Down
Loading

0 comments on commit 8d85f2b

Please sign in to comment.