Skip to content

Added an ItemList component to be used throughout the app#36

Open
Jacob-Mayhue wants to merge 3 commits intomainfrom
ItemList
Open

Added an ItemList component to be used throughout the app#36
Jacob-Mayhue wants to merge 3 commits intomainfrom
ItemList

Conversation

@Jacob-Mayhue
Copy link
Contributor

Added a basic ItemList Component that copied the one in the Android app and left an example in the merchandise screen.

@Jacob-Mayhue Jacob-Mayhue requested a review from jvogt23 February 21, 2026 18:51
@jvogt23 jvogt23 requested a review from elysseaa February 21, 2026 18:52
keyExtractor={itemKey}
renderItem={({ item, index }) => (
<View>
{preItem?.(index)}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preItem and postItem are both used as a sort of customizable divider between elements. If you look at the link below, it shows that postItem is set to be a HorizontalDivider object if the list element isn't the last item.

https://github.com/RoboJackets/apiary-mobile/blob/main/merchandise/src/main/java/org/robojackets/apiary/merchandise/ui/MerchandiseItemSelection.kt

Instead of including preItem and postItem as props, make it so that the list elements have horizontal dividers between them, in the same style as the Android app.

flex: 1,
},
listItem: {
borderBottomWidth: 1,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use themes for colors; may also need to change this style sheet to ensure that the horizontal divider is shown correctly. The horizontal divider should ideally be at the bottom of every list item except the last one; you should be able to selectively set the style of the items in the list based on whether or not they are the last item in the list.

Copy link
Contributor

@elysseaa elysseaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally agree with James' feedback - I think he got most of the issues down. I also had one minor question about the .gitignore file, but it's not as important.

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.

3 participants