dwyl / dwyl/library

Use AJAX for adding books to library

Open
#16 1 comment 1 reaction 0 assignees View on GitHub
enhancement priority-4
Dominant language
Elixir
Stars
16
Forks
1
PR merge metrics
No merged PRs in 30d

Description

At the moment we have a standard route for when one adds a book to the database (using a querystring and a get request), this involves a page refresh which means that the user loses all of the search items on the page.

For users without javascript enabled, we would have the page the user is on (with the querystring for their search on the url we send to the server as a parameter), so that once the book is added the user will be redirected back to their previous search. This involves a page reload, and hitting the Google Books API (which is relatively strictly rate limited) again. This isn't ideal, but would be a reasonable compromise for users without JS enabled.

For users with JS enabled we would like to make an API route on our server where we can use AJAX on the front end to update the database, thus not needing a page refresh.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the current standard add-book route and the front-end search page. Compare the desired AJAX API path with the no-JavaScript fallback that preserves the search query, and verify that the completed behavior avoids a page refresh for JavaScript users while redirecting back to the prior search for others.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
api, full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.