Ask before opening external links #343

Manually merged
jarolrod merged 2 commits from external-link-warning into main 2024-01-14 12:02:10 +00:00 AGit
jarolrod commented 2023-06-03 03:05:50 +00:00 (Migrated from github.com)

Introduces an external link confirm popup window that prompts the user to acknowledge that they really want to visit the external link. This is based off the design file

This contains a menu bar with a title, but is missing the close button. It is also missing the "Don't ask again" button. These require some more conversation and can be addressed in a follow-up.

This deviates from the design file in providing a mobile layout that positions the buttons in a column layout instead of a rowlayout. cc @GBKS @mouxdesign

Desktop Layout Mobile Layout
Screen Shot 2023-06-03 at 2 11 30 AM Screen Shot 2023-06-03 at 2 12 43 AM

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android
ARM32 Android

Introduces an external link confirm popup window that prompts the user to acknowledge that they really want to visit the external link. This is based off the [design file](https://www.figma.com/file/ek8w3n3upbluw5UL2lGhRx/Bitcoin-Core-App-Design?type=design&node-id=6265-24513&t=PyRCN7AM9KdhuP8x-4) This contains a menu bar with a title, but is missing the close button. It is also missing the "Don't ask again" button. These require some more conversation and can be addressed in a follow-up. This deviates from the design file in providing a mobile layout that positions the buttons in a column layout instead of a rowlayout. cc @GBKS @mouxdesign | Desktop Layout | Mobile Layout | | -------------- | ------------- | | <img width="752" alt="Screen Shot 2023-06-03 at 2 11 30 AM" src="https://git.fish.foo/attachments/1f0fb59b-c22a-43a5-aa7d-2ee3be2c8eb6"> | <img width="752" alt="Screen Shot 2023-06-03 at 2 12 43 AM" src="https://git.fish.foo/attachments/943b8f5c-b2ac-4c38-8041-bf125a38367f"> | [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/unsecure_win_gui.zip?branch=pull/343) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/unsecure_mac_gui.zip?branch=pull/343) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/unsecure_mac_arm64_gui.zip?branch=pull/343) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/343) [![ARM32 Android](https://img.shields.io/badge/OS-Android%2032bit-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android32/unsecure_android_32bit_apk.zip?branch=pull/343)
jarolrod commented 2023-06-03 06:10:19 +00:00 (Migrated from github.com)

Updated from 3a3f8c2 to e9b6d4a

Added a navigation bar with a Title, but without a close button within the navigation bar.

Updated from [3a3f8c2 ](https://github.com/bitcoin-core/gui-qml/commit/3a3f8c2d9cd9b8dbb15e7f6530b5c859d34bd02f)to [e9b6d4a](https://github.com/bitcoin-core/gui-qml/commit/e9b6d4ad6624281419bc6b070e6d6d07736cb031) Added a navigation bar with a Title, but without a close button within the navigation bar.
thebagmaster commented 2023-06-03 19:10:12 +00:00 (Migrated from github.com)

ACK e9b6d4a
Verified on Ryzen 9 Ubuntu 22.04.2 and Note 9 Android 10 on fully synced nodes.

ACK [e9b6d4a](https://github.com/bitcoin-core/gui-qml/commit/e9b6d4ad6624281419bc6b070e6d6d07736cb031) Verified on Ryzen 9 Ubuntu 22.04.2 and Note 9 Android 10 on fully synced nodes.
D33r-Gee (Migrated from github.com) reviewed 2023-06-27 20:28:48 +00:00
D33r-Gee (Migrated from github.com) left a comment

tested ACK on Galaxy A13 5G (armv7a) built on WSL Ubuntu 22.04
PR built w/o issues.

nit, the “External Link” text header seems to be a little off center in portrait mode (in landscape it looks centered) see attachment

The adjustment is a mock up made with image manipulation software, no code was altered.
QML_PR_343_sideComp

tested ACK on Galaxy A13 5G (armv7a) built on WSL Ubuntu 22.04 PR built w/o issues. nit, the “External Link” text header seems to be a little off center in portrait mode (in landscape it looks centered) see attachment The adjustment is a mock up made with image manipulation software, no code was altered. ![QML_PR_343_sideComp](https://git.fish.foo/attachments/e9751aa5-f40e-42de-8774-efa0402a6ac7)
GBKS commented 2023-06-28 05:59:29 +00:00 (Migrated from github.com)

Good idea with the column layout for mobile. Small thing, the overlay should have a 1px border around it (neutral 6 color).

Good idea with the column layout for mobile. Small thing, the overlay should have a 1px border around it (neutral 6 color).
D33r-Gee (Migrated from github.com) reviewed 2023-06-28 19:27:51 +00:00
D33r-Gee (Migrated from github.com) commented 2023-06-28 17:48:33 +00:00

center: true // Center header text

center: true // Center header text
GBKS commented 2023-07-10 10:03:02 +00:00 (Migrated from github.com)

@jarolrod pointed out that this should probably be an application-wide setting. So the first time a user opens an external link, we ask them. If they check the "Don't ask again" option, we don't ask anymore. But they can change this behavior again in the settings. Here's a mock-up for that.

image

@jarolrod pointed out that this should probably be an application-wide setting. So the first time a user opens an external link, we ask them. If they check the "Don't ask again" option, we don't ask anymore. But they can change this behavior again in the settings. Here's a mock-up for that. ![image](https://git.fish.foo/attachments/10928b21-3824-40ff-91a9-9ee87a580a5d)
pablomartin4btc (Migrated from github.com) reviewed 2023-08-31 01:28:20 +00:00
pablomartin4btc (Migrated from github.com) left a comment

tested ACK on desktop built on both Ubuntus 20.04 & 22.04.

As pointed out by @D33r-Gee, the title of the popup "External Link" is not properly centered (it didn't look right at first sight and checked it with a screen ruler - KRuler, perhaps there's a better tooling), try adding center: true in middleDetail: Header block and re-compiling didn't make any difference for me (event setting it to false doesn't). What reduced the pixels difference (~6 vs ~10 - but to the right direction instead) is adding Layout.alignment: Qt.AlignHCenter in NavigationBar block in ExternalPopup.qml but it's like duplicating what's already specify in NavigationBar.qml (id: middle_detail):

image

image image

I like the "Don't ask again" toggle switch proposed by @jarolrod and mocked-up by @GBKS.

tested ACK on desktop built on both Ubuntus 20.04 & 22.04. As [pointed out](https://github.com/bitcoin-core/gui-qml/pull/343#pullrequestreview-1501793727) by @D33r-Gee, the title of the popup "External Link" is not properly centered (it didn't look right at first sight and checked it with a screen ruler - KRuler, perhaps there's a better tooling), [try](https://github.com/bitcoin-core/gui-qml/pull/343#discussion_r1245567577) adding `center: true` in `middleDetail: Header` block and re-compiling didn't make any difference for me (event setting it to false doesn't). What reduced the pixels difference (~6 vs ~10 - but to the right direction instead) is adding `Layout.alignment: Qt.AlignHCenter` in `NavigationBar` block in `ExternalPopup.qml` but it's like duplicating what's already specify in `NavigationBar.qml` (`id: middle_detail`): ![image](https://git.fish.foo/attachments/492f156e-5970-4546-a490-e0bfc709545c) ![image](https://git.fish.foo/attachments/83c99c75-393d-45a3-985a-c7da8f202e1d) ![image](https://git.fish.foo/attachments/e67433d5-f32f-4870-8243-e795773d5fbe) I like the "Don't ask again" toggle switch [proposed](https://github.com/bitcoin-core/gui-qml/pull/343#issuecomment-1628633085) by @jarolrod and mocked-up by @GBKS.
promag commented 2023-08-31 16:55:33 +00:00 (Migrated from github.com)

Concept ACK, approach NACK.

Concept ACK, approach NACK.
pablomartin4btc (Migrated from github.com) reviewed 2023-08-31 16:55:50 +00:00
pablomartin4btc (Migrated from github.com) left a comment

I've rebuilt this PR on top of #358 using NavBar2 instead and the title of the popup is now more accurately centered.

image image

I've rebuilt this PR on top of #358 using NavBar2 instead and the title of the popup is now more accurately centered. ![image](https://git.fish.foo/attachments/476d09a7-b605-4fdb-946f-65284dd44b60) ![image](https://git.fish.foo/attachments/761a1d9f-8d35-4b67-a576-ad502d9d42d0)
hebasto commented 2023-08-31 22:43:33 +00:00 (Migrated from github.com)
Please rebase. https://discord.com/channels/903125802726596648/903126039084015638/1146922061449666602
jarolrod commented 2023-09-01 03:10:25 +00:00 (Migrated from github.com)

rebased over main

rebased over main
MarnixCroes (Migrated from github.com) approved these changes 2023-12-04 13:16:58 +00:00
MarnixCroes (Migrated from github.com) left a comment

tack 726bfa2c1e, works as expected

tack 726bfa2c1eb3ae6f1148812f350c12b8354f0f0b, works as expected
GBKS commented 2024-01-11 14:41:49 +00:00 (Migrated from github.com)

This issue has been around for a long time. What is needed to wrap it up?

This issue has been around for a long time. What is needed to wrap it up?
pablomartin4btc (Migrated from github.com) approved these changes 2024-01-13 18:38:17 +00:00
pablomartin4btc (Migrated from github.com) left a comment

re ACK 726bfa2c1e

re ACK 726bfa2c1eb3ae6f1148812f350c12b8354f0f0b
Sign in to join this conversation.
No description provided.