Skip to content

CONV-086: Create target format card view model#93

Merged
menvil merged 1 commit into
developfrom
feature/CONV-086-create-target-format-card-view-model
May 31, 2026
Merged

CONV-086: Create target format card view model#93
menvil merged 1 commit into
developfrom
feature/CONV-086-create-target-format-card-view-model

Conversation

@menvil

@menvil menvil commented May 31, 2026

Copy link
Copy Markdown
Owner

CONV-086 — Create Target Format Card View Model

Adds app/ViewModels/TargetFormatCardViewModel.php so Blade renders cards from typed properties instead of inline logic.

Changes

  • TargetFormatCardViewModel (readonly) with targetFormat, label, description, recommended.
  • fromConverter(Converter) and fromTarget(ConverterTarget) factories.

Tests

  • Unit test builds a card from ConverterRegistry::find('png','jpg') metadata.
  • Unit test builds a card from a ConverterTarget DTO.

composer test (183), composer lint, npm run build all pass.

🤖 Generated with Claude Code


Summary by cubic

Implements CONV-086 by adding a view model for target format cards so Blade renders from typed data instead of inline logic. This simplifies the template and standardizes card fields.

  • New Features
    • Readonly view model with targetFormat, label, description, recommended.
    • Factory methods: fromConverter(Converter) and fromTarget(ConverterTarget).
    • Unit tests validate both factories with registry and DTO inputs.

Written for commit 29bf487. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5c76abd6-34fe-4544-9829-c39ea54cb5ed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-086-create-target-format-card-view-model

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@menvil menvil merged commit c4ea40e into develop May 31, 2026
1 of 2 checks passed
@menvil menvil deleted the feature/CONV-086-create-target-format-card-view-model branch May 31, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant