Repository navigation
refactor(api): event texts next to their emitter, no central text table - #177
Merged
Merged
Conversation
The { en, fr } titles and bodies were keys of utils/event-texts.ts, filled by an
interpolation helper and checked by a unit test. Each emitter now holds its own texts:
- sendPortalEvent, sendPageEvent, sendReuseEvent and sendGroupEvent hold the titles of
their actions, the bodies are written where the event is sent
- changesBody() is the one body shared by the portal router and service
- switchStandardPages returns the titles of the replaced pages, the publish event writes
its body from them
- sendGroupEvent no longer takes a body, none of its callers gave one
- texts and topic keys unchanged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
{ en, fr }event texts move from the centralapi/src/utils/event-texts.ts(keys, an interpolation helper and a parity unit test) to their emitters.sendPortalEvent,sendPageEvent,sendReuseEventandsendGroupEventhold the titles of their actions; the bodies are written where the event is sent.changesBody()is the one body shared by the portal router and service.switchStandardPagesreturns the titles of the replaced pages, the publish event builds its body from them.sendGroupEventno longer takes a body, no caller gave one.Part of the platform-wide fr/en pass of the events (catalogs data-fair/catalogs#46, portals, processings, data-fair, simple-directory, customers, agents), following the standard of the
data-fair-serviceskill (references/events.mdin data-fair/lib). Topic keys are unchanged, so users' subscriptions keep working. No release order: the events service already accepts{ en, fr }titles, and the inactive queue without events url is in @data-fair/lib-node since 2.17.0.