Skip to content

v9: Migrate to GNOME 45-50, ES modules, libadwaita prefs#13

Open
dudkitt wants to merge 1 commit intoxynium:mainfrom
dudkitt:gnome-49-compat
Open

v9: Migrate to GNOME 45-50, ES modules, libadwaita prefs#13
dudkitt wants to merge 1 commit intoxynium:mainfrom
dudkitt:gnome-49-compat

Conversation

@dudkitt
Copy link
Copy Markdown

@dudkitt dudkitt commented Mar 9, 2026

Summary

Complete rewrite of the WebFeed extension to support GNOME Shell 45–50 using the modern ES modules API. The legacy imports.* system is fully replaced. Preferences UI migrated from GTK3 to GTK4/libadwaita. Added 6 new translations.

Breaking changes

  • Drops support for GNOME 43–44 (incompatible extension loader)
  • prefs.ui is no longer used (preferences built programmatically with Adw widgets)

Extension (extension.js)

  • ES modules: import from gi://, resource:///, and local .js files
  • Extension base class with enable()/disable() instead of standalone functions
  • All global state (settings, feedsArray, rxAsync, secu) moved into WebFeedIndicator instance
  • log()console.log(), add_actor()add_child(), substr() → substring()
  • Util.trySpawnCommandLine()Gio.AppInfo.create_from_commandline().launch()
  • ExtensionUtils.openPrefs()Extension.openPreferences()
  • Notifications via MessageTray.Source (shows "WebFeed" instead of "System", persists in notification panel)
  • HTML entity decoder for feed titles (’, &, —, etc.)
  • Fallback to newest item date when feed-level PublishDate is missing (fixes NaN in menu)
  • Feed items sorted by publish date, newest first
  • Fixed closure bug in menu item click handlers

Preferences (prefs.js)

  • ExtensionPreferences base class with fillPreferencesWindow()
  • GTK3 TreeView/ListStore/DialogAdw PreferencesPage/PreferencesGroup/ActionRow/MessageDialog
  • Gtk.ListBox for dynamic feed list (Adw.PreferencesGroup.remove() does not work for dynamic rows)
  • Adw.MessageDialog with proper destroy() lifecycle (text saved before destroy to prevent data loss)
    activatable: false on feed rows to fix button click propagation

Metadata (metadata.json)

  • shell-version: ["45", "46", "47", "48", "49", "50"]
  • Added settings-schema field (fixes getSettings() without explicit schema ID)
  • Version bump: 8 → 9

Locales

  • Updated webfeed.pot template with all 27 translatable strings
  • Updated existing translations: fr, nl (added new prefs strings, fixed nl .mo filename)
  • Added new translations: ru, uk, pl, zh_CN, es, pt_BR

Files changed

File Change
extension.js Full rewrite
prefs.js Full rewrite
metadata.json Updated
jsxml.js Added export
rss.js var class → export class
atom.js var class → export class
locale/webfeed.pot Updated
locale/fr.po, locale/nl.po Updated
locale/ru.po New
locale/uk.po New
locale/pl.po New
locale/zh_CN.po New
locale/es.po New
locale/pt_BR.po New
All LC_MESSAGES/webfeed.mo Recompiled

Testing

Tested on GNOME Shell 49.4 (Fedora). RSS and Atom feeds load, parse, display and open in browser correctly. Preferences window opens, all settings bind properly, feed list CRUD operations work.

Tools

Developed with VS Codium + Continue extension. AI assistant: Claude (Anthropic) — code migration, libadwaita prefs rewrite, HTML decoder, translations, PR description.

Extension (extension.js):
- Rewrite to ES modules with Extension base class
- Replace imports.gi/ui with gi:// and resource:// imports
- Move all state from globals into WebFeedIndicator instance
- Replace log() with console.log(), add_actor() with add_child()
- Replace Util.trySpawnCommandLine with Gio.AppInfo.launch()
- Use MessageTray.Source for persistent GNOME notifications
- Add HTML entity decoder for feed titles (named, numeric, hex)
- Fallback to newest item date when feed-level date is missing
- Sort feed items by publish date (newest first)
- Fix closure bug in menu item click handlers

Preferences (prefs.js):
- Rewrite to ExtensionPreferences class with fillPreferencesWindow()
- Replace GTK3 TreeView/ListStore/Dialog with Adw widgets
- Use Gtk.ListBox for dynamic feed list (Adw.PreferencesGroup.remove() broken)
- Use Adw.MessageDialog for add/edit with proper destroy() lifecycle
- Set activatable: false on ActionRows to fix button click propagation

Metadata:
- shell-version: 45-50, add settings-schema field
- Version bump to 9

Locales:
- Update pot template and existing fr/nl translations
- Add ru, uk, pl, zh_CN, es, pt_BR translations
- Fix nl .mo filename (nl.mo → webfeed.mo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant