Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(tooltip): migrate to signals #430 #503

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

MerlinMoos
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?

  • accordion
  • alert
  • alert-dialog
  • aspect-ratio
  • avatar
  • badge
  • button
  • calendar
  • card
  • checkbox
  • collapsible
  • combobox
  • command
  • context-menu
  • data-table
  • date-picker
  • dialog
  • dropdown-menu
  • hover-card
  • icon
  • input
  • label
  • menubar
  • navigation-menu
  • pagination
  • popover
  • progress
  • radio-group
  • scroll-area
  • select
  • separator
  • sheet
  • skeleton
  • slider
  • sonner
  • spinner
  • switch
  • table
  • tabs
  • textarea
  • toast
  • toggle
  • tooltip
  • typography

What is the current behavior?

Closes #430

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@MerlinMoos
Copy link
Contributor Author

@elite-benni @goetzrobin I changed the naming as discussed in the other PR here as well

Copy link
Collaborator

@elite-benni elite-benni left a comment

Choose a reason for hiding this comment

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

I don't like using the mutable + state pattern when it is not needed.
I think providing the defaultOptions via Injector like it is done with the HlmButtonDirective, is more readable and declarative.

I added a PR to your branch where I added some of the changes and we can talk about it.

@elite-benni elite-benni mentioned this pull request Dec 21, 2024
56 tasks
Copy link
Collaborator

@goetzrobin goetzrobin left a comment

Choose a reason for hiding this comment

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

I left some comments. I think it's just some minor naming stuff and one more philosophical question about introducing a new helper in core when we use it in only a single spot. @elite-benni I trust your review on this as you've already spent some time looking at this code also!

Thanks so much for both of your guys work on this!

// Must wait for the template to be painted to the tooltip so that the overlay can properly
// calculate the correct positioning based on the size of the tek-pate.
if (this._tooltipInstance) {
this._tooltipInstance.content = this.content;
this._tooltipInstance.content = this.brnTooltipTriggerState();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here. And why does it replace this.content?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey, content had an alias which was brnTooltipTrigger, I will refactor the naming

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.

refactor(tooltip): migration to signals
4 participants