Implement friends list and refactor components #28
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
WIP
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: gorb/frontend#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "friends-list"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
this implements friends list, and friend requests.
i also sorted the components into sub-folders, but this now sadly requires us to import them, sometimes. I have no idea what the behavior is, but i can't stand a folder of 25 files just laying there.
Closes #27
screenshot of ui attached
Is there a reason for using links instead of the Button component?
@sauceyred wrote in #28 (comment):
there was originally, but now that you mention it, not really, i'll go change that
I've already made some changes, mind if I push so you can review?
go ahead
Review comments
@ -35,0 +38,4 @@
}
async function addFriend(username: string): Promise<void> {
await fetchWithApi('/me/friends', { method: "POST", body: { username } });
Add
return
for consistency@ -35,0 +42,4 @@
}
async function removeFriend(userId: string): Promise<void> {
await fetchWithApi(`/me/friends/${userId}`, { method: "DELETE" });
Add
return
for consistency@ -93,2 +93,3 @@
#members-container {
width: 15rem;
min-width: 15rem;
max-width: 15rem;
Why
min-width
andmax-width
instead ofwidth
? Is there a difference?if we just set a width, it can expand, and it can shrink. I believe this is related to flexboxes deciding to grow in weird ways
you can see that the members list has a different width in the attachments
Huh, weird, but okay.
@ -18,3 +18,3 @@
{{ page.displayName }}
</li>
<span class="spacer"></span>
<verticalSpacer />
Incorrect capitalization
@ -24,3 +24,3 @@
<Button text="Log Out" :callback=logout variant="scary"></Button>
</p>
<span class="spacer"></span>
<verticalSpacer />
Incorrect capitalization
👍
I think it auto-imports top-level components, but components in subdirectories require manual import.
Looks good.
@sauceyred wrote in #28 (comment):
yeah, that's what i experienced, was just wondering if there was a way around it