-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Remove unused country code selection #37397
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
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughThe changes involve the removal of JavaScript code within the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Dialog
participant focusDistributors
User->>Dialog: Activate default tab
Dialog->>focusDistributors: Call focusDistributors()
Note over focusDistributors: Locale and country code handling removed
focusDistributors-->>Dialog: Returns updated dialog view
Dialog-->>User: Displays distributors without country-based auto-scroll
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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: 0
🧹 Nitpick comments (1)
source/_includes/custom/buy-dialog.html (1)
114-130
: Refactored Focus Logic Using TimezoneThe updated
focusDistributors
function now relies on the client's timezone (viaIntl.DateTimeFormat().resolvedOptions().timeZone
) to derive a region. This effectively removes the previously problematic locale-based country code selection. While this simplifies the approach, please verify that the derived region (by splitting on'/'
and converting to lower case) consistently matches the format of your tabdata-tab
attributes.Suggestions:
- Consider adding a fallback (such as defaulting to the first tab) if the
defaultTab
is not found. This extra check will improve robustness when the derived region does not match any existing tab.
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.
Thanks, @mrdarrengriffin 👍
../Frenck
Proposed change
Removed some code that was redundant but was causing issues when the country code didn't contain a hyphen, causing the buy dialong not to focus to the correct region
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit