-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use "Dashboard" for the "plugin" category #729
Conversation
WalkthroughWalkthroughThe recent updates focus on improving localization for repository categories within a dialog and dashboard components. This includes changing localization keys from Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant HacsCustomRepositoriesDialog
participant HacsDashboard
participant Localization
User->>HacsCustomRepositoriesDialog: Open Dialog
HacsCustomRepositoriesDialog->>Localization: Fetch label for category (type.${category})
Localization-->>HacsCustomRepositoriesDialog: Return localized label
HacsCustomRepositoriesDialog-->>User: Display localized label
User->>HacsDashboard: Open Dashboard
HacsDashboard->>Localization: Fetch translated category (type.${repository.category})
Localization-->>HacsDashboard: Return translated category
HacsDashboard-->>User: Display translated category
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Additional Context UsedBiome (16)
Additional comments not posted (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range comments (4)
src/components/dialogs/hacs-custom-repositories-dialog.ts (2)
Line range hint
79-79
: Avoid using non-null assertions. Consider adding null checks or default values.- this._dialogParams!.hacs.localize(`type.${category}`) + this._dialogParams?.hacs.localize(`type.${category}`) ?? 'Default Value'Also applies to: 119-119, 128-128, 129-129, 163-163, 169-169
Line range hint
34-34
: Specify a type instead of using 'any' for_errorSubscription
.- _errorSubscription: any; + _errorSubscription: Subscription;src/dashboards/hacs-dashboard.ts (2)
Line range hint
164-164
: Avoid unnecessary template literals for simple strings.- mainWindow.open(`https://github.com/hacs`, "_blank", "noreferrer=true") + mainWindow.open('https://github.com/hacs', "_blank", "noreferrer=true")
Line range hint
547-547
: Avoid using spread syntax on accumulators for better performance.- this._tableColumns = Object.keys(tableColumnDefaults).reduce( - (entries, key) => ({ - ...entries, - [key]: data.columns.includes(key) ?? tableColumnDefaults[key], - }), - {}, - ) as Record<tableColumnDefaultsType, boolean>; + const newTableColumns = {}; + Object.keys(tableColumnDefaults).forEach(key => { + newTableColumns[key] = data.columns.includes(key) ?? tableColumnDefaults[key]; + }); + this._tableColumns = newTableColumns;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range comments (2)
src/components/dialogs/hacs-custom-repositories-dialog.ts (2)
Line range hint
34-34
: Specify a more specific type instead ofany
for_errorSubscription
.- _errorSubscription: any; + _errorSubscription: Subscription;
Line range hint
79-79
: Avoid using non-null assertions. Consider adding checks or using optional chaining.- this._dialogParams!.hacs.localize(`common.type.${category}`) + this._dialogParams?.hacs.localize(`common.type.${category}`)Also applies to: 119-119, 128-128, 129-129, 163-163, 169-169, 195-195
No description provided.