Skip to content

chore: switched theme to mint#23

Open
gagdiez wants to merge 1 commit intomainfrom
switch-theme
Open

chore: switched theme to mint#23
gagdiez wants to merge 1 commit intomainfrom
switch-theme

Conversation

@gagdiez
Copy link
Collaborator

@gagdiez gagdiez commented Mar 3, 2026

This PR switches the main look & feel from the docs to follow the "mint" theme as suggested by the Defuse Team.

I personally prefer the current deployed version and advice against implementing this view, but feel free to merge it if y'all feel it improves the docs readability.

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Walkthrough

This PR restructures the documentation site's navigation and landing page. The theme changes from maple to mint, navigation tabs are reorganized (including "Swaps" → "Overview"), content is redesigned into a card-based component layout, and new top-level sections are added alongside styling updates.

Changes

Cohort / File(s) Summary
Navigation & Theme Configuration
docs.json
Theme updated to mint. Navigation groups restructured: top-level tabs renamed ("Swaps" → "Overview"), "Intents" → "Introduction" group added, legacy sections removed, and new "API Reference" and "Toolkit" tabs introduced. Navbar labels updated ("System Status" → "Status", "Partners" link added) and primary action href changed to near.com.
Landing Page Content
index.mdx
Landing page redesigned from prose-centric layout to component-driven UI. Code blocks and descriptive sections replaced with Card components organized in Columns, enabling simplified navigation-focused presentation.
Landing Page Styling
style.css
New .landing-page class and theme-specific nav tab rules added to support the redesigned landing page layout and appearance across light and dark modes.

Possibly Related PRs

  • defuse-protocol/docs#21: Updates docs.json navigation group renaming and navbar label restructuring similar to this PR's navigation changes.
  • defuse-protocol/docs#22: Modifies docs navigation tabs and landing page content with component-based card entries matching this PR's content redesign approach.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A hop through the docs, so fresh and so new,
Mint-tinted pages in shades of springtime dew,
Cards arranged neatly where prose used to be,
Navigation unfolded for all eyes to see,
The burrow of knowledge, redesigned with such care!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions switching theme to mint, but the changeset includes major documentation restructuring beyond theme changes, such as navigation reorganization, content restructuring, and component-driven UI updates. Update the title to reflect the primary changes, such as: 'docs: restructure documentation layout with mint theme and new navigation' or provide a more specific title if theme change is truly the main objective.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description explicitly mentions switching to the mint theme, which is directly related to the changeset's primary documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch switch-theme

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
docs.json (3)

42-152: ⚠️ Potential issue | 🟠 Major

Top-level navigation no longer matches the required two-tab structure.

This introduces additional top-level tabs beyond the required IA and renames Home to Overview.

As per coding guidelines, "Configure two navigation tabs in docs.json: 'Home' and 'API reference'."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs.json` around lines 42 - 152, The top-level navigation in docs.json
currently contains multiple tabs ("API Reference", "Toolkit", "Market Makers",
"Verifier Contract") and has renamed the required "Home" tab to "Overview";
update docs.json to strictly configure exactly two top-level tabs named "Home"
and "API reference" (case- and spacing-exact). Remove or merge the extra tab
objects (the ones with "tab": "Toolkit", "tab": "Market Makers", "tab":
"Verifier Contract", etc.) and ensure all necessary pages are moved under the
two required tabs; rename any "Overview" tab back to "Home", and consolidate the
existing "API Reference" content under a single "API reference" tab while
preserving its groups (including the openapi entries and page lists).

159-183: ⚠️ Potential issue | 🟠 Major

Required global anchors are missing from the updated navigation model.

I don’t see global anchors for Supported Chains, System Status, and API Keys in the current config.

As per coding guidelines, "Include global anchors for 'Supported Chains', 'System Status', and 'API Keys' in docs.json."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs.json` around lines 159 - 183, The navbar configuration under "navbar" ->
"links" is missing required global anchors for Supported Chains, System Status,
and API Keys; add three new link entries with labels "Supported Chains", "System
Status", and "API Keys" to the "links" array (matching the existing link object
shape used for "Status"/"Explorer"/"Support"), and set their "href" values to
the corresponding global anchor IDs (e.g., "#supported-chains",
"#system-status", "#api-keys") so the navigation includes these anchors; update
the "links" array near the existing entries to include these new objects.

3-9: ⚠️ Potential issue | 🟠 Major

Restore required docs theme config and strict mode.

The config currently sets mint and omits strict appearance mode; this conflicts with repository requirements.

Suggested fix
-  "theme": "mint",
+  "theme": "maple",
+  "appearance": {
+    "strict": true
+  },

As per coding guidelines, "Set theme to maple with primary color #fb4d01 (orange) and enable appearance.strict: true in docs.json."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs.json` around lines 3 - 9, Update the docs.json config: change the
"theme" value from "mint" to "maple", ensure the "colors.primary" remains
"#fb4d01" (orange) and adjust the "colors" block as needed to match repository
style, and add an "appearance" object with "strict": true (i.e., set
appearance.strict: true) so the file contains "theme": "maple", "colors": {
"primary": "#fb4d01", ... }, and "appearance": { "strict": true }.
🧹 Nitpick comments (1)
index.mdx (1)

12-40: Adjust copy to consistently address the reader as “you.”

Some lines are neutral/third-person and should be rewritten in second-person voice for consistency.

As per coding guidelines, "Write in second-person voice ('you') in all documentation content."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.mdx` around lines 12 - 40, The content in index.mdx uses mixed voices
(neutral/third-person) inside several Card children — e.g., the copy nodes under
Card(title="API Quickstart"), Card(title="React Widget"), Card(title="SDK
Libraries"), Card(title="What are intents?"), Card(title="Market Makers"), and
Card(title="Verifier Contract") — and should be rewritten into consistent
second-person voice; update each Card's child text to directly address the
reader using "you" (for example change "Execute your first cross-chain swap in
minutes." if needed to "Execute your first cross-chain swap in minutes, and get
started quickly" or similar second-person phrasing) so all documentation lines
use "you" consistently. Ensure only the copy strings inside those Card
components are changed and preserve titles, icons, hrefs, and CTA props.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs.json`:
- Around line 45-53: Replace the blank group placeholders in the docs JSON (the
"group": " " objects) with named nested group entries that include a Font
Awesome icon and explicit label; e.g., change the object containing pages like
"integration/distribution-channels/1click-api/about-1click-api" to have "group":
"1Click API", add an "icon": "fas fa-something" (choose an appropriate FA icon),
and if desired wrap pages under a nested "items" or "pages" array according to
existing nav schema; repeat the same refactor for the other occurrence
referenced (the block around lines 79-87) so all group objects use named groups
and include "icon" keys to conform to the navigation standard.

In `@index.mdx`:
- Around line 17-39: The Card components use root-absolute hrefs (e.g.,
href="/integration/...") which violate the guideline to use relative paths;
update each Card's href prop to a relative path (remove the leading slash) for
internal links in this MDX file—locate the Card elements (e.g., the Card
instances titled "API Quickstart", "React Widget", "SDK Libraries", "What are
intents?", "Market Makers", "Verifier Contract") and change their href
attributes from "/..." to "./integration/..." or the correct relative path from
the current document location.
- Around line 16-43: Replace the Two <Columns> blocks with the repository's
introduction page pattern by using <CardGroup> instead: remove the <Columns
cols={4}> and <Columns cols={2}> wrappers and wrap all six <Card> components
inside a single <CardGroup> (or two <CardGroup> blocks if layout needs
grouping), keeping each <Card>'s title, icon, href, cta and body unchanged;
update imports to include CardGroup (remove Columns import if no longer used)
and ensure JSX remains valid with matching opening/closing <CardGroup> tags.
- Around line 1-3: The MDX frontmatter only contains mode and is missing
required fields; update the top frontmatter block (the leading --- section) to
include at minimum title and description keys (e.g., title: "Your Title" and
description: "Short page description"), and optionally add icon, sidebarTitle,
or openapi if this is an API page, ensuring the frontmatter remains valid YAML
inside the existing --- delimiters.

---

Outside diff comments:
In `@docs.json`:
- Around line 42-152: The top-level navigation in docs.json currently contains
multiple tabs ("API Reference", "Toolkit", "Market Makers", "Verifier Contract")
and has renamed the required "Home" tab to "Overview"; update docs.json to
strictly configure exactly two top-level tabs named "Home" and "API reference"
(case- and spacing-exact). Remove or merge the extra tab objects (the ones with
"tab": "Toolkit", "tab": "Market Makers", "tab": "Verifier Contract", etc.) and
ensure all necessary pages are moved under the two required tabs; rename any
"Overview" tab back to "Home", and consolidate the existing "API Reference"
content under a single "API reference" tab while preserving its groups
(including the openapi entries and page lists).
- Around line 159-183: The navbar configuration under "navbar" -> "links" is
missing required global anchors for Supported Chains, System Status, and API
Keys; add three new link entries with labels "Supported Chains", "System
Status", and "API Keys" to the "links" array (matching the existing link object
shape used for "Status"/"Explorer"/"Support"), and set their "href" values to
the corresponding global anchor IDs (e.g., "#supported-chains",
"#system-status", "#api-keys") so the navigation includes these anchors; update
the "links" array near the existing entries to include these new objects.
- Around line 3-9: Update the docs.json config: change the "theme" value from
"mint" to "maple", ensure the "colors.primary" remains "#fb4d01" (orange) and
adjust the "colors" block as needed to match repository style, and add an
"appearance" object with "strict": true (i.e., set appearance.strict: true) so
the file contains "theme": "maple", "colors": { "primary": "#fb4d01", ... }, and
"appearance": { "strict": true }.

---

Nitpick comments:
In `@index.mdx`:
- Around line 12-40: The content in index.mdx uses mixed voices
(neutral/third-person) inside several Card children — e.g., the copy nodes under
Card(title="API Quickstart"), Card(title="React Widget"), Card(title="SDK
Libraries"), Card(title="What are intents?"), Card(title="Market Makers"), and
Card(title="Verifier Contract") — and should be rewritten into consistent
second-person voice; update each Card's child text to directly address the
reader using "you" (for example change "Execute your first cross-chain swap in
minutes." if needed to "Execute your first cross-chain swap in minutes, and get
started quickly" or similar second-person phrasing) so all documentation lines
use "you" consistently. Ensure only the copy strings inside those Card
components are changed and preserve titles, icons, hrefs, and CTA props.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7002d6f and 2fdfcab.

📒 Files selected for processing (3)
  • docs.json
  • index.mdx
  • style.css

Comment on lines +45 to +53
{
"group": " ",
"pages": [
"integration/distribution-channels/1click-api/about-1click-api",
"integration/distribution-channels/1click-api/quickstart",
"integration/distribution-channels/1click-api/authentication",
"integration/distribution-channels/1click-api/fee-config"
]
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use named nested groups with icons instead of blank group placeholders.

Using "group": " " and icon-less groups in new sections diverges from the navigation standard and makes sidebar structure less clear.

As per coding guidelines, "Use nested groups with Font Awesome icons for navigation in docs.json."

Also applies to: 79-87

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs.json` around lines 45 - 53, Replace the blank group placeholders in the
docs JSON (the "group": " " objects) with named nested group entries that
include a Font Awesome icon and explicit label; e.g., change the object
containing pages like
"integration/distribution-channels/1click-api/about-1click-api" to have "group":
"1Click API", add an "icon": "fas fa-something" (choose an appropriate FA icon),
and if desired wrap pages under a nested "items" or "pages" array according to
existing nav schema; repeat the same refactor for the other occurrence
referenced (the block around lines 79-87) so all group objects use named groups
and include "icon" keys to conform to the navigation standard.

Comment on lines 1 to 3
---
hidden: true
mode: "wide"
mode: "custom"
---
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add required title and description frontmatter fields.

This page currently has only mode, which breaks the MDX metadata requirement.

Suggested fix
 ---
 mode: "custom"
+title: "NEAR Intents"
+description: "Learn how you can integrate NEAR Intents across API, SDK, and contract workflows."
 ---

As per coding guidelines, "Every MDX file must include frontmatter with title and description fields; optional fields include icon and sidebarTitle; API pages must include an openapi field referencing the endpoint."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
hidden: true
mode: "wide"
mode: "custom"
---
---
mode: "custom"
title: "NEAR Intents"
description: "Learn how you can integrate NEAR Intents across API, SDK, and contract workflows."
---
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.mdx` around lines 1 - 3, The MDX frontmatter only contains mode and is
missing required fields; update the top frontmatter block (the leading ---
section) to include at minimum title and description keys (e.g., title: "Your
Title" and description: "Short page description"), and optionally add icon,
sidebarTitle, or openapi if this is an API page, ensuring the frontmatter
remains valid YAML inside the existing --- delimiters.

Comment on lines +16 to 43
<Columns cols={4}>
<Card title="API Quickstart" icon="rocket" href="/integration/distribution-channels/1click-api/quickstart" cta="Integrate" arrow>
Execute your first cross-chain swap in minutes.
</Card>

// Request a quote
const quote = await fetch('https://1click.chaindefuser.com/v0/quote', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
body: JSON.stringify({
swapType: 'EXACT_INPUT',
originAsset: 'nep141:wrap.near',
depositType: 'ORIGIN_CHAIN',
destinationAsset: 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
amount: '100000000000000000000000',
// ...
})
});
const result = await quote.json();
```
<Card title="React Widget" icon="palette" href="/integration/devkit/react-widget" cta="Integrate" arrow>
Embed a customizable swap UI with a ready-to-use React component.
</Card>

```python Python
import requests
<Card title="SDK Libraries" icon="window-restore" href="/integration/devkit/sdk" cta="Explore" arrow>
Build with TypeScript, Go, and Rust SDKs for typed API integration.
</Card>

# Query supported tokens
tokens_response = requests.get('https://1click.chaindefuser.com/v0/tokens')
tokens = tokens_response.json()
<Card title="What are intents?" icon="lightbulb" href="/getting-started/what-are-intents" cta="Read docs" arrow>
Learn how the protocol works and core concepts.
</Card>
</Columns>
<Columns cols={2}>
<Card title="Market Makers" icon="users" href="/integration/market-makers/introduction" cta="Learn how" arrow>
Provide liquidity by fulfilling cross-chain swap intents.
</Card>

# Request a quote
quote = requests.post(
'https://1click.chaindefuser.com/v0/quote',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
json={
'swapType': 'EXACT_INPUT',
'originAsset': 'nep141:wrap.near',
'depositType': 'ORIGIN_CHAIN',
'destinationAsset': 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
'amount': '100000000000000000000000',
# ...
}
)
result = quote.json()
```
</CodeGroup>
</Columns>
<Card title="Verifier Contract" icon="credit-card" href="/integration/verifier-contract/introduction" cta="Read docs" arrow>
Interact with the smart contract for custom integrations.
</Card>

<Columns cols={2}>
<img src="/images/widget/swap-widget.png" alt="Swap Widget UI" class="rounded-lg border border-gray-950/10 dark:border-white/10 swap-widget-preview" />
<div>
<h2 class="mb-2"> React Widget </h2>
<p>Integrate a customizable, cross-chain swap interface into your app with just a few lines of code.</p>
<p><a href="/integration/devkit/react-widget"> Learn More -> </a></p>
</div>
</Columns>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use <CardGroup> for this introduction page navigation grid.

The current Columns-based layout conflicts with the repository’s introduction-page pattern.

As per coding guidelines, "Introduction pages should use <CardGroup> component to guide readers to subtopics."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.mdx` around lines 16 - 43, Replace the Two <Columns> blocks with the
repository's introduction page pattern by using <CardGroup> instead: remove the
<Columns cols={4}> and <Columns cols={2}> wrappers and wrap all six <Card>
components inside a single <CardGroup> (or two <CardGroup> blocks if layout
needs grouping), keeping each <Card>'s title, icon, href, cta and body
unchanged; update imports to include CardGroup (remove Columns import if no
longer used) and ensure JSX remains valid with matching opening/closing
<CardGroup> tags.

Comment on lines +17 to +39
<Card title="API Quickstart" icon="rocket" href="/integration/distribution-channels/1click-api/quickstart" cta="Integrate" arrow>
Execute your first cross-chain swap in minutes.
</Card>

// Request a quote
const quote = await fetch('https://1click.chaindefuser.com/v0/quote', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
body: JSON.stringify({
swapType: 'EXACT_INPUT',
originAsset: 'nep141:wrap.near',
depositType: 'ORIGIN_CHAIN',
destinationAsset: 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
amount: '100000000000000000000000',
// ...
})
});
const result = await quote.json();
```
<Card title="React Widget" icon="palette" href="/integration/devkit/react-widget" cta="Integrate" arrow>
Embed a customizable swap UI with a ready-to-use React component.
</Card>

```python Python
import requests
<Card title="SDK Libraries" icon="window-restore" href="/integration/devkit/sdk" cta="Explore" arrow>
Build with TypeScript, Go, and Rust SDKs for typed API integration.
</Card>

# Query supported tokens
tokens_response = requests.get('https://1click.chaindefuser.com/v0/tokens')
tokens = tokens_response.json()
<Card title="What are intents?" icon="lightbulb" href="/getting-started/what-are-intents" cta="Read docs" arrow>
Learn how the protocol works and core concepts.
</Card>
</Columns>
<Columns cols={2}>
<Card title="Market Makers" icon="users" href="/integration/market-makers/introduction" cta="Learn how" arrow>
Provide liquidity by fulfilling cross-chain swap intents.
</Card>

# Request a quote
quote = requests.post(
'https://1click.chaindefuser.com/v0/quote',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
json={
'swapType': 'EXACT_INPUT',
'originAsset': 'nep141:wrap.near',
'depositType': 'ORIGIN_CHAIN',
'destinationAsset': 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
'amount': '100000000000000000000000',
# ...
}
)
result = quote.json()
```
</CodeGroup>
</Columns>
<Card title="Verifier Contract" icon="credit-card" href="/integration/verifier-contract/introduction" cta="Read docs" arrow>
Interact with the smart contract for custom integrations.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Switch internal card links to relative paths.

These links are root-absolute (/...) instead of relative.

As per coding guidelines, "Use relative paths for all internal links in MDX documentation files."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.mdx` around lines 17 - 39, The Card components use root-absolute hrefs
(e.g., href="/integration/...") which violate the guideline to use relative
paths; update each Card's href prop to a relative path (remove the leading
slash) for internal links in this MDX file—locate the Card elements (e.g., the
Card instances titled "API Quickstart", "React Widget", "SDK Libraries", "What
are intents?", "Market Makers", "Verifier Contract") and change their href
attributes from "/..." to "./integration/..." or the correct relative path from
the current document location.

@gagdiez
Copy link
Collaborator Author

gagdiez commented Mar 6, 2026

I have been asking devs on our channels - most of who use near intents in their projects - and so far nobody found this to be better than the current version (7 users preferred the current docs - 0 preferred this version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant