Skip to content

feat: focus styling BED-8950#2979

Open
Holocraft wants to merge 2 commits into
mainfrom
BED-8864
Open

feat: focus styling BED-8950#2979
Holocraft wants to merge 2 commits into
mainfrom
BED-8864

Conversation

@Holocraft

@Holocraft Holocraft commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

This changeset adds focus state styling to all general inputs: buttons, text fields, toggles, etc. to adhere to WCAG standards. It also changes all tertiary buttons to secondary buttons.

Motivation and Context

Note that these changes are under a branch from a previous reversion story. Disregard and proceed as this was the new story branch BED-8950

Resolves BED-8950

How Has This Been Tested?

Manually

Screenshots (optional):

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

Summary by CodeRabbit

  • Style
    • Standardized button variants across dialogs and forms (notably changing “Cancel/Close” styling).
    • Refreshed design tokens for inputs, selects, toggles, carousels, tables, and other controls.
    • Updated focus-visible styling patterns and dark-mode appearance consistently.
  • Accessibility
    • Improved keyboard activation for selectable data table rows (Enter/Space).
    • Added/strengthened focus-visible indicators and accessible labeling (e.g., Tag dropdown).
  • Bug Fixes
    • Improved icon color/class consistency in dropdowns, search results, and zone displays.
    • Refined data table focus/selection visuals to match the new styling tokens.
  • Tests
    • Updated table selection assertion to use the new selected-row outline styling token.

@Holocraft Holocraft self-assigned this Jul 10, 2026
@Holocraft Holocraft added enhancement New feature or request user interface A pull request containing changes affecting the UI code. labels Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: c9576cf2-cb43-4531-a9bb-b0f221f9922b

📥 Commits

Reviewing files that changed from the base of the PR and between 25aeece and 436b3f8.

📒 Files selected for processing (1)
  • packages/javascript/bh-shared-ui/src/components/ExploreTable/ExploreTable.test.tsx

📝 Walkthrough

Walkthrough

This PR standardizes focus-ring and design-token styling across shared UI components, adds keyboard activation to data-table rows, refactors dropdown trigger ref forwarding, updates icon styling, and changes numerous application action buttons from tertiary to secondary.

Changes

Theme and component foundation

Layer / File(s) Summary
Theme tokens and focus utilities
packages/javascript/doodle-ui/src/tailwind/*, packages/javascript/bh-shared-ui/src/constants.ts
Theme variables, Tailwind color mappings, focus-ring utilities, and MUI focus overrides were expanded or standardized.
Doodle component styling and interaction
packages/javascript/doodle-ui/src/components/*, packages/javascript/bh-shared-ui/src/components/ExploreTable/ExploreTable.test.tsx
Shared controls, links, menus, dialogs, inputs, tables, and navigation components now use updated design tokens and focus-visible styling; data-table rows support keyboard activation and updated selection styling.
Dropdown and icon integration
packages/javascript/bh-shared-ui/src/components/DropdownSelector/*, SimpleEnvironmentSelector/*, SearchResultItem/*, NodeIcon/*, views/PrivilegeZones/ZoneIcon.tsx
Dropdown triggers use forwarded refs and shared option styles, while icons inherit updated hover, focus, and selection colors.
Application action styling
cmd/ui/src/views/*, packages/javascript/bh-shared-ui/src/components/*
Dialog, form, upload, navigation, privilege-zone, and token-management actions change button variants from tertiary to secondary; related input and navigation focus classes are updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: javascript

Suggested reviewers: KillahDillah, TheNando, dcairnsspecterops

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 is concise and matches the main change: improved focus styling with ticket reference BED-8950.
Description check ✅ Passed The description includes all required sections, an issue link, testing info, change type, and a completed checklist.
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.
✨ 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 BED-8864

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.

@coderabbitai coderabbitai Bot added the javascript Pull requests that update javascript code label Jul 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@packages/javascript/bh-shared-ui/src/constants.ts`:
- Around line 273-275: Update the checkbox styling near the `& svg` selector so
its primary color does not override disabled-state styling. Scope the selector
to non-disabled checkboxes, or remove the explicit SVG color and allow it to
inherit the root checkbox color while preserving active checkbox appearance.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: cbed1b06-eecc-4125-b594-90d87ce698aa

📥 Commits

Reviewing files that changed from the base of the PR and between 275141e and 25aeece.

📒 Files selected for processing (62)
  • cmd/ui/src/views/EarlyAccessFeatures/EarlyAccessFeatures.tsx
  • cmd/ui/src/views/Explore/ContextMenu/AssetGroupMenuItem.tsx
  • packages/javascript/bh-shared-ui/src/components/AssetGroupEdit/AssetGroupChangelogTable.tsx
  • packages/javascript/bh-shared-ui/src/components/CollectorCard/CollectorCard.tsx
  • packages/javascript/bh-shared-ui/src/components/ConfirmationDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/CreateUserForm/CreateUserForm.tsx
  • packages/javascript/bh-shared-ui/src/components/Disable2FADialog/Disable2FADialog.tsx
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownSelector.tsx
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownTrigger.tsx
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownTriggerContents.tsx
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/constants.ts
  • packages/javascript/bh-shared-ui/src/components/Enable2FADialog/Enable2FADialog.tsx
  • packages/javascript/bh-shared-ui/src/components/FileUploadDialog/FileUploadDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/Navigation/MainNav.tsx
  • packages/javascript/bh-shared-ui/src/components/NodeIcon/NodeIcon.tsx
  • packages/javascript/bh-shared-ui/src/components/OneTimePasscodeForm/OneTimePasscodeForm.tsx
  • packages/javascript/bh-shared-ui/src/components/PasswordDialog/PasswordDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/PasswordResetForm/PasswordResetForm.tsx
  • packages/javascript/bh-shared-ui/src/components/SchemaUploadDialog/SchemaUploadDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/SearchResultItem/SearchResultItem.tsx
  • packages/javascript/bh-shared-ui/src/components/SetupKeyDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/SimpleEnvironmentSelector/SimpleEnvironmentSelector.tsx
  • packages/javascript/bh-shared-ui/src/components/UpdateUserForm/UpdateUserForm.tsx
  • packages/javascript/bh-shared-ui/src/components/UpsertSSOProviders/UpsertOIDCProviderForm.tsx
  • packages/javascript/bh-shared-ui/src/components/UpsertSSOProviders/UpsertSAMLProviderForm/UpsertSAMLProviderForm.tsx
  • packages/javascript/bh-shared-ui/src/components/UserTokenManagementDialog/CreateUserTokenDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/UserTokenManagementDialog/TokenRevokeDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/UserTokenManagementDialog/UserTokenDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/UserTokenManagementDialog/UserTokenManagementDialog.tsx
  • packages/javascript/bh-shared-ui/src/constants.ts
  • packages/javascript/bh-shared-ui/src/views/Explore/ContextMenu/AssetGroupMenuItemPrivilegeZonesEnabled.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/EdgeFilter/EdgeFilteringDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/ConfirmDeleteQueryDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/SaveQueryActionMenu.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/TagToZoneLabel.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/GlyphSelectDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/ZoneIcon.tsx
  • packages/javascript/doodle-ui/src/components/Accordion/Accordion.tsx
  • packages/javascript/doodle-ui/src/components/Alert/Alert.tsx
  • packages/javascript/doodle-ui/src/components/Breadcrumbs/Breadcrumbs.tsx
  • packages/javascript/doodle-ui/src/components/Button/Button.tsx
  • packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx
  • packages/javascript/doodle-ui/src/components/Checkbox/Checkbox.tsx
  • packages/javascript/doodle-ui/src/components/DataTable/DataTable.tsx
  • packages/javascript/doodle-ui/src/components/DataTable/StorybookExample/utils.tsx
  • packages/javascript/doodle-ui/src/components/Dialog/Dialog.tsx
  • packages/javascript/doodle-ui/src/components/Input/Input.tsx
  • packages/javascript/doodle-ui/src/components/Link/Link.tsx
  • packages/javascript/doodle-ui/src/components/Menu/Menu.tsx
  • packages/javascript/doodle-ui/src/components/Pagination/Pagination.tsx
  • packages/javascript/doodle-ui/src/components/Popover/Popover.tsx
  • packages/javascript/doodle-ui/src/components/RadioGroup/RadioGroup.tsx
  • packages/javascript/doodle-ui/src/components/Select/Select.tsx
  • packages/javascript/doodle-ui/src/components/Switch/Switch.tsx
  • packages/javascript/doodle-ui/src/components/Table/Table.tsx
  • packages/javascript/doodle-ui/src/components/Tabs/Tabs.tsx
  • packages/javascript/doodle-ui/src/components/Textarea/Textarea.tsx
  • packages/javascript/doodle-ui/src/components/Toggle/Toggle.tsx
  • packages/javascript/doodle-ui/src/components/ToggleGroup/ToggleGroup.tsx
  • packages/javascript/doodle-ui/src/components/Tooltip/Tooltip.tsx
  • packages/javascript/doodle-ui/src/tailwind/plugin.ts
  • packages/javascript/doodle-ui/src/tailwind/preset.ts

Comment on lines 273 to 275
'& svg': {
color: palette.color.primary,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant section with line numbers
sed -n '240,320p' packages/javascript/bh-shared-ui/src/constants.ts | cat -n

# Search for checkbox-related overrides and disabled styling in the repo
rg -n --no-heading "MuiCheckbox|checkbox|Mui-disabled|& svg" packages/javascript/bh-shared-ui/src packages/javascript -g '!**/node_modules/**' || true

Repository: SpecterOps/BloodHound

Length of output: 2032


🌐 Web query:

MUI Checkbox disabled state icon color theme override svg color disabled checkbox styling

💡 Result:

To override the color of a disabled MUI Checkbox icon, you must target the global state class.Mui-disabled. Because MUI components use high-specificity state classes, you must use a nested selector within your component style overrides to ensure your CSS takes precedence [1][2]. Global Theme Override You can apply this globally through your theme configuration using components and styleOverrides [3]. Target the root slot and use the &.Mui-disabled selector: const theme = createTheme({ components: { MuiCheckbox: { styleOverrides: { root: { '&.Mui-disabled': { color: 'your-custom-color', // Replace with your desired color }, }, }, }, }, }); Important Considerations: 1. Specificity: Simply providing a disabled key in styleOverrides (if applicable to older versions) or relying solely on CSS may fail because.Mui-disabled has high specificity [1][2]. Always use the nested & selector as shown above to ensure your style is applied correctly [1]. 2. Icon Component: If you require complex changes beyond color, the Checkbox component accepts icon and checkedIcon props [4][5]. You can pass a custom SvgIcon and control its color logic dynamically based on the disabled prop [4]: <Checkbox disabled={true} icon={<SvgIcon component={YourCustomIcon} style={{ color: isDisabled? 'gray': 'blue' }} />} /> 3. Palette Defaults: Alternatively, you can modify the default disabled opacity or color globally via the palette configuration in your theme, though this will affect all components, not just the Checkbox [6]: const theme = createTheme({ palette: { action: { disabled: 'your-custom-color', disabledOpacity: 0.5, }, }, }); For most use cases, the component-level styleOverride using the &.Mui-disabled selector is the recommended and most precise approach [1][3].

Citations:


Preserve disabled checkbox styling. The unconditional & svg color overrides the disabled state, so disabled checkboxes can still look active. Scope this to non-disabled checkboxes or let the icon inherit the root color.

🤖 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 `@packages/javascript/bh-shared-ui/src/constants.ts` around lines 273 - 275,
Update the checkbox styling near the `& svg` selector so its primary color does
not override disabled-state styling. Scope the selector to non-disabled
checkboxes, or remove the explicit SVG color and allow it to inherit the root
checkbox color while preserving active checkbox appearance.

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

Labels

enhancement New feature or request javascript Pull requests that update javascript code user interface A pull request containing changes affecting the UI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant