Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Enhancement: Dynamic Select Form #13

Merged
merged 43 commits into from
Mar 25, 2020
Merged

Conversation

zshafiqu
Copy link
Owner

There was an issue where the search form made it difficult to get a report on cars where the name is ambiguous, or not well defined, such as ‘BMW 3-series’ or ‘Lexus ES’. One may assume they should enter BMW 325i or 'Lexus ES300'. The form being open to any text input also took away from the user experience because, what if someone is just exploring? What if someone doesn't know what they're looking for?

Because of this, the web report interface’s open search form was swapped out with a dynamically updating select form. The user can explore between year, make, and model, and the web application will update as you change.

I utilized the fetch() API to grab the updated lists, and they are asynchronously rendered as you change your selections. There were some challenges with processing the form asynchronously, however these issues were fixed by checking inputs as well as processing certain items sequentially. Most updates made to server.py and report.html

An additional issue arose during this feature build-out, which was the fact that the application would sometimes disconnect from the database server while rendering data. I wrapped some function calls in while loops to attempt them twice before rendering an error, because usually a connection interruption is fixed almost instantly.

Screen Shot 2020-03-24 at 9 05 49 PM

…d js script to update make and model on change
@zshafiqu zshafiqu self-assigned this Mar 25, 2020
@zshafiqu zshafiqu linked an issue Mar 25, 2020 that may be closed by this pull request
@zshafiqu zshafiqu merged commit 80dbe4d into master Mar 25, 2020
@zshafiqu zshafiqu deleted the dynamic-select-form branch April 11, 2020 23:13
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.

Search support for specific model types
1 participant