[Bug]: Main page problem search shows no "Add new problem" button when nothing matches
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Read components/widgets/SearchBarExtensible.js and how SearchBarPaper renders extenderButtons; then trace how components/pageblocks/ProblemRowReact.js supplies the add button. Reproduce the empty and partial search cases in the main page, then check the reduction, solver, and verifier pickers. Done means empty searches show a working add button, partial matches keep their options and button, and exact matches show no button.
Written by the indexing model from the issue text.
Description
Summary
On the main page, the problem search box offers an Add new problem "..." button at the bottom of its dropdown, so a contributor can start a problem the site doesn't have yet. When the typed text matches no problem at all, the button doesn't show up, which is exactly when it is needed.
(Moved here from ReduxISU/Redux#649; the code is in this repo.)
Steps to reproduce
- Open the main page (
/). - In the first section's problem search box, type a name that matches no problem, for example
Pull. - Look at the dropdown under the box.
Actual: the dropdown closes (no problem matches), and no "Add new problem" button appears.
Expected: the dropdown stays open and shows the button Add new problem "Pull", which opens the new-problem template page (ProblemTemplate/?problemName=Pull).
For comparison, by the code, typing part of a real name (for example Cli) shows the matching problems with the button below them.
Background
- The search box is an MUI
AutocompleteinfreeSolomode, which lets you type any text. - The "Add new ..." buttons are drawn inside the dropdown's panel (MUI calls it the Paper). MUI doesn't open that panel when no option matches, so the buttons are never drawn. This is the likely cause; it hasn't been confirmed in a browser yet.
Where
Redux_GUI, default branch ReduxAPI_GUI:
components/widgets/SearchBarExtensible.js:SearchBarPaperrendersextenderButtonsunder the options, and only when the text isn't an exact match. It is passed in as the Autocomplete'spaperslot.components/pageblocks/ProblemRowReact.js: supplies theAdd new problem "${input}"button.- The same component gives "Add new ..." buttons to the reduction (
ReduceToRowReact.js), solver (SolveRowReact.js) and verifier (VerifyRowReact.js) pickers, which likely have the same bug.
Done when
- Typing text that matches no problem shows the dropdown with only the Add new problem "" button.
- Clicking it opens
ProblemTemplate/?problemName=<text>. - Typing a partial match still shows the matches with the button below them, and an exact match still shows no button.
- If the solver, verifier and reduction pickers have the same bug, their "Add new ..." buttons also show when nothing matches.
Status
Not started; no related PR. The code is unchanged on ReduxAPI_GUI.
Related
- ReduxISU/Redux#649: where this was first filed.
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 18
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 35
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ReduxISU/Redux_GUI
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
About Us: add an "In the News" section, starting with the Idaho State Journal BengalBot articleOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ReduxISU/Redux_GUI#337 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
All issues in ReduxISU/Redux_GUI
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
highcharts/highcharts-react#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day