cpinitiative / usaco-guide

A free collection of curated, high-quality resources to take you from Bronze to Platinum and beyond.
https://usaco.guide
Other
1.56k stars 464 forks source link

Searching Problems #86

Open bqi343 opened 3 years ago

bqi343 commented 3 years ago

Incomplete Features

Note that this list is not necessarily ordered by importance.


from https://github.com/cpinitiative/usaco-guide/issues/86#issuecomment-788536196 (note that this list may be a bit outdated):

okay so here was what I am thinking (am open to changes):

we should also allow users to use problems page to create randomized problemsets to do. this would entail:


Completed Features

thecodingwizard commented 3 years ago

How should search mechanic for this work? Two search bars?

thecodingwizard commented 3 years ago

or should problems be considered as part of a module? Or should we have a dedicated "Problem Search" page (this is probably easiest)?

bqi343 commented 3 years ago

both seem fine (something like CSAcademy Archive? https://csacademy.com/contest/archive/)

thecodingwizard commented 3 years ago

okay let's do a dedicated page. What properties should they be able to search for?

bqi343 commented 3 years ago

maybe search for difficulty only if division where the problem is located is specified

thecodingwizard commented 3 years ago

so search by division rather than difficulty? that seems reasonable

bqi343 commented 3 years ago

both I guess

thecodingwizard commented 3 years ago

how do we define "difficulty" though? Our difficulty labels were relative to module...

bqi343 commented 3 years ago

I think it's still useful to search by that

thecodingwizard commented 3 years ago

Before this is implemented, navbar needs to be updated:

thecodingwizard commented 3 years ago

oops this turned out to be more nontrivial than I thought. navbar is updated but configuring algolia + setting up problem search page may take some time.

https://github.com/thecodingwizard/usaco-guide/tree/feature/problems

bqi343 commented 3 years ago

Bring out of backlog? :o

thecodingwizard commented 3 years ago

oops I'll try to implement this soon but it might take some time now that school started :(

(Maybe I'll make a preliminary version that allows searching by name at least)

bqi343 commented 3 years ago

Request for searching by source (ex. USACO Plat) + difficulty.

thecodingwizard commented 3 years ago

Difficulty is questionable... (Wormhole sort is both easy and insane XD)

Also searching by source is already doable (just type out the source)

bqi343 commented 3 years ago

Difficulty is questionable... (Wormhole sort is both easy and insane XD)

Taking min difficulty could be okay. Also,

hide solution links on the problems page if the user has tags + solutions off

Hide tags as well?

bqi343 commented 3 years ago

Request for searching by source (ex. USACO Plat) + difficulty.

O also contest I guess (ex. Open 19)

MrinallU commented 3 years ago

So like in the problems page what if we had like three filter options, one to search by name, one by tag and one by difficulty, although I think difficulty is pretty relative based on the person.

thecodingwizard commented 3 years ago

You should be able to use all three filters at once (see https://react-instantsearch.netlify.app/examples/e-commerce/ or something like that)

MrinallU commented 3 years ago

I see...

MrinallU commented 3 years ago

So does each problem have this data (more specifically does each problem have its own tags and difficulty measure?)

bqi343 commented 3 years ago
MrinallU commented 3 years ago

@thecodingwizard Can I get assigned to this?

thecodingwizard commented 3 years ago

okay so here was what I am thinking (am open to changes):

we should also allow users to use problems page to create randomized problemsets to do. this would entail:

cirex-web commented 2 years ago

Is this issue closed already? It seems like problem searching is already available.

thecodingwizard commented 2 years ago

no. it's missing features described above :(

thecodingwizard commented 6 months ago

Somehow this happened:

image

I don't think this has ever happened before. We may want to consider optimizing searches / operations usage if this continues to be a problem.

image

(cc @devo1ution)

danielzsh commented 6 months ago

oh shoot wait im so sorry...I think each individual refine call got counted as an operation so filtering to not attempted would immediately take ~1000 operations šŸ˜­ I've changed it to use setIndexUiState to combine all these operations into 1, so we shouldn't run into this issue in the future.

Sorry!

Also if we have to pay for a temporary upgrade (if thats a thing) I'm completely willing to šŸ˜“

thecodingwizard commented 6 months ago

Oh that makes sense, thanks for letting me know! Don't worry about it -- mistakes happen and this is totally fine as long as it's not likely to be a recurring issue.

Also if we have to pay for a temporary upgrade (if thats a thing) I'm completely willing to šŸ˜“

Thanks very kind of you but you really don't have to (CPI will generally pay for all development costs, including mistakes)! I was trying to see if it's possible to temporarily upgrade the plan, but we're on a legacy open-source plan so I don't even see the option to pay for more usage at the moment :p