-
Notifications
You must be signed in to change notification settings - Fork 272
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
fix(ui5-calendar): add tooltips to special dates #10335
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove the connection between CalendarLegend and DayPicker, currently they are tightly coupled and it's in contradiction with least knowledge principle(Law of Demeter). I would suggest removing the connection between them and move communication on Calendar level. We already pass the specialDates from Calendar to DayPicker, so we can now just use the same objects, add a private _tooltip property and have the tooltip(text property) from CalendarLegendItems. We can use attachInvalidate to listen for CalendarLegend invalidation and react upon, because apps can change the text or add more CalendarLegendItems and since the legend invalidates on child change, it will notify the Calendar as well and we can then change the dates and pass them to the DayPicker.
Done, as discussed. Turned out that the private property change did not cause invalidation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Fixes: #10334