Skip to content

Commit 52cb9a6

Browse files
rhamiltoclaude
andcommitted
refactor: remove unnecessary comments from ResponsiveActions
Address PR review feedback by removing unnecessary comments that don't add value beyond what the code already expresses. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 8062a9d commit 52cb9a6

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

packages/module/src/ResponsiveActions/ResponsiveActions.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export interface ResponsiveActionsProps extends Omit<OverflowMenuProps, 'ref' |
1515
children: React.ReactNode;
1616
}
1717

18-
// Inner component that has access to OverflowMenuContext
1918
const ResponsiveActionsDropdown: FunctionComponent<{
2019
ouiaId: string;
2120
dropdownItems: ReactNode[];
@@ -25,20 +24,15 @@ const ResponsiveActionsDropdown: FunctionComponent<{
2524
const [ isOpen, setIsOpen ] = useState(false);
2625
const { isBelowBreakpoint } = useContext(OverflowMenuContext);
2726

28-
// Determine if kebab should be disabled based on breakpoint
2927
const isKebabDisabled = (() => {
3028
const allPinnedDisabled = pinnedItemsDisabled.length > 0 && pinnedItemsDisabled.every(disabled => disabled);
3129
const allRegularDisabled = regularItemsDisabled.length > 0 && regularItemsDisabled.every(disabled => disabled);
3230

3331
if (isBelowBreakpoint) {
34-
// Below breakpoint: pinned items are IN the dropdown, so check all dropdown items
35-
// Disabled only if both pinned AND regular items exist and are all disabled
3632
return (pinnedItemsDisabled.length > 0 || regularItemsDisabled.length > 0) &&
3733
(pinnedItemsDisabled.length === 0 || allPinnedDisabled) &&
3834
(regularItemsDisabled.length === 0 || allRegularDisabled);
3935
} else {
40-
// Above breakpoint: pinned items are shown as buttons, only check regular items
41-
// Disabled only if there are regular items and they're all disabled
4236
return allRegularDisabled;
4337
}
4438
})();
@@ -93,7 +87,6 @@ export const ResponsiveActions: FunctionComponent<ResponsiveActionsProps> = ({ o
9387
</OverflowMenuItem>
9488
);
9589
} else {
96-
// Track if there are any regular (non-persistent, non-pinned) actions
9790
hasRegularActions = true;
9891
}
9992

@@ -103,7 +96,6 @@ export const ResponsiveActions: FunctionComponent<ResponsiveActionsProps> = ({ o
10396
{children}
10497
</OverflowMenuDropdownItem>
10598
);
106-
// Track disabled state separately for pinned vs regular items
10799
if (isPinned) {
108100
pinnedItemsDisabled.push(!!actionProps.isDisabled);
109101
} else {

0 commit comments

Comments
 (0)