Skip to content

[WebImport] Refactor icon provider selection and update descriptions#967

Merged
egorikftp merged 1 commit into
mainfrom
task/update-web-import-selector-screen
Apr 29, 2026
Merged

[WebImport] Refactor icon provider selection and update descriptions#967
egorikftp merged 1 commit into
mainfrom
task/update-web-import-selector-screen

Conversation

@egorikftp

@egorikftp egorikftp commented Apr 29, 2026

Copy link
Copy Markdown
Member
Screenshot 2026-04-29 at 16 15 21

📝 Changelog

If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs:

@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

Walkthrough

The web import icon provider selection screen was refactored from hardcoded InfoCard instances to a data-driven approach. The IconProviders enum was enhanced to carry an ImageVector icon and string resource keys for title and description. The UI now dynamically renders cards by looping over IconProviders.entries and resolving display strings via stringResource. The screen preview was updated to use ProjectPreviewTheme and TiamatPreview. Related display text was adjusted, renaming "Web service" to "icon provider" and updating the Google Fonts reference to "Google Material Symbols".

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description template requires changelog updates for user-facing changes, but all checkbox items remain unchecked despite the PR introducing UI changes to the WebImport selector screen. Check the IntelliJ Plugin changelog checkbox and update tools/idea-plugin/CHANGELOG.md with the user-facing UI changes to the web import selector screen.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main refactoring: converting hardcoded InfoCard instances to data-driven rendering and updating icon provider descriptions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/update-web-import-selector-screen

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/WebImportSelectorScreen.kt (1)

59-68: Consider co-locating navigation destination in IconProviders.

IconProviders already owns icon/title/description metadata; adding destination there would remove the separate when mapping and reduce future update friction.

Also applies to: 108-153

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/WebImportSelectorScreen.kt`
around lines 59 - 68, The current when-mapping in WebImportSelectorScreen.kt
(the val screen = when(it) { ... }) should be removed by co-locating the
navigation destination on the IconProviders type: add a unique destination
property (e.g., val destination or navDestination) to the IconProviders
enum/class alongside its existing icon/title/description metadata, implement
each provider's destination to return the corresponding screen object
(MaterialSymbolsImportScreen, LucideImportScreen, etc.), and then change the
usage in WebImportSelectorScreen (and the other occurrences around lines
108-153) to read provider.destination instead of the explicit when block so
future providers only need to update IconProviders.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tools/idea-plugin/src/main/resources/messages/Valkyrie.properties`:
- Around line 120-122: Add an "Unreleased" changelog entry in
tools/idea-plugin/CHANGELOG.md documenting the user-facing UI copy change for
the IntelliJ plugin: note that the properties web.import.selector.title and
web.import.selector.google.title (and optionally
web.import.selector.google.description) were updated to change the icon provider
language; include a one-line concise entry under an Unreleased heading (date
optional) that clearly describes the visible text update for users.

---

Nitpick comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/WebImportSelectorScreen.kt`:
- Around line 59-68: The current when-mapping in WebImportSelectorScreen.kt (the
val screen = when(it) { ... }) should be removed by co-locating the navigation
destination on the IconProviders type: add a unique destination property (e.g.,
val destination or navDestination) to the IconProviders enum/class alongside its
existing icon/title/description metadata, implement each provider's destination
to return the corresponding screen object (MaterialSymbolsImportScreen,
LucideImportScreen, etc.), and then change the usage in WebImportSelectorScreen
(and the other occurrences around lines 108-153) to read provider.destination
instead of the explicit when block so future providers only need to update
IconProviders.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e5960fd2-0d5b-4b65-8b7a-5227f4dee0b1

📥 Commits

Reviewing files that changed from the base of the PR and between 55c37e4 and 6bc5d82.

📒 Files selected for processing (2)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/WebImportSelectorScreen.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties

Comment thread tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
@egorikftp egorikftp merged commit fb11c42 into main Apr 29, 2026
5 checks passed
@egorikftp egorikftp deleted the task/update-web-import-selector-screen branch April 29, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant