-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix config entry menu #20908
Fix config entry menu #20908
Conversation
Warning Rate Limit Exceeded@piitaya has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 53 minutes and 53 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe changes to Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant UI as UI Component
participant EventHandler as Event Handler
participant Backend as Backend Service
User->>UI: Interact with menu
UI->>EventHandler: Trigger event (e.g., rename, reload)
EventHandler->>Backend: Process event
Backend-->>EventHandler: Return response
EventHandler-->>UI: Update UI based on response
UI-->>User: Display updated state
This sequence diagram illustrates the high-level flow of user interactions with the updated menu components, where events are handled and processed, resulting in UI updates. 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 (
|
21bb569
to
8a09fab
Compare
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: 0
Outside diff range comments (4)
src/panels/config/integrations/ha-config-integration-page.ts (4)
Line range hint
169-169
: Avoid non-null assertions unless absolutely necessary as they bypass TypeScript's strict null checks.- const row = this.shadowRoot!.querySelector(`[data-entry-id="${entryId}"]`) as any; + const row = this.shadowRoot?.querySelector(`[data-entry-id="${entryId}"]`) as any;
Line range hint
333-333
: Use simple strings instead of template literals when there is no dynamic content.- const url = `${someStaticUrl}`; + const url = "someStaticUrl";Also applies to: 448-448, 494-494, 514-514, 748-748, 767-767, 784-784
Line range hint
673-676
: Avoid non-null assertions to ensure that your code handles potential null or undefined values gracefully.- const entryId = this._searchParms.get("config_entry")!; + const entryId = this._searchParms.get("config_entry") ?? "default_value";Also applies to: 893-894
Line range hint
896-896
: Specify explicit types instead of usingany
to leverage TypeScript's type checking.- const err: any; + const err: Error;Also applies to: 938-938, 1054-1054, 1060-1060, 1066-1066, 1072-1072
8a09fab
to
ecd9760
Compare
@piitaya , thanks for fixing. I experimented with converting both the integration list and their config menus but ended up committing the integration list only to limit the PR. Looking back, it seems like I committed parts of the config menus as well. |
Proposed change
Config entry menu was broken after #20764 because it was not using
ha-menu-item
.Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
New Features
ha-button-menu-new
andha-menu-item
.Improvements
Bug Fixes