Skip to content

Conversation

MantisClone
Copy link
Member

@MantisClone MantisClone commented Sep 29, 2025

PR Description

Summary

Adds comprehensive NEAR blockchain documentation with interactive copy/explorer buttons featuring Request Network brand styling.

Preview: https://requestnetwork-add-near-docs.mintlify.app/resources/near-blockchain

Key Features

  • NEAR Documentation: Complete guide covering native payments, NEP-141 tokens, and conversion payments
  • Interactive Buttons: New React components with one-click address copying and block explorer links
  • Brand Styling: Buttons use Request Network teal (#01B089) with hover effects and smooth transitions
  • Smart Contract Tables: All mainnet/testnet addresses with interactive copy/explore actions

New Interactive Components

Created reusable CopyButton and ExternalLinkButton components in contract-buttons.jsx:

  • Copy contract addresses to clipboard with visual feedback
  • Direct links to NEAR block explorers
  • Consistent Request Network brand colors and hover states
  • Full accessibility and responsive design
Screen.Recording.2025-09-29.at.5.11.00.PM.mov

Files Changed

  • near-blockchain.mdx - Main documentation page
  • contract-buttons.jsx - Interactive button components
  • docs.json - Navigation updates
  • supported-chains-and-currencies.mdx - Added NEAR card

Fixes RequestNetwork/docs.request.network#123

Copy link

coderabbitai bot commented Sep 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-near-docs

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

…escriptions, interactive contract tables, and payment detection info
…ct addresses using reusable React components
…quest Network brand colors

- Add functional copy-to-clipboard and external link buttons for NEAR contract addresses
- Use CSS-based hover/focus/active states with Request Network teal (#01B089)
- Horizontal button layout with proper spacing using flexbox
- Simplified React components without hooks for better Mintlify compatibility
- Enhanced user experience with smooth transitions and visual feedback
@MantisClone MantisClone marked this pull request as ready for review September 29, 2025 21:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds comprehensive NEAR blockchain documentation with interactive UI components featuring Request Network brand styling. The PR introduces complete documentation for NEAR's unique architecture and payment types, along with reusable React components for enhanced user interaction.

  • Interactive copy/explore buttons with Request Network teal branding and accessibility features
  • Comprehensive NEAR blockchain documentation covering native payments, NEP-141 tokens, and conversion payments
  • Navigation integration and cross-referencing with existing documentation structure

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
snippets/contract-buttons.jsx New React components for copying addresses and opening block explorer links
resources/near-blockchain.mdx Main NEAR blockchain documentation with technical details and contract addresses
resources/supported-chains-and-currencies.mdx Added NEAR blockchain card to existing chain overview
docs.json Added NEAR documentation to navigation structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +3 to +7
navigator.clipboard.writeText(text).then(() => {
console.log(`Copied ${text} to clipboard!`);
}).catch(err => {
console.error("Failed to copy: ", err);
});
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Console messages should provide more user-friendly feedback. Consider implementing visual feedback (toast notifications, temporary button state changes) instead of relying solely on console logs that users won't see.

Copilot uses AI. Check for mistakes.

Comment on lines +23 to +34
<style jsx>{`
.contract-button:hover {
color: var(--primary-color) !important;
}
.contract-button:focus {
color: var(--primary-color) !important;
box-shadow: 0 0 0 2px var(--primary-color) !important;
}
.contract-button:active {
color: var(--primary-color) !important;
}
`}</style>
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

The same CSS styling block is duplicated between CopyButton and ExternalLinkButton components. Consider extracting this into a shared constant or moving it to a common stylesheet to reduce code duplication.

Copilot uses AI. Check for mistakes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

Docs - Add docs about NEAR smart contracts
1 participant