You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(habits-widget): implement per-widget habit item state management
- Change habit item and history IDs from number to string type
- Replace global habitItems array with widgetId-keyed record for item storage
- Add setHabitItems and getHabitItems functions to manage state by widget instance
- Generate unique IDs for items without ID when setting habit items
- Pass widgetId as parameter in widget utils functions to isolate widget data
- Adjust widget rendering to fetch and update items per widgetId
- Update event handlers and DOM updates to use widget-scoped habit items
- Modify progress bar updates to target multiple elements by class for each item
- Remove default hardcoded habit items, rely on passed or stored items per widget
- Fix modal rendering and consumption list to reflect per-widget habit data
- Ensure UI updates and tracking counts correspond to the correct widget instance
0 commit comments