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

feat(friends): Allow quick add friend from link #906

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from

Conversation

Flemmli97
Copy link
Contributor

What this PR does 📖

  • Allows one to quickly add someone to friends from a link. The link is of format doman/friends/add/<did> e.g. localhost:5173/friends/add/some_did.
    Opening that link brings you to the friends page with a pop up allowing you to send a friend request to that user
  • Currently no in app way to generate the link. Ideas about this?

Which issue(s) this PR fixes 🔨

@github-actions github-actions bot added Missing dev review Two dev reviews are required on PR Failed Automated Test Failed Automated Tests CI labels Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Automated tests execution is complete! You can find the Playwright test report here and the Allure Test Report here

@lgmarchi
Copy link
Collaborator

lgmarchi commented Dec 3, 2024

What this PR does 📖

  • Allows one to quickly add someone to friends from a link. The link is of format doman/friends/add/<did> e.g. localhost:5173/friends/add/some_did.
    Opening that link brings you to the friends page with a pop up allowing you to send a friend request to that user
  • Currently no in app way to generate the link. Ideas about this?

Which issue(s) this PR fixes 🔨

I think this can work to generate link and send to others @Flemmli97

  let generatedLink = "";

 function generateLink() {
    generatedLink = `${window.location.origin}/friends/add/${userId}`;
  }

@Flemmli97
Copy link
Contributor Author

What this PR does 📖

  • Allows one to quickly add someone to friends from a link. The link is of format doman/friends/add/<did> e.g. localhost:5173/friends/add/some_did.
    Opening that link brings you to the friends page with a pop up allowing you to send a friend request to that user
  • Currently no in app way to generate the link. Ideas about this?

Which issue(s) this PR fixes 🔨

I think this can work to generate link and send to others @Flemmli97

  let generatedLink = "";

 function generateLink() {
    generatedLink = `${window.location.origin}/friends/add/${userId}`;
  }

i mean more like where do we want to provide this functionality? when clicking on copy did button e.g.?

@luisecm
Copy link
Contributor

luisecm commented Dec 3, 2024

@Flemmli97 Hey Kevin, I noticed that clicking on "Blocked" button from Friends page redirects to the incoming/outgoing requests instead of Blocked List

Grabacion.de.pantalla.2024-12-03.a.la.s.12.08.54.p.m.mov

@luisecm luisecm added the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 3, 2024
@luisecm
Copy link
Contributor

luisecm commented Dec 3, 2024

@Flemmli97 There is another bug caught by the automation tests - npm run build is failing with the following error:

✓ built in 13.71s

node:internal/event_target:1088
  process.nextTick(() => { throw err; });
                           ^
Error: The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:
  - /friends/add/[user]

See https://svelte.dev/docs/kit/page-options#prerender-troubleshooting for info on how to solve this
    at prerender (file:///Users/luisecm/Satellite/UplinkWeb/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:511:9)
    at async MessagePort.<anonymous> (file:///Users/luisecm/Satellite/UplinkWeb/node_modules/@sveltejs/kit/src/utils/fork.js:23:16)
Emitted 'error' event on Worker instance at:
    at [kOnErrorMessage] (node:internal/worker:326:10)
    at [kOnMessage] (node:internal/worker:337:37)
    at MessagePort.<anonymous> (node:internal/worker:232:57)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
    at exports.emitMessage (node:internal/per_context/messageport:23:28)

This is the reason why the tauri build jobs for desktop versions are failing on this branch

@lgmarchi
Copy link
Collaborator

lgmarchi commented Dec 3, 2024

What this PR does 📖

  • Allows one to quickly add someone to friends from a link. The link is of format doman/friends/add/<did> e.g. localhost:5173/friends/add/some_did.
    Opening that link brings you to the friends page with a pop up allowing you to send a friend request to that user
  • Currently no in app way to generate the link. Ideas about this?

Which issue(s) this PR fixes 🔨

I think this can work to generate link and send to others @Flemmli97

  let generatedLink = "";

 function generateLink() {
    generatedLink = `${window.location.origin}/friends/add/${userId}`;
  }

i mean more like where do we want to provide this functionality? when clicking on copy did button e.g.?

I think would be nice to send in chat for example, the other user just click in add, but would be better, if show pop up, without go out of chats page.

Copy link
Member

@stavares843 stavares843 left a comment

Choose a reason for hiding this comment

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

luis comment needs fixing

@github-actions github-actions bot added the Missing fixing conflict Needs to fix conflicts label Dec 3, 2024
@Flemmli97
Copy link
Contributor Author

What this PR does 📖

  • Allows one to quickly add someone to friends from a link. The link is of format doman/friends/add/<did> e.g. localhost:5173/friends/add/some_did.
    Opening that link brings you to the friends page with a pop up allowing you to send a friend request to that user
  • Currently no in app way to generate the link. Ideas about this?

Which issue(s) this PR fixes 🔨

I think this can work to generate link and send to others @Flemmli97

  let generatedLink = "";

 function generateLink() {
    generatedLink = `${window.location.origin}/friends/add/${userId}`;
  }

i mean more like where do we want to provide this functionality? when clicking on copy did button e.g.?

I think would be nice to send in chat for example, the other user just click in add, but would be better, if show pop up, without go out of chats page.

i think for chat we already have that if you send a did it will autoformat with button to add (if not we had that in native). so link that redirects you to different page dont think is better than that

@Flemmli97 Flemmli97 removed the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 4, 2024
@Flemmli97
Copy link
Contributor Author

added a dropdown when right clicking copy did in friend page and profile setting page. it will copy a pasteable url

@Flemmli97 Flemmli97 removed the Missing fixing conflict Needs to fix conflicts label Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Download the app installers for this pull request:

@luisecm
Copy link
Contributor

luisecm commented Dec 4, 2024

@Flemmli97 Hey Kevin, I noticed that clicking on "Blocked" button from Friends page redirects to the incoming/outgoing requests instead of Blocked List

Grabacion.de.pantalla.2024-12-03.a.la.s.12.08.54.p.m.mov

Hello @Flemmli97 is there any update about this one? Its still failing for me. thanks!

@luisecm luisecm added the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 4, 2024
@Flemmli97 Flemmli97 removed the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 4, 2024
@github-actions github-actions bot removed the Failed Automated Test Failed Automated Tests CI label Dec 4, 2024
@github-actions github-actions bot added the Missing fixing conflict Needs to fix conflicts label Dec 5, 2024
@stavares843 stavares843 removed the Missing fixing conflict Needs to fix conflicts label Dec 5, 2024
@phillsatellite
Copy link
Contributor

Hey @Flemmli97 so during testing I had an issue

So the link will take me to the app and add modal pops up but it will say "unknown user and unknown status message" and will never seem to load the username. But when I click add the request does go through as expected

Screenshot 2024-12-05 at 1 40 51 PM

@phillsatellite phillsatellite added the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 5, 2024
@Flemmli97
Copy link
Contributor Author

Hey @Flemmli97 so during testing I had an issue

So the link will take me to the app and add modal pops up but it will say "unknown user and unknown status message" and will never seem to load the username. But when I click add the request does go through as expected

Screenshot 2024-12-05 at 1 40 51 PM

yes it just fails to fetch the identity from warp. not too sure why though and i wont pin it on this PR. maybe @dariusc93 can shed some light on it?
the identity gets found if the friend request is sent

@dariusc93
Copy link
Contributor

If the user never been discovered before it would attempt discovery upon lookup and would emit an event upon the user being discovered and verified. Not sure if the modal is updating upon the event being emitted either though but it does somewhat make sense on why it goes through since it is happening in the background. If the user been discovered previously by the same account and it is cached but not showing up, i would need more information to see if its a bug in how it is cached.

@Flemmli97
Copy link
Contributor Author

If the user never been discovered before it would attempt discovery upon lookup and would emit an event upon the user being discovered and verified. Not sure if the modal is updating upon the event being emitted either though but it does somewhat make sense on why it goes through since it is happening in the background. If the user been discovered previously by the same account and it is cached but not showing up, i would need more information to see if its a bug in how it is cached.

If the user never been discovered before it would attempt discovery upon lookup and would emit an event upon the user being discovered and verified. Not sure if the modal is updating upon the event being emitted either though but it does somewhat make sense on why it goes through since it is happening in the background. If the user been discovered previously by the same account and it is cached but not showing up, i would need more information to see if its a bug in how it is cached.

it uses a store which updates when identity is fetched from multipass via Multipass#get_identity
I already verified that Multipass#get_identity fails to fetch an identity if you never interacted with the given user before (e.g. if you friended them and unfriended then it returns correctly).

@Flemmli97 Flemmli97 removed the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 13, 2024
@Flemmli97
Copy link
Contributor Author

needs shuttle to find users that are not discovered yet (aka warp/wasm update)

@phillsatellite phillsatellite added 🔒 blocked and removed Missing dev review Two dev reviews are required on PR labels Dec 13, 2024
@stavares843 stavares843 added the Missing dev review Two dev reviews are required on PR label Dec 13, 2024
@Flemmli97
Copy link
Contributor Author

see #893 (review)

@github-actions github-actions bot added the Missing fixing conflict Needs to fix conflicts label Dec 18, 2024
@Flemmli97 Flemmli97 removed the Missing fixing conflict Needs to fix conflicts label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔒 blocked Missing dev review Two dev reviews are required on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

task(Friends): Add a way to share DID
7 participants