kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

Add option to turn off external link warning in associated dialogue box like Kiwix Android

Open Jaifroid opened this issue 2 years ago • 29 comments

[Originally posted in kiwix/kiwix-js-windows/issues/295, but best to work on here, upstream] Kiwix Android has a little link that allows a user to turn off the dialogue box that warns about external link opening (see screenshot below). We could add something similar to KJS and KJSW. It would be a link that takes the user to the option in Configuration and highlights it (thus educating the user), as we do with with the Active Content Warning.

image

Jaifroid avatar Sep 29 '22 19:09 Jaifroid

I am a beginner and i can try this

dalalvarun avatar Oct 07 '22 13:10 dalalvarun

@dalalvarun Thank you for the offer. Please check https://github.com/kiwix/kiwix-js/blob/master/CONTRIBUTING.md and see if you are comfortable that you can do those things, and also that you have an idea of how you would tackle this PR. Then let us know if you want to be assigned this PR.

Jaifroid avatar Oct 07 '22 13:10 Jaifroid

Yes i think i can do it over a period of few days. Please assign it to me

dalalvarun avatar Oct 07 '22 17:10 dalalvarun

Hi @Jaifroid, is it still active?

ankur12-1610 avatar Feb 24 '23 18:02 ankur12-1610

Hello @ankur12-1610, yes this issue is still open. Do you want to tackle it?

Jaifroid avatar Feb 25 '23 09:02 Jaifroid

Yeah, would love to!

ankur12-1610 avatar Feb 25 '23 10:02 ankur12-1610

Thanks, @ankur12-1610 I've assigned you!

Jaifroid avatar Feb 25 '23 10:02 Jaifroid

Hey I scavenged the codebase and found the related function here can you please verify if this is the correct place to add the Do not ask anymore option ?

ankur12-1610 avatar Mar 07 '23 21:03 ankur12-1610

Hey , This issue is solved or not

Rbcoder1 avatar Apr 04 '23 05:04 Rbcoder1

Can I Try To Solved It

Rbcoder1 avatar Apr 04 '23 05:04 Rbcoder1

Well, it is assigned to @ankur12-1610. @ankur12-1610, do you still want to work on it?

Jaifroid avatar Apr 04 '23 16:04 Jaifroid

Hey, @Jaifroid. Is anyone already working on this issue? If not, let me know if I can take this up. Thanks

gaurava05 avatar Jul 19 '23 11:07 gaurava05

@gaurav7019 With pleasure! Nice to see you back here!

Jaifroid avatar Jul 19 '23 11:07 Jaifroid

@gaurav7019 There are a few changes in how we're developing this app now. Please look again at CONTRIBUTING, where I explain most of the changes. Basically, the app will need to be built to the dist folder before final testing, and it's also best if you do an npm install in the root directory. I'm happy to clear up any doubts.

Jaifroid avatar Jul 19 '23 11:07 Jaifroid

Thanks, @Jaifroid. Nice to be back here :) Sure, I will have a look and reach out.

gaurava05 avatar Jul 19 '23 11:07 gaurava05

Hey, @Jaifroid. Can you guide me on how can I repro the active content warning dialougue box that has the option to disable it (for reference)?

gaurava05 avatar Jul 20 '23 14:07 gaurava05

You can trigger active content warning by switching to JQuery mode and loading a dynamic ZIM like Gutenberg. Of course that's not the same dialogue box as the external link warning box, but the logic for turning it off might well be similar.

Jaifroid avatar Jul 20 '23 16:07 Jaifroid

Checked out Gutenberg, but the file is too large (over 70 GB). Can you point me to a smaller ZIM file with some active content in it?

gaurava05 avatar Jul 23 '23 08:07 gaurava05

There are lots of languages that have much smaller Gutenberg archives, e.g. https://library.kiwix.org/content/gutenberg_es_all_2023-05/.

Jaifroid avatar Jul 23 '23 09:07 Jaifroid

But I wonder why you're going down this path, when what's really needed is for you to modify the code I believe you yourself wrote in uiUtil.systemAlert() to include a tick box as shown in mockup below. Obviously the tickbox would only be shown when an extra parameter is passed (e.g. a Boolean doNotShowOption).

image

Jaifroid avatar Jul 23 '23 09:07 Jaifroid

Or maybe call it displayHideOption, as it's less confusing!

Jaifroid avatar Jul 23 '23 09:07 Jaifroid

I wanted to see how the link takes the user to a config option and highlights it, as you mentioned in the issue description. NVM, here, I'll add this checkbox. But wasn't the original req was to keep the checkbox under the configure tab like all the other settings?

gaurava05 avatar Jul 23 '23 18:07 gaurava05

I wanted to see how the link takes the user to a config option and highlights it, as you mentioned in the issue description. NVM, here, I'll add this checkbox. But wasn't the original req was to keep the checkbox under the configure tab like all the other settings?

It could be done as a link that takes you to the check box in configuration, or there could also be a quick checkbox in the dialogue. Either way we'll need an option in config. Whatever you think is best.

Jaifroid avatar Jul 24 '23 04:07 Jaifroid

is this issue still open? if yes i would like to work on it

Krriishhhhhh avatar Nov 08 '23 19:11 Krriishhhhhh

@Krriishhhhhh Thanks for your interest. Please read CONTRIBUTING carefully all the way through, to learn how to set up your development environment for this Repo, and to have an idea of how the code works. If you're confident you have a solution to this issue after you've done the preparation, please explain your proposed solution here. Then I'll be able to assign you.

Jaifroid avatar Nov 09 '23 21:11 Jaifroid

I would like to work on this issue. I am very confident that I can work on this issue. I have already implemented part of the functionality i.e a checkbox in configuration page to achieve the desired outcome in my local setup. I am confident I can implement the rest of the functionality too. Screenshot from 2023-11-24 00-19-51

prateekgarg08 avatar Nov 23 '23 18:11 prateekgarg08

@prateekgarg08 Thanks. I'll assign you, but please make sure to familiarize yourself with the information in CONTRIBUTING, which covers a number of gotchas with the code in this Repo.

Jaifroid avatar Nov 23 '23 20:11 Jaifroid

Hey @Jaifroid I am Navneet, I have setup this project on my local by going through CONTRIBUTING.MD file I am well aware of the JavaScript let me know if anyone working on the issue if not please assign this task to me I will surely try to add an option to hide external link warning issue

2001Navneet avatar Jan 19 '24 06:01 2001Navneet

Hi @Jaifroid, would it be possible for me to work on this issue, since there has been no activity on it for a while?

dan-niles avatar Mar 12 '24 10:03 dan-niles