-
Notifications
You must be signed in to change notification settings - Fork 3
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: workshops section #673
Conversation
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.
Hello @anyulled, 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!
Summary of Changes
This pull request enables the workshops section in the application. It modifies the App.tsx
file to include the route for the workshops, updates NavigationData.ts
to add the workshops link to the navigation, and updates the Workshops.tsx
view to fetch data for the 2025 conference and display a message if no workshops are available.
Highlights
- Route Configuration: The
App.tsx
file is updated to include a route for the workshops section, making it accessible within the application. - Navigation Update: The
NavigationData.ts
file is modified to add a navigation item for workshops, ensuring it appears in the main navigation menu. - Data Fetching: The
Workshops.tsx
view is updated to fetch workshop data for the 2025 conference, and a message is displayed if no workshops are currently available.
Changelog
Click here to see the changelog
- src/App.tsx
- Import statements are updated to include
ROUTE_WORKSHOPS
. - The
Routes
component is updated to include a route for the workshops section, rendering theWorkshops
component. - Corrected a typo in an import statement, changing
SpeakerDetailContainer
toSpeakerDetailContainer
.
- Import statements are updated to include
- src/components/Navigation/NavigationData.ts
- Import statements are updated to include
ROUTE_WORKSHOPS
. - The
navigationItems2025
array is updated to include a navigation item for workshops.
- Import statements are updated to include
- src/views/Workshops/Workshops.tsx
- The
conferenceData
import is updated to use2025.json
instead of2024.json
. - The
workshopCategoryList
is defined directly using a set literal. - A message is displayed when no workshops are available.
- The
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
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 .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and 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 to provide feedback.
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.
A route is added, a link made bright,
Workshops appear, a welcome sight.
Data is fetched, from twenty-five,
If none are there, we'll keep it alive.
With updates swift, and code so keen,
The workshops section is now on the scene!
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
✅ Deploy Preview for dev-bcn ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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
The pull request enables the workshop section in the application. It involves adding the workshop route, updating navigation data, and creating a basic workshop view. Overall, the changes seem reasonable, but there are a few points that could be improved for better maintainability and clarity.
Summary of Findings
- Data file for conference year: The
Workshops.tsx
component imports conference data from2025.json
. Ensure that this is the correct year and that the data is up-to-date. If the data is meant to be dynamic, consider fetching it from an API instead of a static JSON file. - Duplicated logic in Workshops2023 and Workshops: The
Workshops2023
andWorkshops
components share a lot of similar logic. Consider refactoring this into a shared component or hook to avoid code duplication and improve maintainability. - Magic number for workshop category ID: The workshop category ID
149213
is used directly in theWorkshops
component. Consider defining this as a constant with a descriptive name to improve readability and maintainability.
Merge Readiness
The pull request introduces a new feature and is generally well-structured. However, addressing the identified issues related to data source, code duplication, and magic numbers would significantly improve the code's maintainability and readability. I recommend addressing these points before merging. I am unable to approve this pull request, and other reviewers should review and approve this code before merging.
@@ -14,7 +14,7 @@ import MoreThanBlueIcon from "../../assets/images/MoreThanBlueIcon.svg"; | |||
import { useFetchTalks } from "../Talks/UseFetchTalks"; | |||
import * as Sentry from "@sentry/react"; | |||
import { TalkCard } from "../Talks/components/TalkCard"; | |||
import conferenceData from "../../data/2024.json"; | |||
import conferenceData from "../../data/2025.json"; |
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.
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.
what do you mean a configuration variable? @gemini-code-assist
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.
By a configuration variable, I mean storing the conference year in a central configuration file (e.g., config.json
or .env
) or environment variable instead of directly in the component. This way, you can update the year in one place, and it will be reflected throughout the application without modifying the component's code.
For example, you could have a config.json
file like this:
{
"conferenceYear": 2025
}
Then, in your component:
import config from '../../config.json';
import conferenceData from `../../data/${config.conferenceYear}.json`;
Alternatively, you could use environment variables, which are especially useful in deployment scenarios.
import conferenceData from "../../data/2025.json"; | |
import conferenceData from `../../data/${process.env.NEXT_PUBLIC_CONFERENCE_YEAR || '2025'}.json`; |
enable workshop section