Skip to content

Commit 4ea8746

Browse files
authored
Merge branch 'CodeChefVIT:prod' into prod
2 parents 8ca6594 + 12ffbbb commit 4ea8746

File tree

10 files changed

+198
-83
lines changed

10 files changed

+198
-83
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

CONTRIBUTING.md

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,57 @@
1-
## Contribution Guidelines
1+
# Contribute to the Papers Repository
22

3-
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
3+
We appreciate your interest in contributing to the `papers-codechef` repository! Please follow these guidelines to ensure a smooth and effective contribution process.
44

5-
## How to contribute
65

7-
- Decide which repository to contribute
8-
- Decide what to contribute
9-
- Fork the repo then clone it locally
10-
- Commit your work (You should create a new branch when you're doing development work that is somewhat experimental in nature.)
11-
- Create a **Pull Request**
12-
- Congrats 🎉 you have just contributed towards open source!
6+
## Getting started
137

14-
## What to contribute
8+
- If you're looking for ideas about what to work on, check out our [issues](https://github.com/CodeChefVIT/papers-codechef/issues)
9+
- If you have a bugfix to report ensure that you are on the latest pkull and no similar issue exists. You can then [create an bug report](https://github.com/CodeChefVIT/papers-codechef/issues/new?template=bug_report.md)
10+
- You can also propose a [feature request](https://github.com/CodeChefVIT/papers-codechef/issues/new?template=feature_request.md). Begin by filling out the template, write a brief problem statement that clearly explains the issue you want to address, without tying it to any specific solution. It doesn’t need to be long or formal; just provide enough context to clearly understand the problem before discussing possible solutions.
1511

16-
- Find an open issue to tackle
17-
- Ask if you can help write a new feature
18-
- Add / Improve Unit Testing
19-
- Write tutorials for how a project can be used and add to the readme
20-
- Review code on other people’s submissions and help improving / finding vulnerabilities
12+
## Setting up
13+
- **Fork** the repository. All the PRs would be made from this fork.
14+
- **Clone** the repository.
2115

22-
## Making a PR
23-
- Provide all the appropriate details asked in PR template
24-
- A pull request doesn’t have to represent finished work. It’s usually better to open a pull request early on, so others can watch or give feedback on your progress. Just mark it as a “WIP” (Work in Progress) in the subject line. You can always add more commits later.
16+
To get the project running, you need to set up your local environment:
2517

26-
## Opening an Issue
27-
- Make use of an appropriate Issue Template
28-
- We welcome Feature request, Bug Report, Documentation fix and others
29-
- Do not open critical security issues here, report them directly at [our email](mailto:contact@codechefvit.com).
18+
- **Create a `.env` file:** Create a new file named `.env` and use the .env.example file to create your own .env file and put in your your own environment variables to make the project functional.
19+
- **Install dependencies:** Run `pnpm i` in your terminal to install all necessary dependencies.
20+
- **Checkout staging branch**: Run `git checkout staging` to switch branches.
21+
- **Run the project:** Run `pnpm dev` to start the project.
3022

31-
## Communicating effectively
32-
**Give context.** Help others get quickly up to speed. If you’re running into an error, explain what you’re trying to do and how to reproduce it. If you’re suggesting a new idea, explain why you think it’d be useful to the project (not just to you!).
23+
## How to Contribute
3324

34-
```
35-
✔️ “X doesn’t happen when I do Y”
36-
❌ “X is broken! Please fix it.”
37-
```
25+
Once your environment is set up, you're ready to start coding.
3826

39-
**Do your homework beforehand.** It’s OK not to know things, but show that you tried. Before asking for help, be sure to check a project’s README, documentation, issues (open or closed), mailing list, and search the internet for an answer. People will appreciate when you demonstrate that you’re trying to learn.
27+
- **Create a new branch:** Use the command `git checkout -b yourName/featureName` to create a new branch for your work.
28+
- **Make your changes:** Write the code to address the issue you were assigned.
29+
- **Add changed files:** After making your changes, use `git add .` to add the modified files to Git tracking.
30+
- **Commit your changes:** Please follow standard conventional commit guidelines as outlined here: https://www.conventionalcommits.org/en/v1.0.0/
31+
- **Push your changes:** Push your commits to your forked repository using `git push`.
4032

41-
```
42-
✔️ ““I’m not sure how to implement X. I checked the help docs and didn’t find any mentions.””
43-
❌ “How do I X?”
44-
```
33+
## Submit a Pull Request
4534

46-
**Keep requests short and direct.**
35+
- **[Submit your pull request](https://github.com/CodeChefVIT/papers-codechef/compare):** Please, fill in the Pull Request template - it will help us better understand the PR and increase the chances of it getting merged quickly.
4736

48-
```
49-
✔️ “I’d like to write an API tutorial.”
50-
❌ “I was driving down the highway the other day and stopped for gas, and then I had this amazing idea for something we should be doing, but before I explain that, let me show you…“
51-
```
37+
An organization member will review the PR and discuss changes you might have to make before merging it. Any new changes you push to your branch will be automatically attached to the PR.
5238

53-
**It’s okay to ask questions (but be patient!).**
39+
---
5440

55-
```
56-
✔️ “Thanks for looking into this error. I followed your suggestions. Here’s the output.”
57-
❌ “Why can’t you fix my problem? Isn’t this your project?”
58-
```
41+
### Mandatory PR contents
5942

60-
**Respect community decisions.**
43+
Please ensure that any Pull Request you make contains these things -
6144

62-
```
63-
✔️ “I’m disappointed you can’t support my use case, but as you’ve explained it only affects a minor portion of users, I understand why. Thanks for listening.”
64-
❌ “Why won’t you support my use case? This is unacceptable!”
65-
```
45+
- Purpose and issue which the PR is made for.
46+
- Before & after screenshots if your changes involve any visual adjustments (e.g. UI changes, layout tweaks).
47+
- List of the major changes made in this PR.
48+
- Mention of any bug fixes, known issues or follow-ups needed.
6649

67-
## Misc
68-
- You are welcome to Propose a new feature by creating an **Issue**.
69-
- You may Discuss a high-level topic or idea (for example, community, vision or policies) by writing to us at our [Email](mailto:contact@codechefvit.com).
50+
**Important:** Ensure no merge conflicts exist before making a PR and run `pnpm build` to check for build errors.
7051

71-
## Attribution
72-
- [Open Source Guide](https://opensource.guide/how-to-contribute/)
52+
53+
### Tips to improve the chances of your PR getting reviewed and merged
54+
55+
- Small, focused & incremental pull requests are much easier to review.
56+
- Spend time explaining your changes in the pull request body.
57+
- Low effort PRs, such as those that just re-arrange syntax, won't be merged without a compelling justification.

README.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- Stay updated with any new additions to the repository
2828

2929
## 🏁 Get Started
30+
Note: To get started with contributing to the repo visit [CONTRIBUTE.md](CONTRIBUTING.md)
3031

3132
The repository has two branches, 'prod' and 'staging'.
3233

@@ -63,27 +64,6 @@ To start your development server run:
6364
pnpm dev
6465
```
6566

66-
## 🐳 Using Docker
67-
68-
To run the application using Docker, follow these steps:
69-
70-
1. **Build the Docker Image**:
71-
72-
```bash
73-
docker build -t papers-codechef .
74-
```
75-
76-
2. **Run the Docker Container**:
77-
78-
```bash
79-
docker run -p 3000:3000 --env-file .env papers-codechef
80-
```
81-
82-
3. **Using Docker Compose**:
83-
If you prefer `docker-compose`, ensure the `docker-compose.yml` file is configured, then run:
84-
```bash
85-
docker-compose up
86-
```
8767

8868
Before getting started, please ensure that the .env file is properly configured. The .env.example file has been provided for your reference, with examples of environment variables to be listed.
8969

public/cookoff.png

5.56 KB
Loading

pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## 📌 Purpose
2+
Explain the goal of this PR.
3+
What problem does it solve, or what feature does it add?
4+
5+
---
6+
7+
## Corresponding issue: #[Issue number]
8+
9+
---
10+
11+
## 🖼️ Showcase
12+
(Add screenshots, screen recordings, or terminal outputs if the PR affects the UI or workflows.)
13+
14+
---
15+
16+
## 🔧 Changes
17+
- List the major changes made in this PR.
18+
- Example:
19+
- Added upcoming subjects section
20+
- Fixed search bug in bulk approve
21+
22+
---
23+
24+
## ➕ Additional Notes
25+
- Mention any bug fixes, known issues, or follow-ups needed.
26+
- Add any extra context or considerations for reviewers.
27+
28+
29+
Examples of a good PR -
30+
31+
https://github.com/CodeChefVIT/papers-codechef/pull/247

src/assets/DEVSOC.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/components/CookoffBanner.tsx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { Button } from "./ui/button";
2+
3+
import Image from "next/image";
4+
5+
import Link from "next/link";
6+
7+
export default function CookoffBanner() {
8+
return (
9+
<>
10+
<div className="z-50 flex h-fit w-full items-center justify-center bg-[#626bd2] px-6 py-3 text-center text-white sm:h-14 sm:py-0 md:sticky md:top-0 md:justify-between md:text-left">
11+
<div className="flex items-center gap-x-2">
12+
<Image
13+
src="/cookoff.png"
14+
alt="cookofflogo"
15+
height={40}
16+
width={40}
17+
className="md:hidden"
18+
/>
19+
20+
<span className="hidden md:block">
21+
10 Years. Hundreds of Coders. One Champion.
22+
CookOff, the biggest competitive coding challenge of graVITas is back!
23+
</span>
24+
25+
<Link
26+
href="https://gravitas.vit.ac.in/events/bdfcebea-c141-4a61-ac73-61dec96c08f4"
27+
className="block md:hidden"
28+
rel="noopener noreferrer"
29+
target="_blank"
30+
31+
>
32+
Register for CookOff 10.0
33+
</Link>
34+
</div>
35+
36+
<div className="hidden md:block">
37+
<Button className="bg-[#5c34e7] hover:bg-[#a6b0ff] focus:ring-2 focus:ring-offset-2 focus:ring-[#b2b8ff]">
38+
<Link
39+
className="flex items-center gap-x-2"
40+
href="https://gravitas.vit.ac.in/events/bdfcebea-c141-4a61-ac73-61dec96c08f4"
41+
rel="noopener noreferrer"
42+
target="_blank"
43+
>
44+
<span>
45+
<Image
46+
src="/cookoff.png"
47+
alt="cookofflogo"
48+
height={20}
49+
width={20}
50+
/>
51+
</span>
52+
53+
<span className="font-yerk text-xs text-gray-100">Register</span>
54+
</Link>
55+
</Button>
56+
</div>
57+
</div>
58+
</>
59+
);
60+
}

src/components/Navbar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
DropdownMenuItem,
2525
} from "@/components/ui/dropdown-menu";
2626
import { useCourses } from "@/context/courseContext";
27+
import CookoffBanner from "./CookoffBanner";
2728

2829
function Navbar() {
2930
const pathname: string = usePathname() ?? "/";
@@ -55,15 +56,16 @@ function Navbar() {
5556

5657
return (
5758
<div className="sticky top-0 z-[50] w-full bg-[#B2B8FF] dark:bg-[#130E1F]">
58-
<Banner
59+
{/* <Banner
5960
bannerId="freshers"
6061
bgColor="#fef3c7"
6162
textColor="#5a3000"
6263
iconColor="#d97706"
6364
accentColor="#78350f"
6465
title="Attention Freshers!"
6566
message="If papers for your subject are not yet available, click on your subject and explore related subjects until papers become available, as these are newly introduced courses."
66-
/>
67+
/> */}
68+
<CookoffBanner />
6769
<div className="flex items-center justify-between bg-inherit px-4 py-4 md:px-8 md:py-5">
6870
{}
6971
<div className="relative flex items-center gap-4">

src/components/SideBar.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ function SideBar({
4848
const exams =
4949
filterOptions?.unique_exams.map((exam) => ({ label: exam, value: exam })) ?? [];
5050
const slots =
51-
filterOptions?.unique_slots.map((slot) => ({ label: slot, value: slot })) ?? [];
51+
filterOptions?.unique_slots
52+
.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }))
53+
.map((slot) => ({ label: slot, value: slot })) ?? [];
5254
const years =
53-
filterOptions?.unique_years.map((year) => ({ label: year, value: year })) ?? [];
55+
filterOptions?.unique_years
56+
.sort((a, b) => b.localeCompare(a))
57+
.map((year) => ({ label: year, value: year })) ?? [];
5458
const semesters =
5559
filterOptions?.unique_semesters.map((semester) => ({
5660
label: semester,

0 commit comments

Comments
 (0)