librewolf/settings
10
29
Fork
You've already forked settings
31

Collapse AI part of link previews by default #98

Merged
maltejur merged 1 commit from linkpreview into master 2025年12月18日 20:33:33 +01:00

With browser.ml.chat.enabled currently disabled, this feature is mostly defunct right now anyway. Discussion is still welcome.

We may also want to follow this up with a UI patch to hide or change (some of) the checkboxes in the settings for this feature. Even if they are all turned on, it still doesn't work correctly due to browser.ml.chat.enabled.

Closes librewolf/issues#2747

With `browser.ml.chat.enabled` currently disabled, this feature is mostly defunct right now anyway. Discussion is still welcome. We may also want to follow this up with a UI patch to hide or change (some of) the checkboxes in the settings for this feature. Even if they are all turned on, it still doesn't work correctly due to `browser.ml.chat.enabled`. Closes librewolf/issues#2747

In the replies to the post about this feature on the LibreWolf Mastodon there have been multiple users still wanting the preview without the AI part.

In the replies to the post about this feature on the LibreWolf Mastodon there have been multiple users still wanting the preview without the AI part.
Author
Owner
Copy link

My opinion on this isn't strong. This is a feature that doesn't really jump into people's faces; you have to actively "use" it by long-pressing the mouse button. So we can also go with the option of just disabling the AI part for now.

We can do that by enabling browser.ml.linkPreview.collapsed by default (to not show the prompt asking whether "key points" should be enabled). But we then likely also want a UI patch to remove the collapsed "key points":

image

My opinion on this isn't strong. This is a feature that doesn't really jump into people's faces; you have to actively "use" it by long-pressing the mouse button. So we can also go with the option of just disabling the AI part for now. We can do that by enabling `browser.ml.linkPreview.collapsed` by default (to not show the prompt asking whether "key points" should be enabled). But we then likely also want a UI patch to remove the collapsed "key points": ![image](/attachments/eeea9aa5-1a3d-4e10-8d14-3d240f0ac2a0)
maltejur changed title from (削除) Disable AI link previews by default (削除ここまで) to Collapse AI part of link previews by default 2025年12月17日 16:18:07 +01:00

@maltejur You can remove browser.ml.linkPreview.collapsed and instead do lockPref("browser.ml.linkPreview.optin", false); this completely removes the key points part without needing any patches. I already tested this a few days ago 😄

@maltejur You can remove `browser.ml.linkPreview.collapsed` and instead do `lockPref("browser.ml.linkPreview.optin", false);` this completely removes the key points part without needing any patches. I already tested this a few days ago 😄

If you don't want to lock browser.ml.linkPreview.optin, you could also just use:

defaultPref("browser.ml.linkPreview.supportedLocales", "null");

This also seems to hide the UI for the "key points" at about:preferences#general (But, my understanding is that you guys feel strongly about this type of functionality, so you may still prefer to lock browser.ml.linkPreview.optin anyways. Just throwing this out that as an option though).

(I assume any value works here, as long as it's not a real locale - null is just what I used/tested)

(For Phoenix, to accomplish this, I'm setting browser.ml.linkPreview.noKeyPointsRegions to xx instead - This works because Phoenix uses a dummy region (as I found it to be beneficial for a few other reasons), but that wouldn't work here for LibreWolf, since you don't use this dummy region)

If you don't want to lock `browser.ml.linkPreview.optin`, you could also just use: ```sh defaultPref("browser.ml.linkPreview.supportedLocales", "null"); ``` This also seems to hide the UI for the "key points" at `about:preferences#general` *(But, my understanding is that you guys feel strongly about this type of functionality, so you may still prefer to lock `browser.ml.linkPreview.optin` anyways. Just throwing this out that as an option though)*. *(I assume any value works here, as long as it's not a real locale - `null` is just what I used/tested)* *(For Phoenix, to accomplish this, I'm setting `browser.ml.linkPreview.noKeyPointsRegions` to `xx` instead - This works because Phoenix uses a dummy region (as I found it to be beneficial for a few other reasons), but that wouldn't work here for LibreWolf, since you don't use this dummy region)*

@celenity I personally have no strong feelings about this, but lots of people who use LibreWolf do.
I just saw in the code that locking it also removes the UI-related parts too, and thought since ML is heavily opposed, it is fine to lock it since it doesn't work anyway. Your approach is better if we should avoid setting locked prefs if possible.

@celenity I personally have no strong feelings about this, but [lots of people who use LibreWolf do.](https://chaos.social/@librewolf/115716906957137196) I just saw in the code that locking it also removes the UI-related parts too, and thought since ML is heavily opposed, it is fine to lock it since it doesn't work anyway. Your approach is better if we should avoid setting locked prefs if possible.
Author
Owner
Copy link

@any1here wrote in #98 (comment):

Your approach is better if we should avoid setting locked prefs if possible.

I indeed also think this would be preferable, just to make it easier for people to enable this again if they actually want to. I updated the PR to use the browser.ml.linkPreview.supportedLocales approach, and think we should merge soon for 146.0.1 if there are no objections.

@any1here wrote in https://codeberg.org/librewolf/settings/pulls/98#issuecomment-9033876: > Your approach is better if we should avoid setting locked prefs if possible. I indeed also think this would be preferable, just to make it easier for people to enable this again if they actually want to. I updated the PR to use the browser.ml.linkPreview.supportedLocales approach, and think we should merge soon for 146.0.1 if there are no objections.
maltejur deleted branch linkpreview 2025年12月18日 20:33:35 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
librewolf/settings!98
Reference in a new issue
librewolf/settings
No description provided.
Delete branch "linkpreview"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?