You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #2863 is done, the schema translation being performed in coalesceBadge() is no longer useful. If we bring the makeBadge() schema into full alignment with serviceData, we won't need to translate schema in coalesceBadge().
The function would still exist, but it would only coalesce, not also translate schema.
This is dependent on resolving named icons within makeBadge() and making simple-icons an optional dependency.
…`makeBadge()`
Part of #3370, and also helps with #4950.
This is cherry-picked from #4980 but stops short of the mor substantive changes of that PR.
Also rewrites most of the tests of `coalesceBadge()` to use `.includes()`, providing IMO a slight improvement in readability.
…`makeBadge()` (#5719)
There is an internal `makeBadge()` function which is called from a few places in the server and from the public `makeBadge()` function which is a light wrapper. (Eventually we want to dogfood the public API: that's the work of #4950, and this helps with it by aligning the interfaces.)
Related to that is #3370, which is about aligning the `serviceData` schema (i.e. the result of `handle()`) with the public `makeBadge()` function.
A legacy quirk of the _private_ `makeBadge()` function is accepting a `text: ['label', 'message']` array instead of separate `{ label, message }` props like the rest of the codebase. `coalesceBadge()` has to translate from `{ label, message }` to `text: ['label', message']`. This removes that bit of indirection.
It also rewrites most of the tests of `coalesceBadge()` to use `.includes()`, providing IMO a slight improvement in readability.
Since #2863 is done, the schema translation being performed in
coalesceBadge()
is no longer useful. If we bring themakeBadge()
schema into full alignment withserviceData
, we won't need to translate schema incoalesceBadge()
.The function would still exist, but it would only coalesce, not also translate schema.
This is dependent on resolving named icons within
makeBadge()
and making simple-icons an optional dependency.This work is related to #3369, though separable.
The text was updated successfully, but these errors were encountered: