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

Add option to disable "open this link in browser" popup. #2662

Open
altsst opened this issue Feb 5, 2023 · 5 comments
Open

Add option to disable "open this link in browser" popup. #2662

altsst opened this issue Feb 5, 2023 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers Jira This ticket is being tracked in Jira User Interface User interface issue

Comments

@altsst
Copy link

altsst commented Feb 5, 2023

Describe the bug
The session client on android/mac/windows is asking if I want to open a link in the browser.

There should be an option to disable that popup and open it directly in the browser.

To Reproduce

  1. Send a link to someone
  2. Click on link to try and open it in the browser

Screenshots or Logs
image

Other information (please complete the following information):

  • Device: MacOS, Windows, Android
  • OS: MacOS 12.6, Windows 10, Android 13
  • Session Version or Git commit hash: Session 1.10.4, 991ddd1
@KeeJef KeeJef added enhancement New feature or request User Interface User interface issue good first issue Good for newcomers labels Apr 14, 2023
@KeeJef
Copy link
Collaborator

KeeJef commented Aug 18, 2023

Yeah i think this is a good idea, would support putting an option in the modal, something like "Don't show me this again"

@VityaSchel
Copy link

Yeah i think this is a good idea, would support putting an option in the modal, something like "Don't show me this again"

I think it would be better to add "Trust this domain" button which adds this exact hostname to list of trusted and put "Disable link warnings" in settings instead. Users presented with "don't show me this again" will usually click it, because it removes extra time-wasting step for them (risking security), and by adding option to disable these popups to settings we add extra customization for users who took their time to search for settings for this exact option and who take responsibility of clicking on unknown links.

@VityaSchel
Copy link

I noticed that in current implementation pressing "esc" while in this modal copies link to clipboard. Is this intentional? Looks like bug because SessionConfirm modal is used.

I created separate component SessionOpenExternalLinkDialog and separate modal state OpenExternalLinkModalState, moved showLinkVisitWarningDialog from SessionConfirm to OpenExternalLinkDialog so we don't mix these two modals in same file and took some design ideas from discord to put all four possible actions in popup: 1) close popup 2) copy link 3) just open 4) open and trust in future

Here is reference from Discord:
image

Here is what I made:
image
image

Here is patch for this:
0001-chore-refactor-redesign-external-links-modal.patch

And for trusted websites feature:
image
image

I added TrustWebsitesController which is a simplier copy of BlockedNumberController that stores trusted hostnames in db by trusted-websites key.

image image image

By the way, I fixed this issue when options were shrinking because of too small resolution. This is fixed by applying flex-shrink: 0.
image
became:
image
Also this arrow should be reversed (pointing downwards when closed) so I fixed it too
image

However, I noticed that trusted-websites key does not get saved in database, while blocked does. I need these changes to be reviewed and approved anyway, so please keep in mind this issue with persisting trusted hostnames string set.

Here is final patch with yarn ready executed:

0001-feat-trusted-websites-list-and-trust-hostname-btn.patch

And I'll create a pull request when GitHub support detach my bot framework repo and I'll be able to fork session desktop client repo again.

@KeeJef
Copy link
Collaborator

KeeJef commented Apr 29, 2024

Thanks for taking a stab at this @VityaSchel , after looking at this further, i think we want to take this in house as we want to support this feature cross platform and potentially sync the URL list cross platform, which extends this from being a simple PR into something more complex. Tracking this via Jira internally as https://optf.atlassian.net/browse/SES-1808

VityaSchel added a commit to VityaSchel/session-desktop that referenced this issue Apr 29, 2024
VityaSchel added a commit to VityaSchel/session-desktop that referenced this issue Apr 29, 2024
This commit adds the trusted websites list via TrustedWebsitesController
and "Trust [hostname]" button to OpenExternalLinkDialog.

Need help with resolving issue with persisting it to db.

See oxen-io#2662.
@VityaSchel
Copy link

Thanks for taking a stab at this @VityaSchel , after looking at this further, i think we want to take this in house as we want to support this feature cross platform and potentially sync the URL list cross platform, which extends this from being a simple PR into something more complex. Tracking this via Jira internally as https://optf.atlassian.net/browse/SES-1808

I was finally able to create PR with my code #3088 so feel free to take anything from it, if it helps :)

@KeeJef KeeJef added the Jira This ticket is being tracked in Jira label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Jira This ticket is being tracked in Jira User Interface User interface issue
Projects
None yet
Development

No branches or pull requests

3 participants