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

Improve user navigation in the list and between lists #39

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

eva-lng
Copy link
Collaborator

@eva-lng eva-lng commented Sep 26, 2024

Type
Enhancement
Improve user navigation in the app

Description

Clicking on a shopping list button in Home view navigates the user to the List 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 the List view to optimise the UX. Additionally, as part of refactoring, AddItem and AddList were moved into new separate components to improve the readability of the codebase.

Related Issue

closes #34

Acceptance criteria

  • The form for adding a new item is moved from the Manage List view to the List view
  • When a shopping list is clicked in Home view, the user is redirected to the List view for that shopping list
  • All success / failure messages regarding deleting or adding an item should be displayed to the user via confirm or alertwindow

Type of Changes

enhancement

Updates

Updated List view

Screenshot 2024-09-26 at 16 52 10

Alert on creating a new list

Screenshot 2024-09-26 at 16 53 27

Testing Steps / QA Criteria

  • npm start
  • navigate to the List view to see the add item form
  • create a new item/new list, success messages will be in alerts

@eva-lng eva-lng requested a review from Amaka202 September 26, 2024 14:57
Copy link

github-actions bot commented Sep 26, 2024

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

@tataw-cl tataw-cl self-requested a review September 26, 2024 16:19
Copy link
Contributor

@tataw-cl tataw-cl left a 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.

@eva-lng eva-lng requested review from vivitt and removed request for Amaka202 September 26, 2024 16:41
Copy link
Collaborator

@vivitt vivitt left a 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} />
Copy link
Collaborator

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!');
}
};

Copy link
Collaborator

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,
Copy link
Collaborator

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.

@eva-lng eva-lng merged commit 13baf18 into main Sep 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants