-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
firefox: fix search engine icons #6505
base: master
Are you sure you want to change the base?
firefox: fix search engine icons #6505
Conversation
dc489ed
to
de88c14
Compare
}]; | ||
iconUpdateURL = "https://wiki.nixos.org/favicon.png"; | ||
iconMapObj."16" = "https://wiki.nixos.org/favicon.png"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was inherited from the previous code, but while it's being updated anyways:
this url is actually a 404, it's favicon.ico
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yep thanks for catching that!
Hiding existing engines doesn't seem to be working here I have "Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"eBay".metaData.hidden = true;
"Wikipedia (en)".metaData.hidden = true; in my config, and the HM generated file looks like {
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "Bing"
}, (using once i open firefox, it gets converted into {
"id": "bing",
"_name": "Bing",
"_isAppProvided": true,
"_metaData": {}
}, ... maybe firefox is expecting adding new search engines with favicons works fine, both by url and using iconMapObj."32" = pkgs.fetchurl {
url = "https://github.githubassets.com/favicons/favicon-dark.png";
hash = "sha256-vwpwhqqIKCid8OSMGppX4U/ltDf7qEx+/00wXR0HT/E=";
}; |
else | ||
let size = toString (builtins.fromJSON name).width; | ||
in warn | ||
"JSON object names for iconMapObj are deprecated, use ${size} instead of ${name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"JSON object names for iconMapObj are deprecated, use ${size} instead of ${name}" | |
"JSON object names for `iconMapObj` are deprecated, use `${size}` instead of `${name}`" |
"16" = warn "iconURL is deprecated, use icon = ${ | ||
strings.escapeNixString engine.iconURL | ||
} instead" engine.iconURL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"16" = warn "iconURL is deprecated, use icon = ${ | |
strings.escapeNixString engine.iconURL | |
} instead" engine.iconURL; | |
"16" = warn "`iconURL` is deprecated, use `icon = ${ | |
strings.escapeNixString engine.iconURL | |
}` instead" engine.iconURL; |
"16" = warn "iconUpdateURL is deprecated, use icon = ${ | ||
strings.escapeNixString engine.iconUpdateURL | ||
} instead" engine.iconUpdateURL; | ||
} // (engine.iconMapObj or { }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"16" = warn "iconUpdateURL is deprecated, use icon = ${ | |
strings.escapeNixString engine.iconUpdateURL | |
} instead" engine.iconUpdateURL; | |
} // (engine.iconMapObj or { }); | |
"16" = warn "`iconUpdateURL` is deprecated, use `icon = ${ | |
strings.escapeNixString engine.iconUpdateURL | |
}` instead" engine.iconUpdateURL; | |
} // (engine.iconMapObj or { }); |
}]; | ||
iconUpdateURL = "https://wiki.nixos.org/favicon.png"; | ||
iconMapObj."16" = "https://wiki.nixos.org/favicon.png"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iconMapObj."16" = "https://wiki.nixos.org/favicon.png"; | |
iconMapObj."16" = "https://wiki.nixos.org/favicon.ico"; |
Is this a regression from this change or just another thing that needs to be migrated/fixed ? Didn't see where this would have affected that. Unless, it's just the version that we pass. Looking at the other migrations on searchfox, I didn't see any obvious migrations either that would help. EDIT: Also looks like changing the default search engine regressed, so must just be that version string being passed affecting this stuff. search = {
default = "DuckDuckGo";
privateDefault = "DuckDuckGo";
} Doesn't work with this change. |
Thank you both for catching these regressions! I assumed that the icon changes were the only breaking changes based of migrations that exist in firefox, I'll look into them. EDIT: It looks like the associated migrations were embedded directly into the implementation rather than in I'll look into porting this migration for our module. |
Description
Closes #6450
See also the reference I used to implement the migrations for our Nix config: https://searchfox.org/mozilla-central/rev/e3f42ec9320748b2aab3d474d1e47075def9000c/toolkit/components/search/SearchSettings.sys.mjs#760-876.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
or
nix build --reference-lock-file flake.lock ./tests#test-all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC
@brckd @rycee