Skip to content

Add region selector for multi-region documentation URLs#2086

Merged
aantn merged 11 commits into
masterfrom
claude/add-region-selector-docs-kX1SI
May 21, 2026
Merged

Add region selector for multi-region documentation URLs#2086
aantn merged 11 commits into
masterfrom
claude/add-region-selector-docs-kX1SI

Conversation

@naomi-robusta
Copy link
Copy Markdown
Contributor

Summary

This PR adds a region selector widget to the documentation that allows users to dynamically switch between US, EU, and AP region URLs throughout the page. The selector persists the user's choice in localStorage and automatically rewrites all relevant URLs when a region is selected.

Key Changes

  • New JavaScript module (docs/_static/region-selector.js): Implements region detection and URL rewriting functionality

    • Scans page content for Robusta platform/API URLs and collects them for dynamic rewriting
    • Provides UI controls to switch between three regions (US, EU, AP) with persistent storage
    • Intelligently targets text nodes and HTML attributes (href, src, data-clipboard-text, value, title)
    • Excludes script and style tags from processing
  • Styling (docs/custom.css): Added comprehensive CSS for the region selector widget

    • Styled as an inline notification box with left border accent
    • Responsive button group with active state styling
    • Mobile-friendly layout with responsive note text
    • Uses CSS variables for theme consistency with Material Design
  • Configuration (docs/conf.py): Registered the new JavaScript module to load on all documentation pages

Implementation Details

  • Uses TreeWalker API for efficient DOM traversal and text node collection
  • URL pattern matching handles both base domain and regional variants (.eu, .ap infixes)
  • Region preference stored in localStorage with fallback to US region
  • Accessible UI with proper ARIA attributes (role, aria-checked, aria-label)
  • Graceful error handling for localStorage access restrictions
  • Deferred initialization until DOM is ready

https://claude.ai/code/session_01N91JLFHPrBhazqZ58BEZ7y

Adds a "Select your region" toggle (US/EU/AP) at the top of any
documentation page that references platform.robusta.dev or
api.robusta.dev. Selecting EU or AP rewrites those hosts in-place to
platform.<region>.robusta.dev and api.<region>.robusta.dev (covers
prose, code blocks, and anchor hrefs). Choice is persisted in
localStorage so it carries across pages.

The toggle is injected by region-selector.js and only appears on pages
that actually contain matching URLs.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Docker image ready for 3ffb2da (built in 42s)

⚠️ Warning: does not support ARM (ARM images are built on release only - not on every PR)

Use this tag to pull the image for testing.

📋 Copy commands

⚠️ Temporary images are deleted after 30 days. Copy to a permanent registry before using them:

gcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:3ffb2da
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:3ffb2da me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:3ffb2da
docker push me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:3ffb2da

Patch Helm values in one line:

helm upgrade --install robusta robusta/robusta \
  --reuse-values \
  --set runner.image=me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:3ffb2da

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a873518c-0435-4f9a-be1a-b8c3de32a38d

📥 Commits

Reviewing files that changed from the base of the PR and between 6168baf and 71c3303.

📒 Files selected for processing (2)
  • docs/_ext/region_box.py
  • docs/_static/region-selector.js

Walkthrough

Adds Sphinx directives and client-side assets for a persisted region selector that injects UI into documentation, rewrites Robusta platform/api URLs per selected region, includes CSS styling, and registers the script in Sphinx output.

Changes

Region Selector Feature

Layer / File(s) Summary
Sphinx directives for region boxes
docs/_ext/region_box.py
Adds robusta-url, robusta-code, robusta-region-picker directives and the :robusta-url: inline role; emits HTML containers targeted by the client script and registers them in setup(app).
Client rewrite core & target collection
docs/_static/region-selector.js (start–~100)
Defines supported regions and storage key, safe localStorage helpers, URL-detection/rewriter regexes, and collects text-node + attribute rewrite targets under the content container.
UI construction, sync, and init
docs/_static/region-selector.js (build/init sections)
Builds/injects ARIA-enabled bar and inline pickers, wires click/keyboard handlers to persist selection and reapply rewrites, closes inline menus on outside click/Escape, and re-initializes on DOMContentLoaded and instant navigation.
CSS styling for region components
docs/_static/custom.css (lines 355–613)
Adds .robusta-region-box, .robusta-region-inline, and .robusta-region-picker styles for layout, button joining, hover/focus, active states, and code/link body resets.
Sphinx wiring (conf.py)
docs/conf.py
Adds the region_box extension and includes region-selector.js in html_js_files.
Documentation directive swaps and picker insertion
docs/** (many files)
Replaces numerous .. code-block:: with .. robusta-code::, converts inline endpoints to :robusta-url:, and inserts .. robusta-region-picker:: on the landing page so content becomes region-aware.

Sequence Diagram(s)

sequenceDiagram
  participant Init as Initialization
  participant Storage as localStorage
  participant Document as Document (text nodes & attributes)
  participant UI as Region Selector UI
  participant User as User

  Init->>Storage: read stored region (default "us")
  Init->>Document: collect matching text nodes and attribute targets
  Init->>Document: apply stored region rewrites
  Init->>UI: inject Region Selector UI into `.robusta-region-box` / `.robusta-region-inline`

  User->>UI: click region button / select option
  UI->>Storage: save selected region
  UI->>Document: reapply URL rewrite for new region
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • arikalon1
  • moshemorad
  • yuryrudey
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a region selector widget for multi-region documentation URLs.
Description check ✅ Passed The description is comprehensive and clearly related to the changeset, detailing the region selector implementation with JavaScript, CSS, and configuration changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/add-region-selector-docs-kX1SI

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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: 2

🤖 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 `@docs/_static/region-selector.js`:
- Line 151: The initial-load branch currently skips calling applyRegion when
region === "us", leaving authored hostnames like
platform.eu.robusta.dev/api.ap.robusta.dev unnormalized; remove the conditional
and invoke applyRegion on initial load for all regions (i.e., always call
applyRegion(region)) or modify applyRegion to be explicitly invoked for the "us"
case so that region and applyRegion are used unconditionally during
initialization.
- Around line 154-158: The current init() is only run on initial load and must
be re-run for Material/Sphinx-Immaterial instant navigations; update the module
so init() is idempotent (clear the targets array and, before inserting the
toggle, detect and remove/replace any existing element with class
.robusta-region-selector) and add a listener into the Material instant-nav
lifecycle in addition to the DOMContentLoaded gate so init() is invoked on each
client-side instant navigation (hook into the theme's instant navigation event
and call init() there).
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f45e480-c3c3-4cb2-9e61-312c49629ac5

📥 Commits

Reviewing files that changed from the base of the PR and between 13c5873 and 2b5e8ec.

📒 Files selected for processing (3)
  • docs/_static/custom.css
  • docs/_static/region-selector.js
  • docs/conf.py

Comment thread docs/_static/region-selector.js Outdated
Comment thread docs/_static/region-selector.js
claude added 2 commits May 21, 2026 11:36
The Material theme's .md-typeset button reset was more specific than the
class-only selectors, so the buttons rendered as bare text. Scope the
rules under .md-typeset and pin the visual properties with !important so
the toggle renders as a proper segmented control in both light and dark
modes.

Persistence across pages was already handled via localStorage; no JS
changes needed.
- init() now clears the targets array and removes any existing toggle
  before re-injecting, so it can be called repeatedly without
  duplicating UI or leaking stale node references.
- Subscribe to the theme's document$ observable so the toggle is
  re-injected after Material/Sphinx-Immaterial instant navigations,
  which swap the content area without firing DOMContentLoaded.
- Always call applyRegion on init (including "us") so any stored
  selection is consistently reapplied after navigation.
Copy link
Copy Markdown

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/_static/region-selector.js (1)

100-121: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add WAI-ARIA keyboard navigation to the region selector radiogroup

docs/_static/region-selector.js sets up role="radiogroup" / role="radio" and updates aria-checked, but only supports mouse via click (no keydown for Arrow keys, and no tabindex/focus management for moving between options). Implement the APG radio pattern so ArrowLeft/Right (and ArrowUp/Down) move focus (wrapping) and update the checked state (and .is-active), reusing the existing selection logic for both click and key interaction.

🤖 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 `@docs/_static/region-selector.js` around lines 100 - 121, The region selector
only handles mouse clicks; add keyboard support by setting focus management and
key handlers on each button created in the loop (use the existing variables
group, btn, REGIONS, current). Ensure one radio has tabindex="0" (the active
one) and others tabindex="-1", update tabindexes when selection changes, and add
a keydown listener on btn to handle ArrowLeft/ArrowRight and ArrowUp/ArrowDown
(wrap around indices obtained from
group.querySelectorAll("button[data-region]")), moving focus to the
next/previous button and invoking the same selection logic (call
saveRegion/applyRegion and toggle .is-active and aria-checked) so keyboard
navigation reuses the existing click-selection behavior.
🤖 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.

Outside diff comments:
In `@docs/_static/region-selector.js`:
- Around line 100-121: The region selector only handles mouse clicks; add
keyboard support by setting focus management and key handlers on each button
created in the loop (use the existing variables group, btn, REGIONS, current).
Ensure one radio has tabindex="0" (the active one) and others tabindex="-1",
update tabindexes when selection changes, and add a keydown listener on btn to
handle ArrowLeft/ArrowRight and ArrowUp/ArrowDown (wrap around indices obtained
from group.querySelectorAll("button[data-region]")), moving focus to the
next/previous button and invoking the same selection logic (call
saveRegion/applyRegion and toggle .is-active and aria-checked) so keyboard
navigation reuses the existing click-selection behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbe39361-f5e9-4e02-8c56-3f9fa15a942f

📥 Commits

Reviewing files that changed from the base of the PR and between a2d785b and 1e066d4.

📒 Files selected for processing (1)
  • docs/_static/region-selector.js

claude added 7 commits May 21, 2026 11:53
Introduces two RST directives for embedding region-aware Robusta URLs
and code blocks inline in the docs:

  .. robusta-url:: https://api.robusta.dev/api/alerts

  .. robusta-code:: bash

     curl https://api.robusta.dev/api/alerts -H 'Authorization: ...'

Each rendered component (".robusta-region-box") now carries its own
US / EU / AP selector at the top of its frame. Clicking any selector on
a page syncs every other component on the same page in lock-step and
persists the choice to localStorage so it sticks across navigation.

Implementation:
- New Sphinx extension docs/_ext/region_box.py defines RobustaUrlDirective
  and RobustaCodeDirective and is registered in conf.py.
- region-selector.js no longer injects a page-header toggle. It scans
  for .robusta-region-box elements, injects an inline selector bar into
  each, collects URL targets from the box body, and exposes a single
  syncAll() that re-applies the chosen region across every box.
- custom.css restyles the toggle as a tight segmented control sitting
  flush atop the URL / code frame.
- send-alerts-api.rst is migrated to use both directives as a worked
  example. Remaining docs continue to render their original URLs as-is
  until they are migrated to the new directives.
Two changes:

1. Rename the bar label from "Region" to "Select Region" in the
   selector UI.

2. Migrate every documentation page that mentions platform.robusta.dev
   or api.robusta.dev so the region selector is visible wherever the
   user encounters a Robusta endpoint. Concretely, replace
   .. code-block:: <lang> with .. robusta-code:: <lang> for any code
   block whose body contains a Robusta URL — 65 blocks across 36 files.
   Pages whose only mention is an inline external link (signup CTAs,
   prose references) are intentionally left as-is; the page-wide JS
   still rewrites those URLs to the selected region using the value
   persisted in localStorage from any page that does carry a selector.

The JS also now collects URL targets from the whole content area
rather than scoping them to each box, so a selector click on any
component on the page rewrites every Robusta URL it can reach
(prose, tables, code, anchor hrefs).
Introduces an inline counterpart to the .. robusta-url:: / .. robusta-code::
directives, so prose mentions of Robusta URLs get their own region
picker without needing a block-level component:

  Sign up at :robusta-url:`https://platform.robusta.dev/signup` today.

  Or with custom link text:
  Visit :robusta-url:`our platform <https://platform.robusta.dev/signup>`.

The role emits a span.robusta-region-inline wrapping the link; the
client-side script appends a compact US/EU/AP picker that shares state
with every other region selector on the page (boxes and inline alike).

Migrated 15 docs whose only Robusta URL mention was an inline external
link or inline literal — signup CTAs in install / architecture /
playbook / pro-features / metric-providers / RobustaUI / oss-vs-saas /
help / routing-with-scopes / _see_robusta_in_action-2 and the
integration endpoint references in alertmanager-integration/{dynatrace,
gcp-monitoring, launchdarkly, newrelic}.rst — all now use the role and
display the region picker beside the link.

The sphinx_design .. button-link:: on the docs index page is left as a
plain URL; the page-wide JS still rewrites its href silently so the CTA
points at the user's chosen region.
Replaces the segmented US|EU|AP buttons on each .robusta-region-inline
with a single trigger pill (showing the current region + caret) that
opens a small dropdown listbox on click. State stays in sync with
every other region selector on the page via the existing syncAll()
plumbing. The menu closes on outside-click, on Escape, and when
another inline picker is opened.

Also adds a .. robusta-region-picker:: directive that emits a
"Select Region" label plus a standalone dropdown, no URL display.
The docs index page now uses this directive above the Get Started
button instead of the previous :robusta-url: line, since the button's
href is already region-aware and showing the URL again was redundant.
Material's .md-typeset ul styles overrode the menu's display: none,
leaving the dropdown permanently visible. Pin display with !important
in both the closed and open states.

Also tighten the menu to match its trigger: min-width: 100% (of the
picker), narrower item padding, and centered labels so the menu sits
flush under the AP/EU/US pill instead of mushrooming out to a fixed
4rem width.
Copy link
Copy Markdown

@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: 3

🤖 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 `@docs/_ext/region_box.py`:
- Around line 114-119: The parsing path that sets label = match.group(1).strip()
can yield an empty string and produce an empty anchor; after extracting label
and url (from match.group(...) or raw_text), check if label is falsy (empty
after strip) and fallback to using the url (or url.strip()) as the label; update
the code paths that set label/url (the match.group(...) branch and the raw_text
branch) so both perform this fallback to avoid rendering empty inline link text.

In `@docs/_static/region-selector.js`:
- Around line 147-166: The inline picker options are not keyboard-operable
because tabIndex is set to -1 and only a click handler is attached; update the
option creation in the REGIONS iteration to make items focusable and navigable
by keyboard (reference: variables/functions REGIONS, currentRegion, items, menu,
picker, trigger, syncAll). Set tabIndex so options can receive focus (e.g., 0
when picker is open, or manage focus programmatically), add a keydown handler on
each item to handle Enter/Space to invoke syncAll(key) and close the picker
(mirroring the click handler), and handle ArrowUp/ArrowDown/Home/End to move
focus between items and update aria-selected/class (is-active) accordingly so
keyboard users can navigate and select options the same way mouse users do.
Ensure after selection you remove "is-open" from picker, set trigger
aria-expanded="false", and focus the trigger.

In `@docs/configuration/alertmanager-integration/launchdarkly.rst`:
- Line 46: Update the LaunchDarkly webhook docs in
docs/configuration/alertmanager-integration/launchdarkly.rst to remove the
misleading "Headers: Authorization: Bearer <api-key>" alternative and instead
document the correct HMAC signing flow using the X-LD-Signature header (explain
how the webhook secret is used to compute/verify the signature), and remove or
discourage placing YOUR_API_KEY_HERE in the query string of the example URL for
integrations/generic/launchdarkly unless the integration actually
requires/query-param auth—if the backend supports X-LD-Signature verification,
replace the query-key example with instructions to configure the webhook secret
and how Robusta verifies X-LD-Signature.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c262dc66-2753-4769-8ce2-112c69f5c546

📥 Commits

Reviewing files that changed from the base of the PR and between 123a216 and 6168baf.

📒 Files selected for processing (54)
  • docs/_ext/region_box.py
  • docs/_static/custom.css
  • docs/_static/region-selector.js
  • docs/configuration/alertmanager-integration/coralogix_managed_prometheus.rst
  • docs/configuration/alertmanager-integration/dynatrace.rst
  • docs/configuration/alertmanager-integration/gcp-monitoring.rst
  • docs/configuration/alertmanager-integration/google-managed-alertmanager.rst
  • docs/configuration/alertmanager-integration/grafana-self-hosted.rst
  • docs/configuration/alertmanager-integration/launchdarkly.rst
  • docs/configuration/alertmanager-integration/nagios.rst
  • docs/configuration/alertmanager-integration/newrelic.rst
  • docs/configuration/alertmanager-integration/outofcluster-prometheus.rst
  • docs/configuration/alertmanager-integration/pagerduty-alerting.rst
  • docs/configuration/alertmanager-integration/solarwinds.rst
  • docs/configuration/exporting/alert-export-api.rst
  • docs/configuration/exporting/alert-statistics-api.rst
  • docs/configuration/exporting/configuration-changes-api.rst
  • docs/configuration/exporting/custom-webhooks.rst
  • docs/configuration/exporting/namespace-resources-api.rst
  • docs/configuration/exporting/prometheus-query-api.rst
  • docs/configuration/exporting/rbac-api.rst
  • docs/configuration/exporting/robusta-pro-features.rst
  • docs/configuration/exporting/send-events-api.rst
  • docs/configuration/exporting/send-events/alertmanager.rst
  • docs/configuration/exporting/send-events/aws-cloudwatch.rst
  • docs/configuration/exporting/send-events/azure-monitor.rst
  • docs/configuration/exporting/send-events/datadog.rst
  • docs/configuration/exporting/send-events/dynatrace.rst
  • docs/configuration/exporting/send-events/gcp-monitoring.rst
  • docs/configuration/exporting/send-events/grafana.rst
  • docs/configuration/exporting/send-events/nagios.rst
  • docs/configuration/exporting/send-events/newrelic.rst
  • docs/configuration/exporting/send-events/opsgenie.rst
  • docs/configuration/exporting/send-events/pagerduty.rst
  • docs/configuration/exporting/send-events/sentry.rst
  • docs/configuration/exporting/send-events/solarwinds.rst
  • docs/configuration/exporting/send-events/splunk.rst
  • docs/configuration/github-actions/holmes-pr-review.rst
  • docs/configuration/holmesgpt/holmes-chat-api.rst
  • docs/configuration/metric-providers-external.rst
  • docs/configuration/resource-recommender.rst
  • docs/configuration/sinks/RobustaUI.rst
  • docs/configuration/sinks/slack.rst
  • docs/configuration/sinks/webhook.rst
  • docs/help.rst
  • docs/how-it-works/architecture.rst
  • docs/how-it-works/oss-vs-saas.rst
  • docs/index.rst
  • docs/notification-routing/routing-with-scopes.rst
  • docs/playbook-reference/index.rst
  • docs/playbook-reference/triggers/elasticsearch.rst
  • docs/setup-robusta/installation/_see_robusta_in_action-2.rst
  • docs/setup-robusta/installation/index.rst
  • docs/setup-robusta/proxies.rst
✅ Files skipped from review due to trivial changes (43)
  • docs/configuration/exporting/send-events/datadog.rst
  • docs/configuration/exporting/send-events/dynatrace.rst
  • docs/configuration/exporting/send-events/grafana.rst
  • docs/configuration/exporting/send-events/opsgenie.rst
  • docs/configuration/exporting/configuration-changes-api.rst
  • docs/setup-robusta/installation/index.rst
  • docs/configuration/alertmanager-integration/google-managed-alertmanager.rst
  • docs/playbook-reference/triggers/elasticsearch.rst
  • docs/configuration/exporting/robusta-pro-features.rst
  • docs/configuration/alertmanager-integration/nagios.rst
  • docs/configuration/alertmanager-integration/newrelic.rst
  • docs/setup-robusta/installation/_see_robusta_in_action-2.rst
  • docs/how-it-works/architecture.rst
  • docs/index.rst
  • docs/configuration/alertmanager-integration/outofcluster-prometheus.rst
  • docs/configuration/sinks/slack.rst
  • docs/configuration/alertmanager-integration/dynatrace.rst
  • docs/configuration/exporting/send-events-api.rst
  • docs/playbook-reference/index.rst
  • docs/configuration/exporting/send-events/solarwinds.rst
  • docs/configuration/exporting/alert-export-api.rst
  • docs/configuration/exporting/send-events/aws-cloudwatch.rst
  • docs/configuration/alertmanager-integration/grafana-self-hosted.rst
  • docs/configuration/holmesgpt/holmes-chat-api.rst
  • docs/configuration/alertmanager-integration/gcp-monitoring.rst
  • docs/configuration/github-actions/holmes-pr-review.rst
  • docs/configuration/exporting/send-events/nagios.rst
  • docs/notification-routing/routing-with-scopes.rst
  • docs/configuration/exporting/send-events/azure-monitor.rst
  • docs/how-it-works/oss-vs-saas.rst
  • docs/configuration/exporting/send-events/alertmanager.rst
  • docs/configuration/resource-recommender.rst
  • docs/configuration/exporting/send-events/sentry.rst
  • docs/configuration/exporting/send-events/gcp-monitoring.rst
  • docs/setup-robusta/proxies.rst
  • docs/configuration/exporting/send-events/pagerduty.rst
  • docs/configuration/exporting/prometheus-query-api.rst
  • docs/configuration/sinks/RobustaUI.rst
  • docs/configuration/exporting/send-events/newrelic.rst
  • docs/configuration/exporting/alert-statistics-api.rst
  • docs/configuration/exporting/namespace-resources-api.rst
  • docs/configuration/exporting/custom-webhooks.rst
  • docs/configuration/alertmanager-integration/pagerduty-alerting.rst

Comment thread docs/_ext/region_box.py
Comment thread docs/_static/region-selector.js
Comment thread docs/configuration/alertmanager-integration/launchdarkly.rst
aantn
aantn previously approved these changes May 21, 2026
@aantn aantn enabled auto-merge (squash) May 21, 2026 12:43
region-selector.js: the inline dropdown was mouse-only — every option
had tabIndex=-1 and only a click handler. Add a standard listbox
keyboard contract:

  - Tab focuses the trigger; ArrowDown / Enter / Space opens the menu
    and focuses the active option (ArrowUp opens at the last option)
  - Inside the open menu: ArrowDown/ArrowUp move focus, Home/End jump
    to first/last, Enter/Space select, Escape closes and returns
    focus to the trigger, Tab closes and lets the browser advance
  - Roving tabindex: the focused option holds tabIndex=0, the rest -1,
    so the menu participates correctly in the page's tab order
  - Selection closes the menu, restores focus to the trigger, and
    flows through the existing syncAll() so every other region
    selector updates in lock-step

region_box.py: defensive fallback in robusta_url_role so an
empty-after-strip label can never produce an empty anchor — if the
label half ends up blank, fall back to the URL as link text. Today's
regex can't actually emit an empty label, but the guard makes a
future regex tweak safe.
@aantn aantn merged commit 1f927f1 into master May 21, 2026
7 checks passed
@aantn aantn deleted the claude/add-region-selector-docs-kX1SI branch May 21, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants