Review of "Picture of the Day" version 0.2 (2)

Details Page Preview

Get a picture of the day as desktop background or wallpaper. Supports the following sources: NASA Astronomy Picture of the Day (APOD), NASA Earth Observatory Image of the Day, Bing, Wikimedia Featured Image, and Simon Stålenhag artworks.

Extension Homepage
https://github.com/swsnr/gnome-shell-extension-picture-of-the-day

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Version Status
47.5 (36) Active
47.4 (35) Active
47.3 (34) Active
47.2 (33) Active
47.1 (32) Active
47.0 (31) Active
46.7 (30) Active
46.6 (29) Active
46.5 (28) Active
46.4 (27) Active
46.3 (26) Inactive
45.15 (25) Active
46.2 (24) Active
45.14 (23) Inactive
46.1 (22) Inactive
46.0 (21) Inactive
45.13 (20) Inactive
45.12 (19) Inactive
45.11 (18) Inactive
45.10 (17) Inactive
45.9 (16) Inactive
45.8 (15) Rejected
45.7 (14) Rejected
45.6 (13) Inactive
45.5 (12) Inactive
45.4 (11) Inactive
45.3 (10) Inactive
45.2 (9) Inactive
45.1 (8) Inactive
45.0 (7) Rejected
0.5 (6) Inactive
0.3 (5) Inactive
0.3 (4) Rejected
0.2.1 (3) Inactive
0.2 (2) Rejected
0.1 (1) Rejected

Previous Reviews on this Version

JustPerfection rejected
1. Please mention in the description that this extension is using nasa.gov. 2. Please don't use `imports` for GNOME Shell 45 extensions: - line 27 lib/ui/indicator.js - line 32 lib/services/refresh-error-handler.js You can use template literals or `replace()`: https://gjs-docs.gnome.org/javascript/global_objects/string/replace
Sebastian Wiesner posted a review
1. The description said "various sources" for a reason: I'm planning to add more services beyond nasa.gov, see https://github.com/swsnr/gnome-shell-extension-picture-of-the-day/issues/2. Should I mention every single one in the description? It's going to be a long text then… 2. I use vprintf for translatable strings. How am I supposed to do that with template strings or `replace`?
Sebastian Wiesner posted a review
Ad 1) Never mind, I wasn't aware that description can contain longer text (I thought it should be a one line sentence, similar to how this field works in other package managers). I'll update the description.
Sebastian Wiesner posted a review
Ad 2) I'd like to point out that Format is not explicitly listed as deprecated in the review guidelines (see https://gjs.guide/extensions/review-guidelines/review-guidelines.html#do-not-use-deprecated-modules), so it should be okay, shouldn't it? If it's not I'd appreciate if those guidelines could be updated (I checked them before using that import after all), and if you could name an alternative for use with translatable strings…
JustPerfection posted a review
1. Yes, that should be done in the description for all of the sources. Btw, adding those to the description can lead to more downloads since users may search those service names on ego search box. 2. You have the option to do a simple string or the regex match (/%s/g) for example. ```js _("Copyright %s").replace("%s", image.copyright.trim()) ``` about marking it as *deprecated*: https://gjs-docs.gnome.org/gjs/format.md#format-vprintf
Sebastian Wiesner posted a review
2. I know that it's marked as obsolete in the GJS docs, but the box at the beginning of https://gjs.guide/extensions/development/translations.html#marking-strings-for-translation suggests that it's still okay to use for translations, ie in combination w/ gettext. See also the discussion starting at https://app.element.io/#/room/#extensions:gnome.org/$joCNLza1gw_S74vzGxxG2O6m950IVcO8BT8pO8JktoQ I'd definitely not like to use simple string replacement, because it doesn't handle escaping (e.g. have a literal %s appear in the translation text) and doesn't provide any of the other more sophisticated formatting options (e.g. "%.2d" or similar which I assume vprintf supports). In general there seems to be a lot of contradicting and incomplete documentation around dynamic string formatting for translatable strings…
Sebastian Wiesner posted a review
PS: 1. Thanks, but I honestly don't care for the number of downloads at all :) I'm writing this extension for my own use, not to win some kind of popularity contest. I'm uploading to EGO out of courtesy towards the community, not because I need it (personally, I package all my extensions and install them system-wide).
JustPerfection posted a review
Well, it's good for users too. for example, they can search for `nasa` or `unsplash` and they can find your extension. For format, you can use `String.prototype.format()`.
Sebastian Wiesner posted a review
As said on matrix I'd like to avoid String.format, because I'm concerned about prototype pollution by other extensions. To be honest, I don't understand why it's fine to use a function which Gnome shell monkey-patches into String.prototype, but bad to import the corresponding function directly? If it's necessary to pass review then for Christ's sake I'll use .format() but I'd still appreciate if the rationale behind this requirement was explained and documented in the review guidelines. Right not this feels absolutely arbitrary, and it doesn't help that Format is deprecated without any actual alternative wrt translatable strings.
JustPerfection posted a review
I'll reject monkey patching `String.prototype.format` in the future reviews. So, don't worry about that. Personally, I spent so much time to clean up deprecated modules like `Lang` and `Mainloop` from +3.34 extensions. That's why we don't want 45 extensions still use old `imports`.