Skip to content

chore: Button Refactor - BED-6463 - #3030

Open
KillahDillah wants to merge 30 commits into
mainfrom
BED-6463-button-refactor
Open

chore: Button Refactor - BED-6463 #3030
KillahDillah wants to merge 30 commits into
mainfrom
BED-6463-button-refactor

Conversation

@KillahDillah

@KillahDillah KillahDillah commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Button refactor!!!

Updated Button base with BaseUI, updated tests, replaces Icon and Text Buttons with new TextButton and IconButton. Updated color scheme. Left tons of notes for future tickets.

Motivation and Context

Resolves BED-6463

Figma links:
https://www.figma.com/design/pqlfSCxXVB5MjX5Gq50rW8/Alpha-%F0%9F%90%95?node-id=9-12&p=f&m=dev
https://www.figma.com/design/pqlfSCxXVB5MjX5Gq50rW8/Alpha-%F0%9F%90%95?node-id=431-1937&m=dev

Why is this change required? What problem does it solve?
Updated styling for Button,
split text variant and icon variant
replaced old text and icon buttons to use the new version
removed bad focus styling
and other no broken glass areas

How Has This Been Tested?

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Manually with screen reader and keyboard navigation, visually, test suite passes

Screenshots (optional):

Updated styling:
OLD:
Screenshot 2026-07-28 at 4 55 15 PM
NEW:
Screenshot 2026-07-28 at 4 55 08 PM

OLD:
Screenshot 2026-07-28 at 4 56 08 PM
Screenshot 2026-07-28 at 5 30 02 PM
NEW:
Screenshot 2026-07-28 at 4 56 03 PM
Screenshot 2026-07-28 at 5 29 54 PM

OLD:
Screenshot 2026-07-27 at 1 31 31 PM
NEW:
Screenshot 2026-07-30 at 3 58 28 PM

OLD:
Screenshot 2026-07-28 at 5 51 04 PM
NEW:
Screenshot 2026-07-28 at 5 50 55 PM

OLD:
Screenshot 2026-07-30 at 4 28 13 PM
Screenshot 2026-07-30 at 4 27 23 PM

NEW:
Screenshot 2026-07-30 at 4 28 30 PM
Screenshot 2026-07-30 at 4 27 54 PM

OLD:
Screenshot 2026-07-28 at 6 42 39 PM
NEW:
Screenshot 2026-07-28 at 6 42 33 PM

OLD:
Screenshot 2026-07-30 at 3 59 25 PM
Screenshot 2026-07-30 at 4 00 14 PM

NEW:
Screenshot 2026-07-30 at 3 59 06 PM
Screenshot 2026-07-30 at 4 20 20 PM

STORYBOOK:
Screenshot 2026-07-30 at 4 03 32 PM

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Database Migrations

Checklist:

Summary by CodeRabbit

  • New Features

    • Added refreshed text and icon button styles across dialogs, menus, forms, tables, and navigation.
    • Improved dropdown, accordion, filter, and selection controls with clearer interaction states and accessibility labels.
    • Added consistent elevation and focus styling for cards, popovers, and interactive elements.
  • Bug Fixes

    • Improved dark-mode contrast and warning-state visibility.
    • Corrected spacing and layout in several views.
  • Tests

    • Updated UI tests to use more reliable element selectors.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR replaces the legacy button implementation with Base UI-backed Button, TextButton, and IconButton components, updates related theme tokens and stories, and migrates controls across shared UI, Explore, privilege-zone, and management views.

Changes

Shared button migration

Layer / File(s) Summary
Button API, stories, and theme foundation
package.json, packages/javascript/doodle-ui/src/components/Button/*, packages/javascript/doodle-ui/src/components/{Calendar,Card,Carousel,DatePicker}/*, packages/javascript/doodle-ui/src/tailwind/*
Button uses Base UI, TextButton and IconButton are exported, stories and consumers are updated, and elevation/focus-ring styling is changed.
Application controls
packages/javascript/bh-shared-ui/src/components/*, packages/javascript/bh-shared-ui/src/views/Explore/*, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/*, packages/javascript/bh-shared-ui/src/views/OpenGraphManagement/*
Dialogs, selectors, navigation, tables, forms, accordions, links, and icon controls adopt the revised button components and associated styling.
JSX and layout normalization
cmd/ui/src/views/EarlyAccessFeatures/*, packages/javascript/bh-shared-ui/src/components/{EntityInfo,GroupManagementContent,LoginForm,LoginViaSSOForm}/*
Static JSX values, button variants, spacing, icon styling, and selected accessibility attributes are normalized.

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

Possibly related PRs

Suggested labels: enhancement, javascript

Suggested reviewers: maffkipp, thenando

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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
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.
Title check ✅ Passed The title clearly identifies the primary change as a Button refactor and includes the associated ticket.
Description check ✅ Passed The description covers the required sections and provides the ticket, motivation, testing summary, screenshots, change type, and checklist.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch BED-6463-button-refactor

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

@KillahDillah KillahDillah changed the title Bed 6463 button refactor chore: Button Refactor - BED-6463 Jul 30, 2026
@KillahDillah KillahDillah self-assigned this Jul 30, 2026
@KillahDillah KillahDillah added the user interface A pull request containing changes affecting the UI code. label Jul 30, 2026
@KillahDillah
KillahDillah marked this pull request as ready for review July 30, 2026 21:43
@KillahDillah
KillahDillah requested review from a team as code owners July 30, 2026 21:43
@coderabbitai coderabbitai Bot added enhancement New feature or request javascript Pull requests that update javascript code labels Jul 30, 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: 12

Caution

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

⚠️ Outside diff range comments (1)
packages/javascript/doodle-ui/src/tailwind/plugin.ts (1)

519-526: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Commenting out --tw-ring-color leaves --tw-ring-shadow resolving to Tailwind's default ring color.

--tw-ring-shadow on line 525 still interpolates var(--tw-ring-color), which Tailwind's base layer defaults to its blue (rgb(59 130 246 / 0.5)). So .focus-ring now paints a correct-colored outline plus a blue box-shadow ring underneath it. If the box-shadow ring is no longer wanted, remove the ring variables/box-shadow entirely rather than only the color.

🎨 Option: keep only the outline-based ring
         '.focus-ring': {
             outline: 'var(--focus-ring-width) solid var(--focus-ring)',
             'outline-offset': 'var(--focus-ring-offset-width)',
-            '--tw-ring-offset-width': 'var(--focus-ring-offset-width)',
-            '--tw-ring-offset-color': 'var(--focus-ring-offset)',
-            // TODO causes issues with Text
-            // '--tw-ring-color': 'var(--focus-ring)',
-            '--tw-ring-offset-shadow': '0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)',
-            '--tw-ring-shadow':
-                '0 0 0 calc(var(--focus-ring-width) + var(--tw-ring-offset-width)) var(--tw-ring-color)',
-            'box-shadow': 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 `#0000`)',
         },
🤖 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/doodle-ui/src/tailwind/plugin.ts` around lines 519 - 526,
Update the focus-ring styles around the commented-out --tw-ring-color and
--tw-ring-shadow declarations so the component no longer renders Tailwind’s
default blue box-shadow ring; remove the ring-related variables and box-shadow
when keeping the outline-only behavior, while preserving the correctly colored
outline.
🧹 Nitpick comments (8)
packages/javascript/doodle-ui/src/components/Button/Button.stories.tsx (2)

135-146: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Drop the commented-out variant argType block.

🤖 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/doodle-ui/src/components/Button/Button.stories.tsx`
around lines 135 - 146, Remove the commented-out variant entry from the argTypes
configuration, leaving the active fontColor configuration unchanged.

204-218: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

aria-label values don't match the rendered icons.

Line 210 labels a star icon as "Gear Icon", and line 216 labels a filter icon the same way. Since these stories are the reference for IconButton accessibility usage, the labels should describe the actual action/icon.

🤖 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/doodle-ui/src/components/Button/Button.stories.tsx`
around lines 204 - 218, The aria-label values on the secondary and disabled
IconButtonComponent examples do not match their rendered icons. Update the
labels in the Button stories so the secondary star button describes the star
icon and the disabled AppIcon.FilterOutline button describes the filter icon,
while leaving the primary example unchanged.
packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx (1)

20-20: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer the package entrypoint over the deep path.

TextButtonVariants is re-exported from ../Button; importing from ../Button/Button bypasses the module boundary the index file establishes.

🤖 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/doodle-ui/src/components/Calendar/Calendar.tsx` at line
20, Update the TextButtonVariants import in Calendar.tsx to use the ../Button
package entrypoint instead of the deep ../Button/Button path, preserving the
existing symbol usage.
packages/javascript/doodle-ui/src/components/Button/index.ts (1)

16-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Also export the new prop types.

TextButtonProps/IconButtonProps (and IconButtonVariants) aren't re-exported, so wrapper components in bh-shared-ui must deep-import from ./Button to type their props.

♻️ Proposed export
-export { Button, ButtonVariants, IconButton, TextButton, TextButtonVariants, type ButtonProps } from './Button';
+export {
+    Button,
+    ButtonVariants,
+    IconButton,
+    IconButtonVariants,
+    TextButton,
+    TextButtonVariants,
+    type ButtonProps,
+    type IconButtonProps,
+    type TextButtonProps,
+} from './Button';
🤖 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/doodle-ui/src/components/Button/index.ts` at line 16,
Update the barrel export in the Button component index to re-export
TextButtonProps, IconButtonProps, and IconButtonVariants alongside the existing
Button symbols, allowing consumers to import these prop types without
deep-importing the implementation module.
packages/javascript/doodle-ui/src/components/Button/Button.tsx (2)

69-72: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

fontColor on ButtonVariants is now dead surface.

Its own TODO says the only consumer was variant="text", which this PR removed, and TextButton owns fontColor going forward. Consider dropping it from ButtonVariants/ButtonProps so the public Button API doesn't expose a no-op prop.

🤖 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/doodle-ui/src/components/Button/Button.tsx` around lines
69 - 72, Remove the obsolete fontColor variant from ButtonVariants and
ButtonProps, including its primary text-primary mapping, since Button no longer
consumes it. Keep fontColor owned by TextButton and ensure the public Button API
no longer exposes this no-op prop.

202-206: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated sizing/shape classes.

IconButtonVariants already emits rounded-full border-0 p-2 and size-fit/shrink-0; repeating them inline (plus has-[svg]:p-2) just adds twMerge work and two places to keep in sync. Fold the extra classes into the cva base.

🤖 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/doodle-ui/src/components/Button/Button.tsx` around lines
202 - 206, Update the cva base used by IconButtonVariants to include the shared
sizing and shape classes currently duplicated in the Button className, including
the SVG padding behavior; then remove those duplicates from the inline class
list while preserving unrelated classes and variant handling.
packages/javascript/doodle-ui/src/tailwind/plugin.ts (1)

129-130: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Dangling // TODO remove.

The marker is only added in the light :root block; the same --tertiary-btn-border in .dark (line 373) is unannotated, so the cleanup will be easy to miss. Want me to open a tracking issue?

🤖 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/doodle-ui/src/tailwind/plugin.ts` around lines 129 - 130,
Remove the dangling TODO comment above --tertiary-btn-border in the light :root
block; leave the variable and the corresponding dark-mode definition unchanged.
packages/javascript/bh-shared-ui/src/components/LabelWithCopy.tsx (1)

19-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use IconButton for this icon-only control.

This renders only a copy icon; packages/javascript/bh-shared-ui/src/components/Icon.tsx uses IconButton for the same aria-label + icon pattern. Using it here keeps icon-only sizing and focus behavior consistent.

Proposed change
-import { TextButton, Tooltip } from 'doodle-ui';
+import { IconButton, Tooltip } from 'doodle-ui';

-                <TextButton
+                <IconButton
                     onClick={handleCopy}
                     aria-label='Copy to clipboard'
                     className={cn('text-inherit text-sm', { invisible: !(!hoverOnly || hoverActive) })}>
                     <FontAwesomeIcon icon={faCopy} />
-                </TextButton>
+                </IconButton>

Also applies to: 52-57

🤖 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/components/LabelWithCopy.tsx` at line
19, Update the icon-only copy control in LabelWithCopy to use IconButton instead
of TextButton, following the aria-label and icon usage established in Icon.tsx.
Preserve the existing copy action and accessible label while adopting
IconButton’s consistent sizing and focus 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.

Inline comments:
In `@package.json`:
- Around line 57-59: Move the `@base-ui/react` dependency from the root
package.json dependencies into packages/javascript/doodle-ui/package.json,
preserving its current version range. Ensure the doodle-ui package directly
declares the runtime dependency required by its `@base-ui/react/button` import.

In
`@packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx`:
- Around line 97-102: Update the IconButton in
packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx
lines 97-102 to use the accessible name “Open file ingest filters”. In
packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx
line 98 and
packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestTable.test.tsx
line 243, replace data-testid queries with role-based button queries matching
that accessible name.

In
`@packages/javascript/bh-shared-ui/src/components/HelpTexts/CodeController/CodeController.tsx`:
- Line 128: Replace the div wrapper in the CodeController markup with a phrasing
element, preserving its existing className and contents, so it remains valid
inside the Typography component='pre' container.

In
`@packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/CypherSearch.tsx`:
- Around line 339-340: Update the class names in the CypherSearch editor styling
to use descendant selectors for nested CodeMirror elements: change the
cm-content and cm-tooltip selectors in the affected class list to the underscore
descendant forms, preserving all other classes and behavior.

In
`@packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/CommonSearches.tsx`:
- Around line 182-188: Update the TextButton rendering in CommonSearches to
expose the saved-queries state with aria-expanded bound to showCommonQueries and
aria-controls referencing the controlled panel’s existing id. Ensure the panel
has a matching stable id while preserving the current toggle behavior.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Filters/DateField.tsx`:
- Around line 60-68: Add an accessible aria-label to the icon-only TextButton in
the date field clear-control handler, identifying that it clears the selected
date. Preserve the existing disabled state, visibility styling, and
form.setValue/form.clearErrors behavior.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/FilterDialog/FilterDialog.tsx`:
- Around line 126-130: Update the confirm TextButton in FilterDialog so it no
longer triggers native form submission after handleConfirm; use a non-submit
button type while preserving the existing click handler and confirmation
behavior.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/GlyphSelectDialog.tsx`:
- Around line 158-162: Update the IconButton in GlyphSelectDialog to use an
accessible name that describes clearing the selection, replacing the
glyph-focused aria-label; remove or correct the invalid aria-describedby value
so it references an actual element ID only if needed.

In `@packages/javascript/doodle-ui/src/components/Button/Button.stories.tsx`:
- Around line 36-42: Update the Button story controls to expose only currently
supported values: remove `text` from the `options` array and remove `default`
from `fontColor.options`, leaving `primary` as the sole font color option. Clean
up the associated stale TODO/commented configuration in the story.

In `@packages/javascript/doodle-ui/src/components/Button/Button.tsx`:
- Around line 21-28: The shared buttonBaseClasses currently applies
hover:underline to filled variants; remove that utility from the shared base and
add it to TextButtonBaseClasses so only text-style buttons underline on hover.
Preserve transparent, primary, secondary, and IconButton hover behavior without
introducing per-variant resets.

In `@packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx`:
- Line 58: Invoke the TextButtonVariants cva factory before passing its result
to cn/clsx in the Calendar configuration, updating nav_button, day, and the
caption SelectTrigger className. Preserve the existing text-button variant
styling by using the factory with the text variant rather than passing
TextButtonVariants itself.

In `@packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx`:
- Around line 211-220: Update CarouselPrev and CarouselNext in
packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx at lines
211-220 and 257-266: type both forwardRef props as React.ComponentProps<typeof
TextButton> instead of Button props, and remove size='small' from both
TextButton usages.

---

Outside diff comments:
In `@packages/javascript/doodle-ui/src/tailwind/plugin.ts`:
- Around line 519-526: Update the focus-ring styles around the commented-out
--tw-ring-color and --tw-ring-shadow declarations so the component no longer
renders Tailwind’s default blue box-shadow ring; remove the ring-related
variables and box-shadow when keeping the outline-only behavior, while
preserving the correctly colored outline.

---

Nitpick comments:
In `@packages/javascript/bh-shared-ui/src/components/LabelWithCopy.tsx`:
- Line 19: Update the icon-only copy control in LabelWithCopy to use IconButton
instead of TextButton, following the aria-label and icon usage established in
Icon.tsx. Preserve the existing copy action and accessible label while adopting
IconButton’s consistent sizing and focus behavior.

In `@packages/javascript/doodle-ui/src/components/Button/Button.stories.tsx`:
- Around line 135-146: Remove the commented-out variant entry from the argTypes
configuration, leaving the active fontColor configuration unchanged.
- Around line 204-218: The aria-label values on the secondary and disabled
IconButtonComponent examples do not match their rendered icons. Update the
labels in the Button stories so the secondary star button describes the star
icon and the disabled AppIcon.FilterOutline button describes the filter icon,
while leaving the primary example unchanged.

In `@packages/javascript/doodle-ui/src/components/Button/Button.tsx`:
- Around line 69-72: Remove the obsolete fontColor variant from ButtonVariants
and ButtonProps, including its primary text-primary mapping, since Button no
longer consumes it. Keep fontColor owned by TextButton and ensure the public
Button API no longer exposes this no-op prop.
- Around line 202-206: Update the cva base used by IconButtonVariants to include
the shared sizing and shape classes currently duplicated in the Button
className, including the SVG padding behavior; then remove those duplicates from
the inline class list while preserving unrelated classes and variant handling.

In `@packages/javascript/doodle-ui/src/components/Button/index.ts`:
- Line 16: Update the barrel export in the Button component index to re-export
TextButtonProps, IconButtonProps, and IconButtonVariants alongside the existing
Button symbols, allowing consumers to import these prop types without
deep-importing the implementation module.

In `@packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx`:
- Line 20: Update the TextButtonVariants import in Calendar.tsx to use the
../Button package entrypoint instead of the deep ../Button/Button path,
preserving the existing symbol usage.

In `@packages/javascript/doodle-ui/src/tailwind/plugin.ts`:
- Around line 129-130: Remove the dangling TODO comment above
--tertiary-btn-border in the light :root block; leave the variable and the
corresponding dark-mode definition unchanged.
🪄 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: 7d5dcd0d-4779-4f0b-9dda-ddb07c5c24af

📥 Commits

Reviewing files that changed from the base of the PR and between 74dd3da and 156285d.

⛔ Files ignored due to path filters (10)
  • .yarn/cache/@babel-runtime-npm-7.29.7-423e8cd4b6-9883b49517.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/@base-ui-react-npm-1.6.0-b96a743958-7fed3b731e.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/@base-ui-utils-npm-0.3.1-7fda044f8e-48fe7f0b1a.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/@floating-ui-core-npm-1.8.0-7cb6ad2d03-762cd5677f.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/@floating-ui-dom-npm-1.8.0-a6d2aa48a8-2e7d75fb70.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/@floating-ui-react-dom-npm-2.1.9-751127e598-d775609760.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/@floating-ui-utils-npm-0.2.12-72e5a495e8-ec4e176fb2.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/reselect-npm-5.2.0-4fd7475b1f-e53d37a35f.zip is excluded by !**/.yarn/**, !**/*.zip
  • .yarn/cache/use-sync-external-store-npm-1.6.0-2db2af616d-b40ad2847b.zip is excluded by !**/.yarn/**, !**/*.zip
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (60)
  • cmd/ui/src/views/EarlyAccessFeatures/EarlyAccessFeatures.tsx
  • package.json
  • packages/javascript/bh-shared-ui/src/components/AnalyzeNowConfiguration/AnalyzeNowConfirmDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/CitrixRDPConfiguration/CitrixRDPConfirmDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/ColumnHeaders/ColumnHeaders.tsx
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownSelector.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/EntityInfo/EntityInfoHeader.tsx
  • packages/javascript/bh-shared-ui/src/components/ExploreTable/TableControls.tsx
  • packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx
  • packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/GroupManagementContent/GroupManagementContent.tsx
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/CodeController/CodeController.tsx
  • packages/javascript/bh-shared-ui/src/components/Icon.tsx
  • packages/javascript/bh-shared-ui/src/components/LabelWithCopy.tsx
  • packages/javascript/bh-shared-ui/src/components/LoginForm/LoginForm.tsx
  • packages/javascript/bh-shared-ui/src/components/LoginViaSSOForm/LoginViaSSOForm.tsx
  • packages/javascript/bh-shared-ui/src/components/Navigation/MainNav.tsx
  • packages/javascript/bh-shared-ui/src/components/SSOProviderTable/SSOProviderTable.tsx
  • packages/javascript/bh-shared-ui/src/components/SimpleEnvironmentSelector/SimpleEnvironmentSelector.tsx
  • packages/javascript/bh-shared-ui/src/components/UserTokenManagementDialog/UserTokenManagementDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/CypherSearch.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/EdgeFilter/EdgeFilteringDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/CommonSearches.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/ConfirmDeleteQueryDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/ConfirmUpdateQueryDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/ImportQueryDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/QuerySearchFilter.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/SaveQueryDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/TagToZoneLabel.tsx
  • packages/javascript/bh-shared-ui/src/views/OpenGraphManagement/ActiveExtensionsCard.tsx
  • packages/javascript/bh-shared-ui/src/views/OpenGraphManagement/DeleteExtensionButton.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectsAccordion.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/RulesAccordion.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/SearchBar.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Filters/DateField.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Filters/TagIdField.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/FilterDialog/ActionField.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/FilterDialog/FilterDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/FilterDialog/MadeByField.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/NoteCell.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/DeleteRuleButton/DeleteRuleButton.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/ObjectSelect.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelectionPreview.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/GlyphSelectDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/TagForm.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/ZoneIcon.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/fragments.tsx
  • packages/javascript/doodle-ui/src/components/Button/Button.stories.tsx
  • packages/javascript/doodle-ui/src/components/Button/Button.tsx
  • packages/javascript/doodle-ui/src/components/Button/index.ts
  • packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx
  • packages/javascript/doodle-ui/src/components/Card/Card.tsx
  • packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx
  • packages/javascript/doodle-ui/src/components/DatePicker/DatePicker.tsx
  • packages/javascript/doodle-ui/src/tailwind/plugin.ts
  • packages/javascript/doodle-ui/src/tailwind/preset.ts

Comment thread package.json Outdated
Comment on lines +57 to +59
"dependencies": {
"@base-ui/react": "^1.6.0"
}

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
# 1) Does doodle-ui declare the dep itself?
fd -t f 'package.json' packages/javascript/doodle-ui --max-depth 2 --exec cat
# 2) Where is it imported from?
rg -n --type=ts --type=tsx '`@base-ui`' packages cmd || rg -n '`@base-ui`' -g '*.ts*' .
# 3) Registry check for both candidate names
for p in "`@base-ui/react`" "`@base-ui-components/react`"; do
  echo "== $p =="
  curl -s "https://registry.npmjs.org/$(printf %s "$p" | sed 's|/|%2F|')" | jq -r '.name? // "NOT FOUND", ("latest: " + (.["dist-tags"].latest // "n/a"))'
done

Repository: SpecterOps/BloodHound

Length of output: 5516


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== root package.json =="
cat -n package.json | sed -n '1,220p'

echo
echo "== workspace package manifests =="
fd -t f 'package.json' packages | sort

echo
echo "== base-ui imports and declarations =="
rg -n '`@base-ui/react`|`@base-ui-components/react`' package.json packages -g 'package.json' -g '*.ts' -g '*.tsx'

Repository: SpecterOps/BloodHound

Length of output: 3435


Move @base-ui/react into packages/javascript/doodle-ui/package.json. The workspace package imports @base-ui/react/button, but the dependency is only listed at the repo root, so consumers of doodle-ui won’t get a declared runtime dependency.

🤖 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 `@package.json` around lines 57 - 59, Move the `@base-ui/react` dependency from
the root package.json dependencies into
packages/javascript/doodle-ui/package.json, preserving its current version
range. Ensure the doodle-ui package directly declares the runtime dependency
required by its `@base-ui/react/button` import.

Comment on lines +97 to +102
<IconButton
aria-label='Open file ingest'
variant='secondary'
data-testid='file_ingest_log-open_filter_dialog'>
<AppIcon.FilterOutline size={22} />
</Button>
</IconButton>

@coderabbitai coderabbitai Bot Jul 30, 2026

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

echo '--- FileIngestFilterDialog.tsx (around trigger) ---'
sed -n '80,115p' packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx

echo
echo '--- FileIngest.test.tsx (around queried button) ---'
sed -n '70,120p' packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx

echo
echo '--- Search for related accessible names and test ids ---'
rg -n "file_ingest_log-open_filter_dialog|Open file ingest|Open file ingest filters|getByRole\\(|getByTestId\\(" packages/javascript/bh-shared-ui/src/components/FileIngestTable packages/javascript/bh-shared-ui/src/components/FileIngest

Repository: SpecterOps/BloodHound

Length of output: 7117


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'FILE1\n'
nl -ba packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx | sed -n '90,110p'

printf '\nFILE2\n'
nl -ba packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx | sed -n '90,110p'

printf '\nMATCHES\n'
rg -n "file_ingest_log-open_filter_dialog|Open file ingest|Open file ingest filters|getByRole\\(|getByTestId\\(" packages/javascript/bh-shared-ui/src/components/FileIngestTable packages/javascript/bh-shared-ui/src/components/FileIngest

Repository: SpecterOps/BloodHound

Length of output: 205


Give the filter trigger a clearer accessible name and assert it by role.

  • packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx#L97-L102: aria-label='Open file ingest' should be action-specific, e.g. Open file ingest filters.
  • packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx#L98-L98 and packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestTable.test.tsx#L243-L243: query the button by role + accessible name instead of data-testid.
📍 Affects 2 files
  • packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx#L97-L102 (this comment)
  • packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx#L98-L98
🤖 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/components/FileIngestTable/FileIngestFilterDialog.tsx`
around lines 97 - 102, Update the IconButton in
packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx
lines 97-102 to use the accessible name “Open file ingest filters”. In
packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx
line 98 and
packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestTable.test.tsx
line 243, replace data-testid queries with role-based button queries matching
that accessible name.

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.

This is worth addressing

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.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- trigger implementation ---'
sed -n '90,106p' packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx

echo
echo '--- trigger references in tests ---'
rg -n -C 4 \
  "file_ingest_log-open_filter_dialog|getByRole\(\s*['\"]button['\"]|Open file ingest filters" \
  packages/javascript/bh-shared-ui/src/components/FileIngest/FileIngest.test.tsx \
  packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestTable.test.tsx

Length of output: 8145


@specter-flq, the accessible name is already correct. The remaining valid change is to update the two tests to use the button role and the accessible name.

  • Update FileIngest.test.tsx to locate the filter trigger by role and name.
  • Update FileIngestTable.test.tsx to locate the same trigger by role and name.

  • 📌 Create a pull request with these changes

You are interacting with an AI system.

Comment thread packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/CypherSearch.tsx Outdated
Comment on lines +182 to +188
<TextButton
onClick={onToggleCommonQueries}
className='flex justify-start items-center w-full pl-0'
data-testid='common-queries-toggle'
variant={'text'}>
<FontAwesomeIcon className='px-2 mr-2' icon={showCommonQueries ? faChevronDown : faChevronUp} />
data-testid='common-queries-toggle'>
<FontAwesomeIcon className='px-2' icon={showCommonQueries ? faChevronDown : faChevronUp} />
<span className='my-4 font-semibold text-lg'>Saved Queries</span>
</Button>
</TextButton>

@coderabbitai coderabbitai Bot Jul 30, 2026

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

Expose the saved-queries toggle state to assistive technology.

Add aria-expanded={showCommonQueries} and aria-controls referencing the controlled panel’s id; the chevron alone does not communicate the current state to screen-reader users.

🤖 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/views/Explore/ExploreSearch/SavedQueries/CommonSearches.tsx`
around lines 182 - 188, Update the TextButton rendering in CommonSearches to
expose the saved-queries state with aria-expanded bound to showCommonQueries and
aria-controls referencing the controlled panel’s existing id. Ensure the panel
has a matching stable id while preserving the current toggle behavior.

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.

not really knowledgeable in a11y but maybe worth while looking into this one

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.

@specter-flq, this is worthwhile as a small accessibility improvement.

The current code already adds aria-expanded={showCommonQueries}. That lets screen readers announce whether Saved Queries is expanded or collapsed.

The remaining aria-controls and matching panel id are low-risk additions. They explicitly associate the toggle with its controlled content. This does not change behavior or layout.

I recommend keeping this as a minor fix in this PR.

You are interacting with an AI system.

Comment on lines +21 to +28
const buttonBaseClasses = [
'inline-flex items-center justify-center whitespace-nowrap rounded-3xl transition-colors',
'hover:underline',
'focus:outline-none focus-visible:focus-ring',
'active:no-underline',
'disabled:text-[#616161] dark:disabled:text-[#A6A6A6] disabled:pointer-events-none disabled:opacity-50',
'has-[svg]:gap-2 [&>svg]:shrink-0',
];

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

hover:underline in the shared base now applies to filled Button variants.

transparent explicitly resets it with hover:no-underline, but primary/secondary (and IconButton, which reuses these base classes) don't, so filled buttons will underline their label on hover. If underline is only intended for text-style buttons, move it out of the base into TextButtonBaseClasses.

🎨 Proposed adjustment
 const buttonBaseClasses = [
     'inline-flex items-center justify-center whitespace-nowrap rounded-3xl transition-colors',
-    'hover:underline',
     'focus:outline-none focus-visible:focus-ring',
     'active:no-underline',
 const TextButtonBaseClasses = cn(
     ...buttonBaseClasses,
+    'hover:underline',
     'px-1 py-2 has-[svg]:px-1',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const buttonBaseClasses = [
'inline-flex items-center justify-center whitespace-nowrap rounded-3xl transition-colors',
'hover:underline',
'focus:outline-none focus-visible:focus-ring',
'active:no-underline',
'disabled:text-[#616161] dark:disabled:text-[#A6A6A6] disabled:pointer-events-none disabled:opacity-50',
'has-[svg]:gap-2 [&>svg]:shrink-0',
];
const buttonBaseClasses = [
'inline-flex items-center justify-center whitespace-nowrap rounded-3xl transition-colors',
'focus:outline-none focus-visible:focus-ring',
'active:no-underline',
'disabled:text-[`#616161`] dark:disabled:text-[`#A6A6A6`] disabled:pointer-events-none disabled:opacity-50',
'has-[svg]:gap-2 [&>svg]:shrink-0',
];
🤖 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/doodle-ui/src/components/Button/Button.tsx` around lines
21 - 28, The shared buttonBaseClasses currently applies hover:underline to
filled variants; remove that utility from the shared base and add it to
TextButtonBaseClasses so only text-style buttons underline on hover. Preserve
transparent, primary, secondary, and IconButton hover behavior without
introducing per-variant resets.

Comment thread packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx Outdated
Comment thread packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx Outdated

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

🧹 Nitpick comments (1)
packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownTriggerContents.tsx (1)

50-50: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the render-time debug log.

console.log(open) runs on every render and will pollute production browser consoles.

Proposed fix
-        console.log(open);
🤖 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/components/DropdownSelector/DropdownTriggerContents.tsx`
at line 50, Remove the console.log(open) debug statement from the
DropdownTriggerContents render path, leaving the surrounding component behavior
unchanged.
🤖 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.

Nitpick comments:
In
`@packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownTriggerContents.tsx`:
- Line 50: Remove the console.log(open) debug statement from the
DropdownTriggerContents render path, leaving the surrounding component behavior
unchanged.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 5c1b5cb5-7661-4524-a6fa-44dcc362c602

📥 Commits

Reviewing files that changed from the base of the PR and between 156285d and e073f46.

📒 Files selected for processing (2)
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownTriggerContents.tsx
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/constants.ts

@KillahDillah
KillahDillah force-pushed the BED-6463-button-refactor branch from 93207eb to 7d31fd0 Compare July 30, 2026 22:41

@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/doodle-ui/src/components/Carousel/Carousel.tsx`:
- Around line 212-220: Add accessible labels to both carousel controls: update
the previous-slide TextButton near Carousel controls at
packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx lines 212-220
with aria-label “Previous slide”, and the next-slide TextButton at lines 259-267
with aria-label “Next slide”.
🪄 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: 06794829-585c-46f8-a3af-f2326f782995

📥 Commits

Reviewing files that changed from the base of the PR and between e073f46 and 7d31fd0.

📒 Files selected for processing (9)
  • packages/javascript/bh-shared-ui/src/components/DropdownSelector/DropdownTriggerContents.tsx
  • packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/CodeController/CodeController.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/CypherSearch.tsx
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/CommonSearches.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/GlyphSelectDialog.tsx
  • packages/javascript/doodle-ui/src/components/Button/Button.stories.tsx
  • packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx
  • packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/CommonSearches.tsx
  • packages/javascript/doodle-ui/src/components/Calendar/Calendar.tsx
  • packages/javascript/bh-shared-ui/src/components/FileIngestTable/FileIngestFilterDialog.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/GlyphSelectDialog.tsx

Comment thread packages/javascript/doodle-ui/src/components/Carousel/Carousel.tsx Outdated
@KillahDillah
KillahDillah force-pushed the BED-6463-button-refactor branch from 9278f72 to 88dff3c Compare August 3, 2026 19:59
</Button>
</Tooltip>
<TextButton
className={cn(optionStyles)}

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.

We don't need the cn utility here.

tip='Collapse All'
onClick={handleCollapseAll}
className='box-border text-contrast px-4'
className='box-border text-contrast px-4 mx-2'

@Holocraft Holocraft Aug 3, 2026

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.

This looks like it's adding unnecessary margin and shrinking the object text. Was this requested by design?

Image

Old:
Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good catch

<Button
className='pr-0'
<TextButton
className='pr-2'

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.

nit: this can be removed as it gets px-1 from the component.

@KillahDillah
KillahDillah force-pushed the BED-6463-button-refactor branch from 9482aa6 to 6139db3 Compare August 3, 2026 22:08
@KillahDillah
KillahDillah force-pushed the BED-6463-button-refactor branch from 6139db3 to d552371 Compare August 3, 2026 22:15

<DialogActions>
<Button variant={'text'} className='p-2' onClick={closeDialog}>
<TextButton className='pr-2' onClick={closeDialog}>

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.

nit: can remove pr-2 as it gets padding from the component.

className={cn('text-contrast', iconClasses)}
data-testid='tier_zero_icon'
/>
<AppIcon.TierZero {...iconProps} size={16} className={cn(iconClasses)} data-testid='tier_zero_icon' />

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.

No need for the cn utility here.

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.

Love that we are getting rid of MUI here. I didn't see the change on bhe, was that on purpose ? if not maybe we should consider removing the makeStyles in the same file over there to keep it consistent.

<div data-testid='explore_search-container' className='h-full min-h-0 w-[600px] flex gap-4 flex-col rounded'>
<div
className='h-10 w-full flex gap-1 rounded-lg shadow-outer-1 pointer-events-auto bg-[#f4f4f4] dark:bg-[#222222]'
className='h-10 w-full flex gap-1 items-center rounded-lg shadow-outer-1 pointer-events-auto bg-[#f4f4f4] dark:bg-[#222222]'

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.

Not sure if you maybe were waiting on this for later, but should we consider replacing with respective color tokens or similar to those hardcoded values?

it('displays a Filters button', async () => {
await act(async () => render(<FileIngest />));
const filterButton = screen.getByRole('button', { name: /app-icon-filter-outline/i });
const filterButton = screen.getByTestId('file_ingest_log-open_filter_dialog');

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.

We should consider getting by role over testId I think thats the preferred priority of the library. Also the rabbit makes a comment about it below.

className={cn(
'grow min-h-0 bg-[#f4f4f4] dark:bg-[#222222] shadow-outer-1 p-2 py-0 rounded-lg mb-4'
)}>
<div className={cn('grow min-h-0 bg-[#f4f4f4] dark:bg-[#222222] shadow-outer-1 py-0 rounded-lg mb-4')}>

@specter-flq specter-flq Aug 6, 2026

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.

I saw a comment from Michael S about the tokens, guess this would apply here as well, but calling it out just in case as these are more common colors that maybe we do have

import { Accordion, AccordionContent, AccordionItem, IconButton, Skeleton, TextButton, Tooltip } from 'doodle-ui';
import { AssetGroupTagMemberListItem } from 'js-client-library';
import { useState } from 'react';
import { optionStyles } from '../../..';

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.

Wonder if this path not having specific file names will give us issues ( want to say possible circular dependency ones). Maybe we should consider having it explicitly say the file just in case.

import { AssetGroupTagSelector, CustomRulesKey, DefaultRulesKey, DisabledRulesKey, RulesKey } from 'js-client-library';
import { useEffect, useRef, useState } from 'react';
import { FixedSizeList } from 'react-window';
import { optionStyles } from '../../..';

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.

Wonder if this path not having specific file names will give us issues ( want to say possible circular dependency ones). Maybe we should consider having it explicitly say the file just in case.

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof ButtonVariants> {
asChild?: boolean;

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.

Curious as to why we dropped this prop

Comment on lines 95 to 110
<div className='flex justify-between items-center min-h-10'>
<span>Sample Results</span>
<Button
asChild
variant='text'
disabled={!exploreUrl}
className={cn('font-normal', {
hidden: !showViewInExploreButton,
})}>
<a href={exploreUrl} target='_blank' rel='noreferrer'>
{exploreUrl && (
<a
href={exploreUrl}
target='_blank'
rel='noopener noreferrer'
className={cn(
TextButtonVariants({ fontColor: 'primary' }),
'text-sm',
ruleType !== SeedTypeCypher && 'hidden'
)}>
View in Explore
</a>
</Button>
)}
</div>

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.

Curious on this change, from what I have seen there are benefits from the button asChild pattern with a nested link tag. Not saying the change is bad, but want to learn more about the reasoning behind it. Ties to the comment on removing the asChild from the the Button component

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.

3 participants