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

feat: init the insight page #731

Merged
merged 7 commits into from
Feb 8, 2025
Merged

feat: init the insight page #731

merged 7 commits into from
Feb 8, 2025

Conversation

xingwanying
Copy link
Contributor

image

Copy link

vercel bot commented Feb 7, 2025

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

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 9:27am

Copy link

Walkthrough

This pull request introduces the initial implementation of the insight page, adding several components and hooks to fetch and display various statistics related to repositories, such as issue statistics, contributor statistics, and activity statistics. The changes include new API routes, components for displaying charts, and hooks for data fetching.

Changes

Files Summary
assistant/package.json, client/package.json, client/yarn.lock Updated dependencies and lock files.
assistant/src/SegmentedTabs/index.tsx Modified tab styling to include text size.
client/app/factory/list/components/BotCard.tsx Added a tooltip and an image for insights navigation.
client/app/factory/list/page.tsx, client/app/market/page.tsx Removed unused imports and console logs.
client/app/hooks/useInsight.ts Added hooks for fetching insight data using react-query.
client/app/insight/page.tsx Created a new page component for displaying insights with various charts.
client/app/layout.tsx Adjusted layout conditions for different routes.
client/app/services/InsightController.ts Implemented service functions to fetch insight data from the API.
server/insight/router.py Added new API routes for fetching contributor statistics.
server/insight/service/activity.py, server/insight/service/contributor.py Implemented functions to process and fetch activity and contributor data.

@@ -0,0 +1,53 @@
import axios from 'axios';

const apiDomain = process.env.NEXT_PUBLIC_API_DOMAIN;

Choose a reason for hiding this comment

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

Ensure that NEXT_PUBLIC_API_DOMAIN is defined in the environment variables to avoid runtime errors when making API requests.

pattern_month = re.compile(r"^\d{4}-\d{2}$")

try:
response = requests.get(url)

Choose a reason for hiding this comment

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

Consider handling potential JSON parsing errors when fetching contributor data to prevent application crashes.

@xingwanying xingwanying merged commit 4f11999 into main Feb 8, 2025
3 of 4 checks passed
@xingwanying xingwanying deleted the feat_insight_page branch February 8, 2025 09:28
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