Skip to content

feat(sidebar): add svgClasses, arrowClasses to hlm-sidebar-menu-btn#1259

Open
Oussemasahbeni wants to merge 1 commit intospartan-ng:mainfrom
Oussemasahbeni:feat/sidebar-menu-btn-tooltip-arrow
Open

feat(sidebar): add svgClasses, arrowClasses to hlm-sidebar-menu-btn#1259
Oussemasahbeni wants to merge 1 commit intospartan-ng:mainfrom
Oussemasahbeni:feat/sidebar-menu-btn-tooltip-arrow

Conversation

@Oussemasahbeni
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

Primitives

  • accordion
  • alert
  • alert-dialog
  • aspect-ratio
  • autocomplete
  • avatar
  • badge
  • breadcrumb
  • button
  • button-group
  • calendar
  • card
  • carousel
  • checkbox
  • collapsible
  • combobox
  • command
  • context-menu
  • data-table
  • date-picker
  • dialog
  • empty
  • dropdown-menu
  • field
  • form-field
  • hover-card
  • icon
  • input
  • input-group
  • input-otp
  • item
  • kbd
  • label
  • menubar
  • native-select
  • navigation-menu
  • pagination
  • popover
  • progress
  • radio-group
  • resizable
  • scroll-area
  • select
  • separator
  • sheet
  • sidebar
  • skeleton
  • slider
  • sonner
  • spinner
  • switch
  • table
  • tabs
  • textarea
  • toggle
  • toggle-group
  • tooltip
  • typography

Others

  • trpc
  • nx
  • repo
  • cli

What is the current behavior?

image Closes #

What is the new behavior?

image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@greptile-apps
Copy link

greptile-apps bot commented Mar 7, 2026

Greptile Summary

This PR adds svgClasses and arrowClasses options to the provideBrnTooltipDefaultOptions call inside HlmSidebarMenuButton, enabling the tooltip arrow to render and position correctly when the sidebar is in its collapsed/icon state.

  • Adds svgClasses: DEFAULT_TOOLTIP_SVG_CLASS to style the SVG arrow element, mirroring the configuration already used in the standalone HlmTooltip directive.
  • Adds arrowClasses: (position: BrnTooltipPosition) => hlm(tooltipPositionVariants({ position })) to apply position-aware Tailwind classes to the arrow container, also consistent with HlmTooltip.
  • Imports BrnTooltipPosition from @spartan-ng/brain/tooltip and DEFAULT_TOOLTIP_SVG_CLASS, tooltipPositionVariants from @spartan-ng/helm/tooltip, and hlm from @spartan-ng/helm/utils — all valid, existing exports.
  • The change is purely additive; no existing tooltip behavior is altered.

Confidence Score: 5/5

  • This PR is safe to merge — the change is a small, additive configuration update with no risk of regressions.
  • The two new options (svgClasses, arrowClasses) are already defined in the BrnTooltipOptions interface, have correct types, and their values are copy-pasted directly from the working HlmTooltip directive. All new imports resolve to existing, publicly exported symbols. No logic is removed or altered.
  • No files require special attention.

Important Files Changed

Filename Overview
libs/helm/sidebar/src/lib/hlm-sidebar-menu-button.ts Adds svgClasses and arrowClasses to provideBrnTooltipDefaultOptions, bringing the sidebar menu button tooltip arrow styling in line with the standard HlmTooltip directive. Imports are correctly updated.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[HlmSidebarMenuButton] -->|provideBrnTooltipDefaultOptions| B[BrnTooltipOptions]
    B --> C[tooltipContentClasses\nDEFAULT_TOOLTIP_CONTENT_CLASSES]
    B --> D["svgClasses ✨ NEW\nDEFAULT_TOOLTIP_SVG_CLASS"]
    B --> E["arrowClasses ✨ NEW\ntooltipPositionVariants(position)"]
    B --> F[position: 'right']
    B --> G[showDelay: 150\nhideDelay: 0]
    D --> H[BrnTooltipContent\nSVG arrow element styled]
    E --> H
    F --> H
Loading

Last reviewed commit: 2bc04ee

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.

1 participant