Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/backend/services/story_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ export class StoryService {
target.coverImage = source.coverImage;
}

if (locale !== sourceLocale && !target.tags) {
target.tags = source.tags;
}

const resourceService = new ResourceService();
const availableResources = await resourceService.listForLocale(locale);
const targetFields = this.localisationFields(target);
Expand Down Expand Up @@ -247,10 +243,6 @@ export class StoryService {
target.coverImage = source.coverImage;
}

if (locale !== sourceLocale && !target.tags) {
target.tags = source.tags;
}

const targetFields = this.localisationFields(target);

return {
Expand Down
4 changes: 2 additions & 2 deletions src/backend/stubs/tests/unit/story_service.stub
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test.group('Story service', (group) => {
assert.isUndefined(props);
});

test('editProps prefills tags from source when translation tags are empty', async ({
test('editProps does not prefill tags from source when translation tags are empty', async ({
assert,
}) => {
const story = await StoryFactory.with('localisations').create();
Expand All @@ -188,7 +188,7 @@ test.group('Story service', (group) => {
);

assert.isDefined(props);
assert.equal(props!.model.tags, 'gospel,john');
assert.equal(props!.model.tags, '');
assert.equal(props!.source!.tags, 'gospel,john');
});

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/stories/components/story-edit-details.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const translationLocaleModel = {
title: '',
coverImage: '',
description: '',
tags: 'gospel,john',
tags: '',
};

const translationWithoutTagsModel = {
Expand Down Expand Up @@ -167,7 +167,7 @@ source locale only) classification fields, chapter template, and visibility.
## Variants

- **Source locale** — single-column editable fields including chapter count and visibility
- **Translation locale** — side-by-side editable and read-only columns; tags prefilled from source when empty
- **Translation locale** — side-by-side editable and read-only columns; source tags shown in read-only column only
- **Translation without tags** — translation mode where the source locale has no tags; both editable and read-only tag fields are empty
- **Single template** — shows read-only Chapter Template when only one template is configured
- **Multiple templates on edit** — read-only Chapter Template even when multiple templates are configured
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/stories/story-edit.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const translationModel: StoryEditProps['model'] = {
title: '',
coverImage: '',
description: '',
tags: 'gospel,john,new-testament',
tags: '',
sections: [
{
id: 'section-1',
Expand All @@ -329,7 +329,7 @@ const arabicTranslationModel: StoryEditProps['model'] = {
title: '',
coverImage: '',
description: '',
tags: 'gospel,john,new-testament',
tags: '',
sections: [
{
id: 'section-1',
Expand Down Expand Up @@ -410,7 +410,7 @@ Saving posts attached resource IDs to the story localisation.
- **Delete and save draft** — empty story, unpublished; shows Delete (`red`) and Save Changes (`secondary`)
- **Without sections** — `storiesHasSections: true`; English source locale with no sections; Sections tab shows empty state message
- **Validation errors on tabs** — `storiesHasSections: true`; failed publish validation; Details and Sections tabs show error indicators and inline field messages
- **Translation locale** — Spanish edit with English source column; tags prefilled from source on Details tab
- **Translation locale** — Spanish edit with English source column; source tags shown in read-only column only on Details tab
- **Arabic translation locale** — `storiesHasSections: true`; Arabic edit on the left, English source on the right; RTL text in the translation column; side-by-side fields on Details and Sections tabs
- **Translation without sections** — `storiesHasSections: true`; Spanish edit with English source column; source localisation has no sections, so the Sections tab is empty

Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ export interface StoryEditProps {
title: string;
coverImage: string;
description: string;
tags: string | null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Aha! the smoking gun.

sections: StorySection[];
resources: ResourceItem[];
};
Expand Down
Loading