π¨ Palette: Add empty state message to results dialog - #485
Conversation
Adds a centered "No results found" label to the results dialog that dynamically shows only when the results list container is empty. 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 the results list contains zero items. ChangesResults empty state
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 316: Replace the hardcoded βNo results foundβ label in the results dialog
with a skin-localized string using a new ID in the `#31000`β#31999 range and the
$LOCALIZE[...] syntax. Add the corresponding skin string definition, using a
distinct ID rather than reusing existing plugin βNo results found for {}β
strings.
πͺ 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 YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 5718704a-8b83-4f94-991b-622753278a0d
π 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: lint
- GitHub Check: coverage
- GitHub Check: test
- GitHub Check: Scan
- GitHub Check: bandit
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (python)
| <!-- Empty state message --> | ||
| <control type="label"> | ||
| <left>0</left><top>60</top><width>1910</width><height>975</height> | ||
| <label>No results found</label> |
There was a problem hiding this comment.
π Maintainability & Code Quality | π‘ Minor | β‘ Quick win
π§© Analysis chain
π Script executed:
#!/bin/bash
set -euo pipefail
fd -i -t f 'strings\.po$' .
rg -n 'No results found|LOCALIZE' --glob '*.xml' --glob '*.po' .Repository: Appz4Fun/nzbdavkodi
Length of output: 591
π Script executed:
#!/bin/bash
set -euo pipefail
echo "== resource files =="
fd -i -t f 'strings\.po$|resource\.strings\.zip$|addon\.xml' repo/plugin.video.nzbdav/resources
echo "== strings.po relevant entries =="
sed -n '340,370p' repo/plugin.video.nzbdav/resources/language/resource.language.en_gb/strings.po
echo "== add-on strings definitions =="
find repo/plugin.video.nzbdav -type f \( -name "addon.xml" -o -path "*/resources/strings/*" -o -name "*.xml" \) | sed -n '1,120p'
echo "== all strings.po files and localizations =="
find repo/plugin.video.nzbdav -path '*/language/*strings.po' | sort | while read -r f; do echo "-- $f"; rg -n 'messageid|msgid "No result|LOCALIZE' "$f" || true; doneRepository: Appz4Fun/nzbdavkodi
Length of output: 1335
π Web query:
Kodi skin strings.po messageid comment string IDs start numbering resource.language strings.po 30001
π‘ Result:
In Kodi development, string IDs in strings.po files are used to localize user interface text, and specific numeric ranges are reserved for different types of add-ons [1][2]. These IDs are encoded in the msgctxt field of the GNU Gettext-formatted strings.po file using the syntax msgctxt "#ID" [1][3]. The reserved numeric ranges for string IDs are as follows: * 30000 thru 30999: Reserved for plugins and plugin settings [1][2] * 31000 thru 31999: Reserved for skins [1][2] * 32000 thru 32999: Reserved for scripts [1][2] * 33000 thru 33999: Reserved for common strings used in add-ons [1][2] For a skin, you should use an ID within the 31000β31999 range [1][4]. While some users have historically experimented with IDs outside these ranges, the system is designed to enforce these boundaries, and using an ID outside the designated range for your add-on type may result in the label failing to display correctly in the GUI [5]. If you are working within a skin, ensure your entry follows the required format: msgctxt "#31001" msgid "Your string text" msgstr "" If you need to access a string from an add-on within a skin, it is recommended to use the $ADDON[addon.id stringID] format rather than the standard $LOCALIZE[ID] function, as this explicitly targets the correct add-on's string resource [5]. For plugin-specific settings, IDs like 30001 are standard practice within the allocated 30000β30999 range [1][6].
Citations:
- 1: https://kodi.wiki/view/Language_support
- 2: https://kodi.wiki/view/Add-on_structure
- 3: https://forum.kodi.tv/showthread.php?tid=355578
- 4: https://forum.kodi.tv/showthread.php?tid=351255
- 5: Some msgctxt IDs not displaying from language strings.po fileΒ xbmc/xbmc#27974
- 6: https://forum.kodi.tv/showthread.php?tid=151709
Use a skin-localized empty-state string.
No results found is hardcoded in a skin XML, while Kodi skin strings use the #31000β#31999 range with $LOCALIZE[...]. Existing No results found for {} entries use plugin string IDs, so this empty list text should not reuse those IDs.
π€ 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 316, Replace the hardcoded βNo results foundβ label in the results dialog
with a skin-localized string using a new ID in the `#31000`β#31999 range and the
$LOCALIZE[...] syntax. Add the corresponding skin string definition, using a
distinct ID rather than reusing existing plugin βNo results found for {}β
strings.
π‘ What
Added a "No results found" label to the
results-dialog.xmlskin file that only displays when the list container (ID50) has zero items.π― Why
In Kodi XML skins, custom lists do not automatically handle empty states. If a search returns no results, the user previously saw a confusing blank dark screen with just the header and footer, with no confirmation that the search actually completed but found nothing. This empty state explicitly communicates the result to the user.
πΈ Before/After
Before: Blank screen between the header and footer.
After: A centered gray text reading "No results found".
βΏ Accessibility
Reduces cognitive load by explicitly confirming the system state, helping users understand that a lack of results is not a loading error or broken UI.
PR created automatically by Jules for task 2551422589044269587 started by @xbmc4lyfe