Skip to content

Status of @fluent/dom #470

@stasm

Description

@stasm

I'd like to establish what the current state of @fluent/dom is, and decide what the maintenance story for it should be.

@fluent/dom was our first implementation of platform-specific bindings. It was written first with Firefox OS in mind, and then modified to support the effort of migrating Firefox to Fluent. Today, most of the Fluent code in Firefox has been rewritten to C++ or Rust; the only part running still in JS is Localization.jsm based on @fluent/dom's Localization.js, but also heavily modified and tailored to Gecko's needs. There are plans to port it to C++ or Rust, too.

I think it's fair to say that today, the vanilla @fluent/dom isn't used in Gecko at all. The code works, but isn't actively maintained, and it doesn't have the Firefox driving its development any more. It's used in a few web projects, however. A GitHub search for package.json dependencies yielded at least the following projects:

In total, @fluent/dom currently has 241 weekly downloads, and @fluent/web has 1. I also checked the old names, fluent-dom and fluent-web respectively, which have 1 weekly download each. It's worth remembering that weekly downloads don't paint the whole picture, so I'm taking these numbers with a grain of salt.

In any case, I think we are at a risk of @fluent/dom becoming a maintenance burden. It was tailored for a use-case it doesn't support any more (Gecko), and hasn't been looked at, reviewed, or updated in a while. Fortunately, it works with the most up-to-date FluentBundle API, and it thus supports Fluent Syntax 1.0.

The main risk that I see related to the syntax is related to markup overlays. Both IOT Gateway and Talk make some use of overlays (<a> with names, and <br>). I'd like to work on the next iteration of markup overlays in the second part of the year, and depending on the amount of changes and then the extent of support in Pontoon and compare-locales, we might want to make sure @fluent/dom uses the updated overlay logic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions