Skip to content

Add stage direction style import from other shows#989

Merged
Tim020 merged 3 commits into
devfrom
feature/stage-direction-style-import
May 6, 2026
Merged

Add stage direction style import from other shows#989
Tim020 merged 3 commits into
devfrom
feature/stage-direction-style-import

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented May 6, 2026

Summary

  • Adds an Import Style button on the Stage Direction Styles tab (Script Config) that opens a modal listing all stage direction styles from other shows, grouped by show with live previews
  • Each show group is a collapsible card (consistent with ConfigSettings UX pattern), expanded by default
  • Importing creates an unlinked copy in the current show — no ongoing link to the source
  • New GET /api/v1/show/script/stage_direction_styles/import endpoint; requires auth, excludes current show via a single JOIN query returning style_groups
  • 5 new backend tests; frontend lint and all 571 backend tests pass

Closes #987

Test plan

  • Start the server and load a show that has stage direction styles defined
  • Navigate to Script Config → Stage Direction Styles tab
  • Verify Import Style button is visible to script editors and hidden to non-editors
  • Click Import Style — modal opens, shows collapsible cards per show with live style previews
  • Collapse and expand a show section — chevron toggles correctly
  • Click Import on a style — it appears in the current show's style list; toast confirmation shown
  • Verify imported style is an independent copy (editing/deleting it does not affect the source show)
  • Test with no other shows having styles — empty state message is displayed
  • Run cd server && pytest test/controllers/api/show/script/test_stage_direction_styles.py -v

🤖 Generated with Claude Code

Adds a new Import Style button on the Stage Direction Styles tab that opens a modal showing all styles from other shows, grouped by show with live previews. Each group is collapsible. Importing creates an unlinked copy in the current show.

- GET /api/v1/show/script/stage_direction_styles/import — new endpoint returning style_groups (auth required, excludes current show via single JOIN query)
- GET_IMPORTABLE_STAGE_DIRECTION_STYLES Vuex action
- Import modal with collapsible b-card sections (consistent with ConfigSettings UX) and per-row import buttons with loading state
- 5 new backend tests covering auth, show guard, exclusion, inclusion, and empty shows
- docs/pages/script_config.md updated with Stage Direction Styles section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation client Pull requests changing front end code server Pull requests changing back end code medium-diff labels May 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Client Test Results

99 tests   99 ✅  0s ⏱️
 4 suites   0 💤
 1 files     0 ❌

Results for commit 4569aea.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Python Test Results

  1 files    1 suites   1m 12s ⏱️
571 tests 571 ✅ 0 💤 0 ❌
576 runs  576 ✅ 0 💤 0 ❌

Results for commit 4569aea.

♻️ This comment has been updated with latest results.

@Tim020 Tim020 enabled auto-merge (squash) May 6, 2026 19:53
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@Tim020 Tim020 merged commit cb2ba18 into dev May 6, 2026
25 checks passed
@Tim020 Tim020 deleted the feature/stage-direction-style-import branch May 6, 2026 19:57
@Tim020 Tim020 linked an issue May 6, 2026 that may be closed by this pull request
@Tim020 Tim020 mentioned this pull request May 6, 2026
5 tasks
Tim020 added a commit that referenced this pull request May 6, 2026
* Add cue type import from other shows

Mirrors the stage direction style import feature (PR #989): allows users
to copy cue type definitions (prefix, description, colour) from any other
show into the current show via a new Import Cue Type button on the Cue
Types tab.

- Backend: GET /api/v1/show/cues/types/import returns cue types from all
  other shows, grouped by show (shows with no cue types are excluded)
- Frontend: import button + collapsible modal in ConfigCues.vue, with
  per-row loading state; GET_IMPORTABLE_CUE_TYPES Vuex action in show.js
- Tests: 5 new backend tests in TestCueTypeImportController
- Docs: import section added to cue_config.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix chevron icon alignment in cue type import modal

Use flexbox (d-flex justify-content-between) to push the collapse
indicator to the right edge of the card header, matching the stage
direction styles import layout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Tim020 added a commit that referenced this pull request May 6, 2026
* Add session tag type import from other shows

Follows the same pattern as cue type (PR #991) and stage direction style
(PR #989) imports. Adds GET /api/v1/show/session/tags/import endpoint and
a corresponding import modal in SessionTagList.vue with real-time duplicate
detection via the already-loaded SESSION_TAGS Vuex state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix ruff formatting in test_tags.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests changing front end code documentation Improvements or additions to documentation medium-diff server Pull requests changing back end code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow stage direction styles to be imported from another show

1 participant