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

Ability to archive groups when they’re settled up #45

Merged

Conversation

acuteengle
Copy link
Contributor

@acuteengle acuteengle commented Jan 15, 2024

Quick implementation for idea 1 in #44

Demo: https://www.loom.com/share/760c75995df94df1bdc91205631e365e?sid=5959bc98-c2a5-4332-8f2f-50f551611d05

Also happy to discuss alternative ideas for how to achieve "Indication of "Settled up" groups"

V2 with groupings of groups: https://www.loom.com/share/1c7edc686d0d43b5a01d3f467438def1

Copy link

vercel bot commented Jan 15, 2024

@acuteengle is attempting to deploy a commit to the Sebastien Castiel Team on Vercel.

A member of the Team first needs to authorize it.

)}
</span>
<div className="w-full flex items-center justify-between mt-2">
{groupIsSettledUp && <div className="flex items-center">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additional icon if group is settled up

? state.groupsDetails.find((d) => d.id === group.id)
: null
return (
<li key={group.id}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

File was getting pretty big so I just moved this into its own component RecentGroupListCard so that I could re-use it for the different group lists

@@ -64,3 +66,28 @@ export function unstarGroup(groupId: string) {
JSON.stringify(starredGroups.filter((g) => g !== groupId)),
)
}

export function getArchivedGroups() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These helpers are basically the same as the "starredGroups" ones

@scastiel
Copy link
Member

Thanks @acuteengle, amazing job 👍

I update your PR to fix a couple of TypeScript issues. I also added a title at the top of each section (Starred groups, Recent groups, Archived groups), I think the page looks better this way!

@scastiel scastiel linked an issue Jan 16, 2024 that may be closed by this pull request
@scastiel scastiel changed the title Settled up icon on group card Ability to archive groups when they’re settled up Jan 16, 2024
@scastiel scastiel merged commit 36cc4f1 into spliit-app:main Jan 16, 2024
1 check failed
@acuteengle acuteengle deleted the indicate-settled-up-groups-in-list branch January 16, 2024 16:00

const details =
state.status === 'complete'
? state.groupsDetails.find((d) => d.id === group.id)
: null

if (state.status === 'pending') return null

const refreshGroupsFromStorage = () =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oooh this is nice 💪🏻

</>
)}
</>
)
}

function GroupList({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even better 🎉

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.

Ability to archive groups when they’re settled up
2 participants