Skip to content

Template settings ILLDEV-457 - #27

Merged
skomorokh merged 3 commits into
mainfrom
templates-illdev-457
Aug 4, 2026
Merged

Template settings ILLDEV-457#27
skomorokh merged 3 commits into
mainfrom
templates-illdev-457

Conversation

@skomorokh

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 4, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Message templates settings area (CRUD for broker templates, including HTML vs plain-text handling) and updates Scheduled Actions → Email pull slips to reference a stored message template via templateLabel instead of embedding subject/body directly.

Changes:

  • Added templates settings UI: list, create, edit, view, delete, plus mapping/helpers and test coverage.
  • Updated scheduled-action “batch action presets” wording and refactored the preset picker naming/translation keys.
  • Updated Email Pullslips scheduled-action params to select a message template label from broker templates.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ui-rs/translations/ui-rs/en.json Adds/renames i18n keys for templates UI and scheduled-action preset/template-label UI.
ui-rs/src/test/okapiKyMock.js Adds a delete mock to support new delete flows in tests.
ui-rs/src/test/editorMock.js Introduces an Editor stub so jsdom tests can mount HTML template forms.
ui-rs/src/settings/templates/ViewTemplate.js Adds a template “view” pane with delete confirmation and HTML/plain rendering paths.
ui-rs/src/settings/templates/ViewTemplate.css Styles plain-text body rendering to preserve line breaks while wrapping.
ui-rs/src/settings/templates/Templates.test.js Adds end-to-end tests for listing/creating/editing/deleting templates.
ui-rs/src/settings/templates/Templates.js Adds templates routing and the templates list UI.
ui-rs/src/settings/templates/TemplateForm.test.js Adds focused tests for the template form UX (HTML mode, source toggle, labels, presets).
ui-rs/src/settings/templates/TemplateForm.js Implements the template form, including HTML escaping, source mode, and label suggestions.
ui-rs/src/settings/templates/TemplateForm.css Adds help-text styling used by the template form.
ui-rs/src/settings/templates/mapping.test.js Adds unit tests for form/API mapping helpers and template-label option building.
ui-rs/src/settings/templates/mapping.js Adds mapping helpers for create/update bodies and template label option generation.
ui-rs/src/settings/templates/index.js Exports the Templates settings module entrypoint.
ui-rs/src/settings/templates/EditTemplate.js Adds edit screen wiring (fetch → form → PUT).
ui-rs/src/settings/templates/CreateTemplate.js Adds create screen wiring (form → POST).
ui-rs/src/settings/scheduledActions/ScheduledActionForm.test.js Updates scheduled-action tests for “preset” naming and templateLabel-based email params.
ui-rs/src/settings/scheduledActions/ScheduledActionForm.js Renames “template picker” to “preset picker” and updates translation keys.
ui-rs/src/settings/scheduledActions/actions/EmailPullslipsParams.js Replaces inline email subject/body/isHtml params with a required templateLabel selector sourced from broker templates.
ui-rs/src/settings/index.js Adds the new “Message templates” route into the Settings sections list.
Suppressed comments (1)

ui-rs/src/settings/templates/mapping.js:43

  • buildUpdateTemplateBody has the same title-trimming issue as create: titles with leading/trailing whitespace pass validation but will be persisted with the whitespace intact.
export function buildUpdateTemplateBody(values = {}) {
  const updated = {
    title: values.title,
    body: values.body,
    contentType: values.contentType,
    labels: cleanLabels(values.labels),
    subject: (values.subject ?? '').trim(),
  };

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-rs/src/settings/templates/mapping.js
Comment thread ui-rs/src/settings/scheduledActions/actions/EmailPullslipsParams.js Outdated
Comment thread ui-rs/src/settings/templates/ViewTemplate.js
skomorokh and others added 2 commits August 4, 2026 17:20
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@skomorokh
skomorokh merged commit d9b33e9 into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants