Skip to content

make an "add as friend" web component#826

Open
SharonStrats wants to merge 2 commits into
stagingfrom
feat/add-friends-component
Open

make an "add as friend" web component#826
SharonStrats wants to merge 2 commits into
stagingfrom
feat/add-friends-component

Conversation

@SharonStrats

Copy link
Copy Markdown
Contributor

This moves over the code from profile-pane for adding as a friend and creates a Web Component from the code.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new solid-ui-button-add-friend web component by extracting the “add as friend” behavior into a reusable component, along with supporting helpers, styling, and a Storybook story.

Changes:

  • Added ButtonAddFriend web component that checks login state, detects existing friendships, and performs the FOAF knows mutation.
  • Added helper to ensure standard RDF prefixes are registered for rdflib mutations.
  • Added component styling and a Storybook story for basic states.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/components/button-add-friend/index.ts Barrel export for the new add-friend component.
src/components/button-add-friend/helpers.ts Adds prefix-registration helper used before rdflib updates.
src/components/button-add-friend/ButtonAddFriend.ts Implements the add-friend web component and mutation logic.
src/components/button-add-friend/ButtonAddFriend.styles.css Styles the inline status banner shown on error.
src/components/button-add-friend/ButtonAddFriend.stories.ts Storybook coverage for guest/logged-in/friend-exists states.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/button-add-friend/ButtonAddFriend.ts Outdated
Comment thread src/components/button-add-friend/ButtonAddFriend.ts
Comment thread src/components/button-add-friend/ButtonAddFriend.ts
Comment thread src/components/button-add-friend/ButtonAddFriend.ts
Comment thread src/components/button-add-friend/ButtonAddFriend.stories.ts Outdated
Comment thread src/components/button-add-friend/ButtonAddFriend.stories.ts Outdated
Comment thread src/components/button-add-friend/ButtonAddFriend.styles.css
@SharonStrats SharonStrats force-pushed the feat/add-friends-component branch 2 times, most recently from 2253b1e to 69ec36f Compare July 3, 2026 02:30
@SharonStrats SharonStrats force-pushed the feat/add-friends-component branch from 69ec36f to ab67365 Compare July 3, 2026 02:36
Prompt: Create stories for ButtonAddFriend for guest, loggedin and FriendExists follow
the stories in the Component directory

Co-authored-by: GPT-5.4 Mini <gpt-5.4-mini@openai.com>
@timea-solid

Copy link
Copy Markdown
Member

Looks ok to me, but I would appreciate Noels review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

createAddMeToYourFriendsButton should become a web component in solid-ui

3 participants