Skip to content

Conversation

01Dri
Copy link
Contributor

@01Dri 01Dri commented May 23, 2025

What's the PR

Example

image

Todo

  • Adds an on/off checkbox to the plugin preview settings.

This comment has been minimized.

Copy link
Contributor

coderabbitai bot commented May 23, 2025

📝 Walkthrough

"""

Walkthrough

A new option to display file age in the preview panel was introduced to the Explorer plugin. This includes a settings checkbox, localization support, view model and settings property, and logic to compute and show relative file age (e.g., "Today", "X days ago") alongside file timestamps.

Changes

Files Change Summary
.../Languages/en.xaml Added localization strings for "File Age" preview panel checkbox and relative age labels.
.../Views/PreviewPanel.xaml.cs Added logic to compute and display file age; new private method for age calculation.
.../Settings.cs
.../ViewModels/SettingsViewModel.cs
Added boolean property to control file age display in settings and view model.
.../Views/ExplorerSettings.xaml Added checkbox to settings UI for toggling file age display.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ExplorerSettings.xaml
    participant SettingsViewModel
    participant Settings
    participant PreviewPanel

    User->>ExplorerSettings.xaml: Toggles "File Age" checkbox
    ExplorerSettings.xaml->>SettingsViewModel: Updates ShowFileAgeInPreviewPanel
    SettingsViewModel->>Settings: Sets ShowFileAgeInPreviewPanel
    User->>PreviewPanel: Opens preview for a file
    PreviewPanel->>Settings: Reads ShowFileAgeInPreviewPanel
    alt ShowFileAgeInPreviewPanel is true
        PreviewPanel->>PreviewPanel: Calls GetFileAge()
        PreviewPanel->>User: Displays "File Age - Timestamp"
    else ShowFileAgeInPreviewPanel is false
        PreviewPanel->>User: Displays "Timestamp" only
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Add file age display in preview panel, showing years, months, days since last modified (#3533)

Suggested labels

Explorer Plugin

Suggested reviewers

  • jjw24

Poem

A checkbox now, for file age shown,
"How old is this file?"—at last, it's known!
Days, months, or years, now easy to see,
With a tick in settings, as simple as can be.
Explorer smiles, the bunny hops in glee! 🐇✨
"""

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 65e0a02 and 62d7256.

📒 Files selected for processing (2)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml (2 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
  • Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: build
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
Plugins/Flow.Launcher.Plugin.Explorer/Languages/ar.xaml (1)

134-134: Minor formatting inconsistency.

Consider removing this extra blank line to maintain consistency with the English localization file format.

-
Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml (1)

134-134: Minor formatting inconsistency.

Consider removing this extra blank line to maintain consistency with the English localization file format.

-
Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml (1)

134-134: Minor formatting inconsistency.

Consider removing this extra blank line to maintain consistency with the English localization file format.

-
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs (1)

97-134: Well-implemented relative time calculation with minor optimization opportunity.

The GetDiffTimeString method handles various time scenarios correctly:

  • Future dates are properly detected
  • Day, month, and year calculations account for partial periods
  • Singular/plural localization is handled appropriately

However, consider extracting the month and year calculation logic into separate methods to improve readability:

+    private int CalculateMonthsDifference(DateTime from, DateTime to)
+    {
+        int monthsDiff = (to.Year - from.Year) * 12 + to.Month - from.Month;
+        if (to.Day < from.Day)
+            monthsDiff--;
+        return monthsDiff;
+    }
+    
+    private int CalculateYearsDifference(DateTime from, DateTime to)
+    {
+        int yearsDiff = to.Year - from.Year;
+        if (to.Month < from.Month || (to.Month == from.Month && to.Day < from.Day))
+            yearsDiff--;
+        return yearsDiff;
+    }
+    
     private string GetDiffTimeString(DateTime fileDateTime)
     {
         DateTime now = DateTime.Now;
         TimeSpan difference = now - fileDateTime;

         if (fileDateTime > now)
             return Api.GetTranslation("plugin_explorer_previewpanel_diff_time_future");

         if (difference.TotalDays < 1)
             return Api.GetTranslation("plugin_explorer_previewpanel_diff_time_today");

         if (difference.TotalDays < 30)
         {
             int days = (int)difference.TotalDays;
             return days == 1
                 ? Api.GetTranslation("plugin_explorer_previewpanel_diff_time_day_one")
                 : string.Format(Api.GetTranslation("plugin_explorer_previewpanel_diff_time_day_plural"), days);
         }

-        int monthsDiff = (now.Year - fileDateTime.Year) * 12 + now.Month - fileDateTime.Month;
-        if (now.Day < fileDateTime.Day)
-            monthsDiff--;
+        int monthsDiff = CalculateMonthsDifference(fileDateTime, now);

         if (monthsDiff < 12)
         {
             return monthsDiff == 1
                 ? Api.GetTranslation("plugin_explorer_previewpanel_diff_time_month_one")
                 : string.Format(Api.GetTranslation("plugin_explorer_previewpanel_diff_time_month_plural"), monthsDiff);
         }

-        int yearsDiff = now.Year - fileDateTime.Year;
-        if (now.Month < fileDateTime.Month || (now.Month == fileDateTime.Month && now.Day < fileDateTime.Day))
-            yearsDiff--;
+        int yearsDiff = CalculateYearsDifference(fileDateTime, now);

         return yearsDiff == 1
             ? Api.GetTranslation("plugin_explorer_previewpanel_diff_time_year_one")
             : string.Format(Api.GetTranslation("plugin_explorer_previewpanel_diff_time_year_plural"), yearsDiff);
     }
🧰 Tools
🪛 GitHub Check: Check Spelling

[warning] 112-112:
previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 106-106:
previewpanel is not a recognized word. (unrecognized-spelling)

🪛 GitHub Actions: Check Spelling

[warning] 106-106: previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 112-112: previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 113-113: previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 123-123: previewpanel is not a recognized word. (unrecognized-spelling)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2026bb7 and 30cc371.

📒 Files selected for processing (27)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/ar.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/cs.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/he.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/nl.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/pl.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/ru.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/sr.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/tr.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/uk-UA.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-tw.xaml (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs (1 hunks)
  • Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs (5 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check Spelling
Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

[warning] 137-137: opendir is not a recognized word. (unrecognized-spelling)


[warning] 152-152: opendir is not a recognized word. (unrecognized-spelling)


[warning] 177-177: drv is not a recognized word. (unrecognized-spelling)


[warning] 178-178: drv is not a recognized word. (unrecognized-spelling)


[warning] 179-179: totalspace is not a recognized word. (unrecognized-spelling)


[warning] 180-180: drv is not a recognized word. (unrecognized-spelling)


[warning] 180-180: drv is not a recognized word. (unrecognized-spelling)


[warning] 248-248: openresultfolder is not a recognized word. (unrecognized-spelling)

Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs

[warning] 106-106: previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 112-112: previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 113-113: previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 123-123: previewpanel is not a recognized word. (unrecognized-spelling)

🪛 GitHub Check: Check Spelling
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs

[warning] 112-112:
previewpanel is not a recognized word. (unrecognized-spelling)


[warning] 106-106:
previewpanel is not a recognized word. (unrecognized-spelling)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: gitStream.cm
🔇 Additional comments (29)
Plugins/Flow.Launcher.Plugin.Explorer/Languages/de.xaml (1)

126-133: LGTM! Well-structured German localization additions.

The relative time translations are grammatically correct and follow proper German conventions. The singular/plural forms are handled appropriately, and the placeholder usage is consistent.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/cs.xaml (1)

127-134: LGTM! Proper Czech localization implementation.

The Czech translations follow correct grammar rules and declension patterns. The time expressions are natural and consistent with Czech language conventions.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml (1)

126-133: LGTM! Accurate Portuguese localization.

The Portuguese translations are grammatically correct and appropriate for the pt-pt locale. The relative time expressions follow proper Portuguese conventions.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/vi.xaml (1)

126-133: LGTM! Consistent Vietnamese localization.

The Vietnamese translations follow the established pattern and appear to use appropriate Vietnamese expressions for relative time. The structure is consistent with other language files.

Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs (1)

290-290: LGTM! Correct API integration for localization support.

The addition of Context.API parameter to the PreviewPanel constructor properly enables localization support for the relative time display feature. This follows good dependency injection practices and maintains the lazy initialization pattern.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml (1)

128-135: Excellent localization support for relative time expressions!

The new English localization strings are well-structured and comprehensive, covering all necessary time expressions for the file age display feature. The key naming convention is consistent and descriptive.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ar.xaml (1)

126-133: Good Arabic localization with consistent key structure.

The Arabic translations properly support the relative time expressions and maintain consistency with the English key structure. The translations appear to use appropriate Arabic temporal expressions.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/nb.xaml (1)

126-133: Well-implemented Norwegian localization.

The Norwegian translations maintain the consistent key structure and use appropriate Norwegian temporal expressions for relative time display.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml (1)

126-133: Excellent Korean localization with proper temporal expressions.

The Korean translations maintain the consistent key structure across all language files and use appropriate Korean temporal expressions. The implementation properly supports the file age display feature in Korean locales.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/es-419.xaml (1)

126-133: Approve Spanish localization for preview panel relative time display

The newly added Spanish strings for relative time differences (“Hoy”, “Hace 1 día”, “Hace {0} días”, etc.) are correctly defined, keys are consistent with other languages, and placeholders and accents are properly handled.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/nl.xaml (1)

126-133: Approve Dutch localization for preview panel relative time display

The Dutch translations for relative time expressions (“Vandaag”, “1 dag geleden”, “{0} dagen geleden”, etc.) are accurately provided, keys match the pattern used in other resource files, and placeholders are correctly placed.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml (1)

126-133: Approve Simplified Chinese localization for preview panel relative time display

The new Simplified Chinese strings (“今天”, “1 天前”, “{0} 天前”, etc.) correctly cover the relative time cases, follow the established key naming, and use placeholders appropriately.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/da.xaml (1)

126-133: Approve Danish localization for preview panel relative time display

The Danish entries (“I dag”, “For 1 dag siden”, “For {0} dage siden”, etc.) are correctly translated, follow the consistent key naming, and properly include placeholders.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-tw.xaml (1)

126-133: Approve Traditional Chinese localization for preview panel relative time display

The Traditional Chinese strings (“今天”, “1 天前”, “{0} 天前”, etc.) are accurate, keys align with other languages, and placeholders are correctly formatted.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/es.xaml (1)

126-133: Localization additions for relative file age are complete and consistent

The Spanish resource file includes all eight required keys for the preview panel’s relative time display (today, 1 day ago, days plural, future, 1 month ago, months plural, 1 year ago, years plural) with correct placeholders. The key names align exactly with those used in other language files and in the code.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml (1)

126-133: Japanese localization for relative time strings is accurate

All necessary keys for displaying file age are present, and the Japanese translations correctly reflect singular/plural forms and future dates. Key naming matches the implementation in PreviewPanel.xaml.cs.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml (1)

126-133: Portuguese relative time resource keys are correctly added

The Brazilian Portuguese file now contains the full set of plugin_explorer_previewpanel_diff_time_* entries required by the preview panel feature. Placeholders and key names are consistent with other locales and code expectations.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ru.xaml (1)

126-133: Russian localization entries for file age are complete and consistent

The Russian resource dictionary includes all eight diff_time keys with appropriate pluralization patterns and placeholders. They align with the keys referenced in the preview panel logic.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/he.xaml (1)

126-133: Hebrew localization for relative time display is correct

All required plugin_explorer_previewpanel_diff_time_* keys have been added with correct Hebrew translations and placeholders. Key names are consistent with the rest of the codebase.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/uk-UA.xaml (1)

126-133: Localization entries for relative time are well-formed and consistent.

The new keys plugin_explorer_previewpanel_diff_time_* and their Ukrainian translations are correctly structured, follow the existing naming convention, and align with other language resource files.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/fr.xaml (1)

126-133: French localization for relative time is accurate.

The added keys and translations (e.g., "Aujourd'hui", "Il y a {0} jours") are correctly formatted, follow the naming pattern, and match the implementation requirements.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml (1)

126-133: Slovak relative-time entries are correct.

The new localization strings (Dnes, Pred {0} dňami, etc.) are properly translated, use the correct key naming, and mirror the pattern in other languages.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/sr.xaml (1)

126-133: Serbian diff-time translations look good.

All eight new entries (Данас, Пре {0} дана, etc.) are syntactically correct, consistently named, and fit the existing resource structure.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/tr.xaml (1)

126-133: Turkish relative-time strings are properly added.

The keys and translations (Bugün, {0} gün önce, etc.) adhere to project conventions, are correctly escaped, and align with parallel entries in other languages.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/pl.xaml (1)

126-134: LGTM! Well-structured Polish localization additions.

The Polish translations for relative time expressions are properly formatted and follow the established naming conventions. The singular/plural forms are grammatically correct and the placeholder formatting is consistent.

Plugins/Flow.Launcher.Plugin.Explorer/Languages/it.xaml (1)

126-134: LGTM! Accurate Italian localization additions.

The Italian translations for relative time expressions are well-crafted with proper grammar for singular/plural forms. The translations are natural and follow the established resource key conventions.

Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs (3)

56-61: LGTM! Clean constructor enhancement.

The constructor properly accepts and stores the IPublicAPI parameter, enabling localization support for the new relative time feature.


71-76: LGTM! Enhanced date display with relative time.

The logic correctly prepends relative time descriptions to the formatted date/time strings, providing users with both human-friendly relative time and precise timestamps.

Also applies to: 81-86


106-106:

❓ Verification inconclusive

Address spell check warnings for resource key names.

The spell checker flags "previewpanel" as unrecognized, but this is part of the established resource key naming convention for the Explorer plugin.

Consider adding these terms to the spell checker's dictionary or ignore list:

Alternatively, if this is a one-time issue, the warnings can be safely ignored as they are false positives for valid resource key identifiers.

Also applies to: 112-112, 113-113, 123-123


🏁 Script executed:

#!/bin/bash
# Check if there's a spell checker configuration file to add exceptions
fd -g "*spell*" -g "*.json" -g "*.yml" -g "*.yaml" -g "*.txt"

Length of output: 314


Verify and update spell checker dictionary for resource keys

No spell checker config file (e.g. cspell.json, spelling.yml) was detected in the repo. Please:

  • Identify which spell-checker tool/config your project uses.
  • Add these terms to its dictionary or ignore list:
    • previewpanel
    • plugin_explorer_previewpanel_diff_time_today
    • plugin_explorer_previewpanel_diff_time_yesterday
    • plugin_explorer_previewpanel_diff_added
    • plugin_explorer_previewpanel_diff_removed
  • Or, if these warnings are one-off false positives, you may safely ignore them.

Affected locations:

  • Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs – lines 106, 112, 113, 123
🧰 Tools
🪛 GitHub Check: Check Spelling

[warning] 106-106:
previewpanel is not a recognized word. (unrecognized-spelling)

🪛 GitHub Actions: Check Spelling

[warning] 106-106: previewpanel is not a recognized word. (unrecognized-spelling)

@Jack251970 Jack251970 linked an issue May 24, 2025 that may be closed by this pull request
@Jack251970 Jack251970 added enhancement New feature or request kind/ui related to UI, icons, themes, etc labels May 24, 2025
@Jack251970 Jack251970 requested a review from onesounds May 24, 2025 01:46
Copy link
Contributor

@onesounds onesounds left a comment

Choose a reason for hiding this comment

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

Hello. Thanks for your contribution.

  • You only need to add the strings in English; no translation is necessary. (As far as I know, translations added here probably won't be reflected anyway. Since we use Crowdin, any translations added here likely won’t be applied or will be overwritten.) This translation contains some inaccuracies based on my review. (If AI translation was used, you should double-check whether the expressions are actually used in real contexts.) It would be better to remove all translations except English.

  • This feature should have an on/off toggle. (There might be requests like "I want to disable this.")

@01Dri
Copy link
Contributor Author

01Dri commented May 24, 2025

Hello. Thanks for your contribution.

  • You only need to add the strings in English; no translation is necessary. (As far as I know, translations added here probably won't be reflected anyway. Since we use Crowdin, any translations added here likely won’t be applied or will be overwritten.) This translation contains some inaccuracies based on my review. (If AI translation was used, you should double-check whether the expressions are actually used in real contexts.) It would be better to remove all translations except English.
  • This feature should have an on/off toggle. (There might be requests like "I want to disable this.")

Hi, thanks for the review!

I'll be working on the changes!

@01Dri 01Dri force-pushed the display-the-File-age-in-preview-panel branch from 30cc371 to 90ad72c Compare May 24, 2025 03:12

This comment has been minimized.

This comment has been minimized.

Copy link

gitstream-cm bot commented May 24, 2025

🥷 Code experts: Jack251970, jjw24

Jack251970, jjw24 have most 👩‍💻 activity in the files.
Jack251970, jjw24 have most 🧠 knowledge in the files.

See details

Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml

Activity based on git-commit:

Jack251970 jjw24
MAY 2 additions & 0 deletions
APR
MAR
FEB
JAN
DEC

Knowledge based on git-blame:
jjw24: 26%
Jack251970: 1%

Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-br.xaml

Activity based on git-commit:

Jack251970 jjw24
MAY 2 additions & 0 deletions
APR
MAR
FEB
JAN
DEC

Knowledge based on git-blame:
jjw24: 97%

Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs

Activity based on git-commit:

Jack251970 jjw24
MAY
APR
MAR
FEB
JAN
DEC

Knowledge based on git-blame:
jjw24: 9%

Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs

Activity based on git-commit:

Jack251970 jjw24
MAY
APR 21 additions & 36 deletions
MAR
FEB
JAN
DEC

Knowledge based on git-blame:
jjw24: 5%
Jack251970: 4%

Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

Activity based on git-commit:

Jack251970 jjw24
MAY
APR 5 additions & 5 deletions
MAR 2066 additions & 1972 deletions
FEB
JAN
DEC

Knowledge based on git-blame:
Jack251970: 90%
jjw24: 1%

Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs

Activity based on git-commit:

Jack251970 jjw24
MAY
APR 1 additions & 2 deletions
MAR
FEB
JAN
DEC

Knowledge based on git-blame:
Jack251970: 1%

To learn more about /:\ gitStream - Visit our Docs

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@onesounds
Copy link
Contributor

@Jack251970 There are no issues functionally or UI-wise. If the code looks fine to you, it should be good to merge.
@01Dri I’ve changed the default value to false. Since this is information that’s typically not shown in details panels like those in file explorers, I felt it would be better to exclude it by default here as well.

This comment has been minimized.

@Jack251970 Jack251970 requested a review from onesounds May 24, 2025 08:07
@Jack251970
Copy link
Member

Jack251970 commented May 24, 2025

@onesounds Improved code quality and supported translation for preview information. If you think it is good to go, please merge it.

Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors and Warnings Count
❌ forbidden-pattern 22
⚠️ non-alpha-in-dictionary 13

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@Jack251970 Jack251970 added this to the 1.20.0 milestone May 24, 2025
@Jack251970
Copy link
Member

@01Dri Thanks for your work👍

@Jack251970 Jack251970 requested a review from onesounds May 24, 2025 08:09
@onesounds onesounds enabled auto-merge May 24, 2025 08:09
@onesounds onesounds merged commit 6333cd3 into Flow-Launcher:dev May 24, 2025
5 checks passed
@01Dri
Copy link
Contributor Author

01Dri commented May 24, 2025

@01Dri Thanks for your work👍

Thankss!

It's my first contribution to an open source project!!

@H5820121
Copy link

H5820121 commented May 24, 2025

What's the PR

Example

image

Todo

  • Adds an on/off checkbox to the plugin preview settings.

@01Dri
Thank you very much, that's great!
I think it would be even more useful if you could please add that it would display not just one time unit but two time units, I mean if for example the file was changed a few days ago then it would display the days and hours, and if it was changed a few months ago then it would display the months and hours, and if it was changed a few years ago then it would display the years and months. And like in the XYplorer file explorer:
image
image
image

I am grateful for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request kind/ui related to UI, icons, themes, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display the File age in preview panel

4 participants