-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve user navigation in the list and between lists #39
Conversation
…ke shopping lists navigate to the list view
Visit the preview URL for this PR (updated for commit 275ca7c): https://tcl-78-smart-shopping-list--pr39-el-improve-list-nav-vxu6gooh.web.app (expires Thu, 03 Oct 2024 17:27:46 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c781903507c1507075d7a974036959ddeec29c0a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @eva-lng 👌🏾.
All the ACs work effectively according to all my tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! This PR addresses very important features for the app and contributes a lot to making the navigation smoother. Good job!
I only found one issue: when there are no items in a list, I wasn’t able to see the form. See the comment in the List view, line 83, for further details.
@@ -83,6 +80,8 @@ export function List({ data, listPath, lists }) { | |||
)} | |||
{lists.length > 0 && data.length > 0 && ( | |||
<> | |||
<AddItem data={data} listPath={listPath} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having the form here makes perfect sense in terms of usability and navigation within the app. However, I noticed that when I’m on a list with no items, I can’t see the form for adding items in either the ManageList or List views:
Screen.Recording.2024-09-26.at.17.33.14.mov
} catch (error) { | ||
console.error(error.message, error); | ||
setErrorMsg('Failed to delete the item. Please try again!'); | ||
alert('Failed to delete the item. Please try again!'); | ||
} | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A further improvement for this view could be displaying the list name so users can always know which list they are interacting with.
} | ||
|
||
await addItem(listPath, { | ||
itemName: name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this PR is merged, you may want to integrate the changes introduced, so item names are capitalized before being saved in Firestore.
Description
Clicking on a shopping list button in
Home
view navigates the user to theList
view of that shopping list. All success / error messages are handled via alert window instead of rendering an element on the page. The form for adding a new item was moved into theList
view to optimise the UX. Additionally, as part of refactoring,AddItem
andAddList
were moved into new separate components to improve the readability of the codebase.Related Issue
closes #34
Acceptance criteria
Manage List
view to theList
viewHome
view, the user is redirected to theList
view for that shopping listconfirm
oralert
windowType of Changes
enhancement
Updates
Updated List view
Alert on creating a new list
Testing Steps / QA Criteria
npm start
List
view to see the add item form