Apollo Error When Saving Category Name with Highlighted Auto-Suggestion

Open
#1,262 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start by reproducing the issue in the Admin dashboard's category name input using Chrome, then trace the save path and Apollo validation handling for an arrow-key-highlighted suggestion. No files or tests are named in the issue. Done means the highlighted suggestion is accepted and the category saves without an Apollo error.

Written by the indexing model from the issue text.

Description

Description:
When entering the name of a category in the Admin dashboard, if past suggestions pop up and a suggestion is highlighted using the arrow keys, clicking "Save" results in an Apollo error. This seems to occur because the auto-suggestion in Google Chrome sends the input incorrectly, leading to a validation failure (Hypothesis).

Steps to Reproduce:
1-Navigate to the Admin dashboard.
2-Start typing the name of a category in the category input field.
3-When past suggestions appear, use the arrow keys to highlight one of them.
4-Click "Save" while a suggestion is highlighted.
5-Observe the error.

Expected Behavior:
The selected suggestion should be correctly recognized as valid input, and the category should be saved without any errors.

Actual Behavior:
An Apollo error occurs, and the category is not saved. The input is not recognized as valid due to incorrect handling by the auto-suggestion feature in Google Chrome.

Environment:
Browser: Google Chrome
Affected feature: Category name input in Admin dashboard
Issue: Apollo error when saving

Hypothesis:
The auto-suggestion mechanism in Google Chrome may be sending incorrect input data, leading to a validation error when trying to save the highlighted suggestion.

Additional Information:
The issue occurs specifically when a suggestion is highlighted and "Save" is clicked while the suggestion is still active.
The error does not occur when typing the full category name manually without relying on auto-suggestions.

Screenshots/Logs:
(https://github.com/user-attachments/assets/1161efdc-31e9-48a4-b390-6fb8423acc56)

Possible Solution:
Investigate how the auto-suggestion input is being handled by the Apollo client, particularly when suggestions are highlighted using the arrow keys. Consider updating the input handling logic to correctly parse and validate the highlighted suggestion.

Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raymondjames090/food-ordering-system-java-eclipse

All issues in raymondjames090/food-ordering-system-java-eclipse

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.