-
-
Notifications
You must be signed in to change notification settings - Fork 0
Redesign layout; add build explorer and project pages; refactor cookies modal, privacy policy and notification generator. #186
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
base: master
Are you sure you want to change the base?
Conversation
…es modal, privacy policy and notification generator
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @vLuckyyy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant overhaul of the website's frontend, focusing on a modern redesign and the addition of several key features. It integrates new dedicated pages for project builds and individual projects, enhancing content discoverability and user interaction. Furthermore, core components like the cookie consent mechanism and the notification generator tool have been refactored for improved usability and visual appeal, ensuring a more cohesive and dynamic user experience across the platform. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new 'Build Explorer' page, allowing users to browse and download stable and development builds for projects by fetching data from Modrinth and GitHub Actions. It also adds dedicated landing pages for 'EternalCombat' and 'EternalCore' projects, featuring detailed descriptions, download links, and animated YAML configuration previews with syntax highlighting. The cookie consent mechanism has been refined by removing a separate preferences menu and integrating its functionality into an enhanced modal, which now includes a floating settings button. Additionally, the navigation bar has been updated to include new 'Projects' and 'Tools' dropdowns, replacing the old static 'Projects' link, and the overall site aesthetics have been improved across various pages (Blog, Docs, 404, Notification Generator, Team, Home) by introducing new background decorative elements using FacadePattern and blurred shapes, along with updated styling for buttons, form fields, and animations. The date-fns library was added as a dependency, and several internal components were refactored for better reusability and consistency, such as the Accordion component and the CodeBlock for MDX rendering. Review comments highlight concerns about type safety in API responses, recommending Zod for validation, and suggest improving the user experience for unavailable download links by disabling buttons instead of using placeholder links.
app/(website)/builds/page.tsx
Outdated
| const artifactName = `${activeProject.name} Dev Build`; // Heuristic name, usually | ||
|
|
||
| return { | ||
| id: run.id.toString(), | ||
| name: displayTitle || run.name || `Run #${run.id}`, | ||
| type: "DEV", | ||
| date: run.created_at, | ||
| downloadUrl: `https://nightly.link/${activeProject.githubRepo}/actions/runs/${run.id}/${encodeURIComponent(artifactName)}.zip`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The download URL for development builds is constructed using a hardcoded artifact name (${activeProject.name} Dev Build). As the comment on line 82 notes, this is a heuristic and is quite brittle. If the artifact name in the GitHub Actions workflow is ever changed, this will lead to broken download links.
A more robust approach would be to make an additional API call to the run.artifacts_url to fetch the list of artifacts for that specific run. From there, you can get the correct download URL for the desired artifact. While this adds an extra network request, it guarantees the download links will always be correct.
app/(website)/api/builds/builds.ts
Outdated
| console.error(`Failed to fetch Github Actions for ${project.name}`, await res.text()); | ||
| return []; | ||
| } | ||
| const data = (await res.json()) as GithubRunsResponse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API response is being cast using as. This is not type-safe and could lead to runtime errors if the API contract changes. For better type safety and robustness, I recommend using a validation library like Zod to parse and validate the data. This ensures that the data conforms to the expected shape before being used in the application.
app/(website)/api/builds/builds.ts
Outdated
| console.error(`Failed to fetch Modrinth versions for ${project.name}`, await res.text()); | ||
| return []; | ||
| } | ||
| return (await res.json()) as ModrinthVersion[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API response is being cast using as. This is not type-safe and could lead to runtime errors if the API contract changes. For better type safety and robustness, I recommend using a validation library like Zod to parse and validate the data. This ensures that the data conforms to the expected shape before being used in the application.
app/(website)/builds/page.tsx
Outdated
| name: version.name, | ||
| type: "STABLE", | ||
| date: version.date_published, | ||
| downloadUrl: version.files?.[0]?.url || "#", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The download URL for stable builds falls back to "#" when no file is available. This creates a link that goes nowhere, which can be confusing for users. It would be a better user experience to disable the download button or display a 'Not available' message if version.files?.[0]?.url is not present.
- Fix Next.js and Payload compatibility issues by upgrading Next.js - Configure Vercel Blob storage plugin for Payload CMS media collection - Resolve linting and formatting errors across the codebase - Fix TypeScript errors in Team component and GraphQL API route - Switch build process to support Turbopack
…ata validation. Add Contribution section in ``/team` page. add contribute page.
…rojects Introduced `BuildControls`, `BuildHeader`, `BuildRow`, and `BuildTable` components to enhance project builds browsing with features like project selection, tab switching, build status visualization, and downloadable build rows.
No description provided.