Skip to content

Course Sorting Feature#125

Open
Divyesh-Thirukonda wants to merge 18 commits intosamyok:mainfrom
Divyesh-Thirukonda:Divyesh-Sort
Open

Course Sorting Feature#125
Divyesh-Thirukonda wants to merge 18 commits intosamyok:mainfrom
Divyesh-Thirukonda:Divyesh-Sort

Conversation

@Divyesh-Thirukonda
Copy link
Collaborator

  • All the code I wrote is in sidebar.js and it only affects the schedule builder.
  • The user can now sort the courses in schedule builder.
  • Instead of the default numbering system, the user can sort by number of seats available, most common grade earned, popularity (how many students enrolled in the past), and number of units.
  • The dropdown to sort is at the top, next to 'show all sections'

@vercel
Copy link

vercel bot commented Jun 20, 2024

Someone is attempting to deploy a commit to the umn social coding Team on Vercel.

A member of the Team first needs to authorize it.

@Divyesh-Thirukonda Divyesh-Thirukonda marked this pull request as draft June 20, 2024 05:25
@Divyesh-Thirukonda Divyesh-Thirukonda marked this pull request as ready for review June 20, 2024 05:26
@Kanishk-K Kanishk-K requested review from Kanishk-K and samyok June 20, 2024 05:28
Divyesh Thirukonda Gowri Shankar added 2 commits June 20, 2024 00:39
Copy link
Owner

@samyok samyok left a comment

Choose a reason for hiding this comment

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

left a few cursory comments from my phone. will look closer at the airport

@vercel
Copy link

vercel bot commented Jun 20, 2024

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

Name Status Preview Updated (UTC)
gophergrades ✅ Ready (Inspect) Visit Preview Jun 20, 2024 9:33pm

Divyesh Thirukonda Gowri Shankar added 2 commits June 20, 2024 01:36
@Divyesh-Thirukonda
Copy link
Collaborator Author

DEMO.mp4

DEMO

@samyok
Copy link
Owner

samyok commented Jun 20, 2024

// next.config.js

/** @type {import('next').NextConfig} */
const nextConfig = {
    async headers() {
        return [
            {
                // matching all API routes
                source: "/api/:path*",
                headers: [
                    { key: "Access-Control-Allow-Credentials", value: "true" },
                    { key: "Access-Control-Allow-Origin", value: "*" }, // replace this your actual origin
                    { key: "Access-Control-Allow-Methods", value: "GET,DELETE,PATCH,POST,PUT" },
                    { key: "Access-Control-Allow-Headers", value: "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" },
                ]
            }
        ]
    }
}

module.exports = nextConfig

Add something like this, I copied from here https://blog.logrocket.com/using-cors-next-js-handle-cross-origin-requests/

I'd add it myself but still on phone and I'm headed to work rn

Copy link
Owner

@samyok samyok left a comment

Choose a reason for hiding this comment

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

CORS+API and then we're good!

CORS workaround, code styling, improved readability, comments, and reduced redundancy
@samyok samyok requested review from samyok and removed request for Kanishk-K June 22, 2024 05:38
Divyesh Thirukonda Gowri Shankar added 2 commits June 22, 2024 00:39
@Divyesh-Thirukonda Divyesh-Thirukonda requested a review from samyok July 6, 2024 19:00
@Divyesh-Thirukonda
Copy link
Collaborator Author

Are things still working fine with this update?

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