Skip to content
Snippets Groups Projects
  • Konrad Mohrfeldt's avatar
    e10e74db
    refactor/fix: fetch rrules from steering and derive description from rulesets · e10e74db
    Konrad Mohrfeldt authored
    Up until now the dashboard used a hardcoded list of rrules that matched
    a long-gone fixture set of rrules in steering. Additionally, rrules were
    translated in the dashboard using the the ID of the rrules in steering.
    This means that any change to the fixture set, removing an rrule or not
    importing the fixture set at all would mix up the translations and
    therefore the actual schedules that people would create.
    
    A few months ago the rrules were reworked and an API endpoint was
    introduced that exposes the rrules defined in steering. No appropriate
    change was made in the dashboard and so the rrule definitions got
    out-of-sync.
    
    This change implements a rrule store that fetches data from the API.
    Additionally we’ve also implemented a custom rrule to natural language
    mechanism [1]. This is because the scope of the rulesets we use in the
    AURA radio context is well-known and not to complex and because rrule.js
    built-in `toText` function, which might have been an option, is limited:
    
    * bysetpos seems to be entirely unsupported
    * internationalization will produce gramatically questionable
      output for languages like German, because the translation
      interface is somewhat lacking.
    
    [1] #226 (comment 13669)
    e10e74db
    History
    refactor/fix: fetch rrules from steering and derive description from rulesets
    Konrad Mohrfeldt authored
    Up until now the dashboard used a hardcoded list of rrules that matched
    a long-gone fixture set of rrules in steering. Additionally, rrules were
    translated in the dashboard using the the ID of the rrules in steering.
    This means that any change to the fixture set, removing an rrule or not
    importing the fixture set at all would mix up the translations and
    therefore the actual schedules that people would create.
    
    A few months ago the rrules were reworked and an API endpoint was
    introduced that exposes the rrules defined in steering. No appropriate
    change was made in the dashboard and so the rrule definitions got
    out-of-sync.
    
    This change implements a rrule store that fetches data from the API.
    Additionally we’ve also implemented a custom rrule to natural language
    mechanism [1]. This is because the scope of the rulesets we use in the
    AURA radio context is well-known and not to complex and because rrule.js
    built-in `toText` function, which might have been an option, is limited:
    
    * bysetpos seems to be entirely unsupported
    * internationalization will produce gramatically questionable
      output for languages like German, because the translation
      interface is somewhat lacking.
    
    [1] #226 (comment 13669)