π¨ Palette: Add empty state message to results dialog - #492
Conversation
When the search returns zero results, the Kodi list previously showed a blank dark screen, which is confusing. This commit adds a text label "No results found" that only becomes visible when the item count of the list container is exactly zero. Co-authored-by: xbmc4lyfe <273732874+xbmc4lyfe@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Dependency Reviewβ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
π WalkthroughSummary by CodeRabbit
WalkthroughThe results dialog now shows a centered βNo results foundβ label when results list 50 contains zero items. ChangesResults empty-state display
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: Poem
π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
β¨ Simplify code
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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. Comment |
Up to standards βπ’ Issues
|
There was a problem hiding this comment.
Actionable comments posted: 1
π€ Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@repo/plugin.video.nzbdav/resources/skins/Default/1080i/results-dialog.xml`:
- Line 269: Replace the literal empty-state label near the results dialog with a
$LOCALIZE reference, and add the corresponding βNo results foundβ translation
entry to strings.po using an available unique ID. Preserve the displayed text
while enabling add-on localization workflows.
πͺ Autofix
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 YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 329325af-962e-440f-9ed2-01226291c26c
π Files selected for processing (1)
repo/plugin.video.nzbdav/resources/skins/Default/1080i/results-dialog.xml
π Review details
β° Context from checks skipped due to timeout. (8)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: test
- GitHub Check: lint
- GitHub Check: coverage
- GitHub Check: Scan
- GitHub Check: bandit
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (python)
| <!-- Empty state indicator --> | ||
| <control type="label"> | ||
| <left>0</left><top>60</top><width>1920</width><height>975</height> | ||
| <label>No results found</label> |
There was a problem hiding this comment.
π― Functional Correctness | π‘ Minor | β‘ Quick win
π§© Analysis chain
π Script executed:
#!/bin/bash
set -euo pipefail
fd -t f 'strings\.po$' . -x rg -n -H 'No results found|msgctxt' {}
rg -n '\$LOCALIZE\[|\$ADDON\[' --glob '*.xml' .Repository: Appz4Fun/nzbdavkodi
Length of output: 37303
π Script executed:
#!/bin/bash
set -euo pipefail
echo "XML context:"
sed -n '258,276p' repo/plugin.video.nzbdav/resources/skins/Default/1080i/results-dialog.xml
echo
echo "String catalog references:"
fd -t f 'strings\.po$' . -x rg -n -H '"No results found"$|msgctxt "`#301`??[0-9]"' {}
echo
echo "Other addon/localize XML label usages:"
rg -n '\$LOCALIZE\[[^]]+\]|\$ADDON\[[^]]+\]' --glob '*.xml' repo/plugin.video.nzbdav/resources/skins repo/plugin.video.nzbdav -g '*.xml' || true
echo
echo "Repository string file list:"
git ls-files 'repo/plugin.video.nzbdav/resources/language/**strings.po' 'repo/plugin.video.nzbdav/res...' | sed -n '1,200p'Repository: Appz4Fun/nzbdavkodi
Length of output: 847
π Web query:
Kodi skins XML label parsing $LOCALIZE [$ADDON] syntax
π‘ Result:
In Kodi skinning, label parsing allows skinners to dynamically display text, localization strings, and system information within XML files [1][2]. $LOCALIZE Syntax The $LOCALIZE[id] syntax is used to fetch and display a translated string from the project's language files (strings.po) [1][3]. - Usage: Use $LOCALIZE in your skin XML to display the string associated with ID 31005 [1]. - Context: This replaces the older strings.xml format [3]. The ID refers to entries found in the strings.po files located within Kodi's system language directories or your addon's language directory [1][3]. $ADDON Syntax The $ADDON[addon_id id] syntax allows skinners to reference localization strings specifically from a different addon, rather than the core Kodi system or the current skin [4]. - Syntax: $ADDON[addon.id string_id] - Purpose: This is particularly useful for skins or addons that need to display localized text provided by a dependency or another installed addon without requiring that addon to be the active context [4]. Label Parsing Order When processing labels, Kodi follows a specific order of operations: 1. Localization: Kodi first replaces all $LOCALIZE[id] and $ADDON[addon_id id] blocks with the corresponding strings from the relevant.po files [1]. 2. Info Manager: Next, it parses and replaces $INFO[infolabel,prefix,postfix] blocks [1]. 3. Rendering: Finally, it renders the combined string [1]. Best Practices - You can combine multiple formats in a single label, such as $LOCALIZE: $INFO[MusicPlayer.Title] [1][2]. - Use $ESCINFO[] if you are passing an infolabel to a built-in function where the returned data might contain commas or quotes, as this ensures the string is handled as a single parameter [1].
Citations:
- 1: https://kodi.wiki/view/Label_Parsing
- 2: https://xbmc.github.io/docs.kodi.tv/master/kodi-dev-kit/_label__control.html
- 3: https://forum.kodi.tv/showthread.php?tid=217867
- 4: https://github.com/MikeSiLVO/KodiDevKit/blob/main/docs/features.md
Localize the empty-state label.
Replace the literal <label>No results found</label> with a localized string reference by adding an available No results found entry to strings.po and using its $LOCALIZE[<id>] reference. This keeps the empty-state message available in add-on-localization workflows.
π€ Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@repo/plugin.video.nzbdav/resources/skins/Default/1080i/results-dialog.xml` at
line 269, Replace the literal empty-state label near the results dialog with a
$LOCALIZE reference, and add the corresponding βNo results foundβ translation
entry to strings.po using an available unique ID. Preserve the displayed text
while enabling add-on localization workflows.
π‘ What
Added an explicit "No results found" message to
results-dialog.xml.π― Why
In Kodi XML skins, lists do not natively handle empty states. When a search returned zero results, the user was presented with an entirely blank, dark screen. This provides immediate, clear feedback that the query completed but found nothing, rather than leaving the user wondering if the add-on crashed or is still loading.
πΈ Before/After
Before: A completely blank screen (just the dark background).
After: A centered message reading "No results found" in a subdued gray color (
FF9CA3AF).βΏ Accessibility
Improves cognitive accessibility by providing explicit text feedback for an empty list state, removing ambiguity.
PR created automatically by Jules for task 8974934371020478185 started by @xbmc4lyfe