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

Get Started section #526

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Get Started section #526

wants to merge 15 commits into from

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Jan 6, 2025

Summary by CodeRabbit

  • Documentation Removal

    • Removed documentation for multiple modules including Authority, Crosschain, Emissions, Fungible, Lightclient, and Observer.
    • Deleted message definitions and overview files for these modules.
    • Removed detailed descriptions of system message types and module functionalities.
  • New Features

    • Introduced a "Get Started" navigation item linking to the "/start" URL.
    • Added a new section in the JSON structure for getting started with ZetaChain.
    • Created new markdown files for "Get Started", "What is ZetaChain?", "Why Build on ZetaChain?", "Universal EVM", and "Universal App".
  • Content Update

    • Updated messaging in the HomeHero component to enhance clarity about ZetaChain's capabilities.

@fadeev fadeev requested a review from a team as a code owner January 6, 2025 12:30
Copy link

vercel bot commented Jan 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview Jan 15, 2025 3:30pm

Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

Important

Review skipped

Draft detected.

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.

📝 Walkthrough

Walkthrough

The pull request involves the systematic removal of multiple documentation files across various modules in the system architecture. These files, located in the src/pages/architecture/modules/ directory, were documentation files describing message types and module overviews for different components such as authority, crosschain, emissions, fungible, lightclient, and observer modules. The deletion suggests a potential restructuring or consolidation of architectural documentation. Additionally, updates to component messaging and navigation enhance user experience and accessibility to information about ZetaChain.

Changes

Path Change Summary
src/pages/architecture/modules/authority/messages.md Removed documentation for message types related to policy and authorization management
src/pages/architecture/modules/crosschain/messages.md Deleted documentation for cross-chain transaction messages and voting mechanisms
src/pages/architecture/modules/crosschain/overview.md Removed overview of crosschain module functionality
src/pages/architecture/modules/emissions/messages.md Eliminated documentation for emissions-related message types
src/pages/architecture/modules/emissions/overview.md Removed overview of emissions module
src/pages/architecture/modules/fungible/messages.md Deleted documentation for fungible coin deployment and management messages
src/pages/architecture/modules/fungible/overview.md Removed overview of fungible module
src/pages/architecture/modules/lightclient/messages.md Eliminated documentation for header verification messages
src/pages/architecture/modules/observer/messages.md Deleted documentation for observer-related message types
src/pages/architecture/modules/observer/overview.md Removed overview of observer module
src/components/Home/components/HomeHero.tsx Updated text content to enhance messaging about ZetaChain
src/components/shared/components/Layout/Layout.constants.tsx Added new navigation item "Get Started" to the main navigation
src/pages/_meta.json Introduced a new section "start" for getting started with ZetaChain
src/pages/index.mdx Removed the GetStarted component from imports and JSX structure
src/pages/start/_meta.json Added new structured metadata for sections related to ZetaChain
src/pages/start/app.mdx Created new markdown file for "Universal App" with title and description
src/pages/start/build.mdx Created new markdown file for "Why Build on ZetaChain?" with title and description
src/pages/start/evm.mdx Created new markdown file for "Universal EVM" with title and description
src/pages/start/index.mdx Created new markdown file for getting started with ZetaChain, including navigation and support components
src/pages/start/zetachain.mdx Created new markdown file for "What is ZetaChain?" with title and description

The changes represent a comprehensive removal of architectural documentation across multiple system modules, potentially indicating a documentation reorganization or migration strategy. Additionally, updates to messaging and navigation enhance user experience and accessibility to information about ZetaChain.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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: 1

🧹 Nitpick comments (2)
src/pages/_meta.json (1)

6-9: Consider enhancing the "Get Started" section metadata

The addition of the "start" section is well-structured. Consider adding a navImgUrl property to maintain consistency with other sections like "nodes" that have visual indicators.

  "start": {
    "title": "Get Started",
    "description": "Start building on ZetaChain."
+   "navImgUrl": "/img/pages/get-started.svg"
  },
src/components/shared/components/Layout/Layout.constants.tsx (1)

76-82: Consider using a distinct icon for Get Started section

The new navigation item is well-placed, but it currently shares the same icon (IconAbout) with the About section. Consider using a more appropriate icon like IconWelcome or creating a new IconGetStarted to better differentiate these sections.

    {
      label: "Get Started",
-     icon: IconAbout,
+     icon: IconWelcome,
      url: "/start",
    },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2f0ad0 and 1e94864.

📒 Files selected for processing (5)
  • src/components/Home/components/HomeHero.tsx (1 hunks)
  • src/components/shared/components/Layout/Layout.constants.tsx (1 hunks)
  • src/pages/_meta.json (2 hunks)
  • src/pages/index.mdx (1 hunks)
  • src/pages/start/_meta.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/pages/start/_meta.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
src/components/Home/components/HomeHero.tsx (2)

20-21: LGTM! Clear and impactful messaging.

The updated copy effectively communicates ZetaChain's unique value proposition, emphasizing its universal blockchain capabilities and cross-chain accessibility.


25-26: LGTM! Strong developer-focused messaging.

The revised text successfully highlights ZetaChain's technical capabilities while maintaining accessibility. The emphasis on the Universal EVM and developer empowerment aligns well with the platform's technical documentation focus.

Comment on lines +6 to 13
import { HomeHero, HomeNavigationSections } from "~/components/Home";
import { GetSupport } from "~/components/Support";

<HomeHero />

<div className="flex flex-col gap-20 sm:gap-[120px]">
<GetStarted />
<HomeNavigationSections />
<GetSupport />
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Remove unused GetStarted component

The navigation flow has been successfully restructured through the HomeNavigationSections component. However, the GetStarted component is now unused and should be removed from:

  • src/components/Home/components/GetStarted.tsx
  • Remove the export from src/components/Home/index.ts
🔗 Analysis chain

Verify navigation flow after GetStarted component removal

The removal of the GetStarted component should be balanced by the new navigation item added in Layout.constants.tsx. Please ensure that users can still easily find the getting started information through the new navigation path.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any remaining references to the GetStarted component
rg -l "GetStarted" src/

Length of output: 98


Script:

#!/bin/bash
# Check for GetStarted component usage
rg "GetStarted" src/ -A 2

# Check navigation structure in Layout.constants
rg -A 10 "navigation.*=" src/layout/Layout.constants.tsx

Length of output: 630


Script:

#!/bin/bash
# Find navigation-related files
fd -t f -i "nav|route" src/

# Search for navigation configuration patterns
rg -i "const.*navigation|const.*routes" src/

Length of output: 4623

@fadeev fadeev changed the title Remove duplicated Architecture section Get Started section Jan 7, 2025
@fadeev
Copy link
Member Author

fadeev commented Jan 7, 2025

@zeta-chain/fullstack I'm trying to add a "Get Started" section to the sidebar. On localnet it displays fine (both with yarn dev and yarn build && yarn start), but when deployed on Vercel it only shows the top level section ("Get Started"), not the nested items.

Screenshot 2025-01-07 at 13 13 30 Screenshot 2025-01-07 at 13 13 27

Copy link
Contributor

@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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e94864 and 339c718.

📒 Files selected for processing (6)
  • src/pages/start/_meta.json (1 hunks)
  • src/pages/start/app.mdx (1 hunks)
  • src/pages/start/build.mdx (1 hunks)
  • src/pages/start/evm.mdx (1 hunks)
  • src/pages/start/index.mdx (1 hunks)
  • src/pages/start/zetachain.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • src/pages/start/zetachain.mdx
  • src/pages/start/build.mdx
  • src/pages/start/app.mdx
  • src/pages/start/evm.mdx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (4)
src/pages/start/_meta.json (2)

3-4: Section titles are clear and descriptive.

The titles for each section provide a good progression from introduction to specific features.

Also applies to: 7-8, 11-12, 15-16, 19-20


1-22: Verify JSON structure for Nextra sidebar.

The JSON structure appears correct, but given the reported issue where nested items aren't appearing in Vercel deployment, please verify the following:

  1. Ensure the _meta.json file is in the correct directory structure
  2. Check if Nextra configuration in next.config.js has the correct theme settings
  3. Verify that the corresponding .mdx files exist for each section
✅ Verification successful

JSON structure is correct for Nextra sidebar

The file structure, configuration, and corresponding .mdx files are all properly set up. The issue with nested items not appearing in Vercel deployment is likely unrelated to the _meta.json structure or file organization.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of required files and configuration

# Check if all corresponding .mdx files exist
echo "Checking .mdx files..."
for page in index zetachain build evm app; do
  fd "^${page}.mdx$" src/pages/start
done

# Check Nextra configuration
echo "Checking Nextra configuration..."
cat next.config.js

Length of output: 2506

src/pages/start/index.mdx (2)

6-7: LGTM! Clean and consistent imports.

The imports follow the project's conventions using the "~" alias prefix.


9-12: Verify component rendering in production build.

The layout structure is clean, but there's a reported issue where nested items don't appear in the Vercel deployment. This might be related to how CurrentPageNavigationSections renders in production.

Let's verify the component's configuration:

Consider adding debug logging in CurrentPageNavigationSections to trace the rendering flow in production:

 <div className="flex flex-col gap-20 sm:gap-[120px]">
+  {/* Debug: Add temporary logging */}
+  {console.log('Rendering navigation sections:', process.env.NODE_ENV)}
   <CurrentPageNavigationSections />
   <GetSupport />
 </div>

src/pages/start/_meta.json Outdated Show resolved Hide resolved
src/pages/start/index.mdx Show resolved Hide resolved
Copy link
Contributor

@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: 0

🧹 Nitpick comments (1)
src/components/shared/components/Layout/components/NavigationAccordionLink.tsx (1)

23-27: Consider making isTopLevelPage required to prevent ambiguity.

The isTopLevelPage property is optional, which could lead to inconsistent visual hierarchy if not explicitly set.

 type NavigationAccordionLinkProps = PropsWithChildren<{
   page: Page;
   onClick?: () => void;
-  isTopLevelPage?: boolean;
+  isTopLevelPage: boolean;
 }>;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 339c718 and 40614c3.

📒 Files selected for processing (4)
  • src/components/shared/components/Layout/components/NavigationAccordionLink.tsx (3 hunks)
  • src/components/shared/components/Layout/components/NavigationLayout.tsx (1 hunks)
  • src/pages/start/build.mdx (1 hunks)
  • src/pages/start/zetachain.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/pages/start/build.mdx
  • src/pages/start/zetachain.mdx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
src/components/shared/components/Layout/components/NavigationAccordionLink.tsx (1)

85-92: Verify styling consistency across different themes and viewports.

The dot indicator's styling and positioning might need adjustment for better visibility and alignment across different themes and screen sizes.

✅ Verification successful

Styling implementation verified and found to be consistent

The dot indicator's styling follows the design system's patterns with proper theme support and responsive adjustments. The implementation handles different viewports and themes appropriately.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for potential styling inconsistencies across themes
# Look for other dot indicators or similar visual hierarchies

# Search for similar styling patterns
rg -l 'w-1\s+h-1.*ml-1\s+mr-2\s+mt-2' .
rg -l 'bg-green-100.*bg-grey-200.*bg-grey-600' .

# Check for theme-related classes
rg -l 'dark:bg-grey-[0-9]' .

Length of output: 1156

src/components/shared/components/Layout/components/NavigationLayout.tsx (1)

92-97: Investigate deployment inconsistency with nested items.

The nested items visibility issue in Vercel might be related to SSR/CSR differences or state management. Consider the following:

  1. Add debug logging for page structure during SSR and CSR
  2. Verify navSection.children filtering behavior
  3. Ensure state is properly hydrated during SSR

@fadeev fadeev marked this pull request as draft January 13, 2025 09:19
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.

2 participants