Skip to content

Conversation

@akhil-ge0rge
Copy link
Contributor

@akhil-ge0rge akhil-ge0rge commented Dec 19, 2025

Description

Add support for StacTooltipThemeData in Stac.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

Summary by CodeRabbit

  • New Features
    • Added comprehensive tooltip theming support with customizable properties including padding, margin, decoration, text styling, duration, vertical offset, and trigger modes for enhanced tooltip control across your application.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces comprehensive tooltip theme support to the Stac framework by adding a new StacTooltipThemeData model with JSON serialization, a parser extension for runtime conversion to Flutter's TooltipThemeData, and integration into the StacTheme class with appropriate public exports.

Changes

Cohort / File(s) Summary
Tooltip Theme Data Model
packages/stac_core/lib/foundation/theme/stac_tool_tip_theme_data/stac_tool_tip_theme_data.dart, stac_tool_tip_theme_data.g.dart
Introduces StacTooltipThemeData class with 15 properties (height, constraints, padding, margin, verticalOffset, preferBelow, excludeFromSemantics, decoration, textStyle, textAlign, waitDuration, showDuration, exitDuration, triggerMode, enableFeedback). Includes @JsonSerializable() annotation, factory fromJson() and toJson() methods, and generated serialization support with enum mappings.
StacTheme Integration
packages/stac_core/lib/foundation/theme/stac_theme/stac_theme.dart, stac_theme.g.dart
Adds tooltipTheme field (type StacTooltipThemeData?) to StacTheme constructor and class declaration. Updates JSON serialization to parse and serialize tooltipTheme bidirectionally.
Theme Parser
packages/stac/lib/src/parsers/theme/stac_tool_tip_theme_data_parser.dart
Introduces StacTooltipThemeDataParser extension on StacTooltipThemeData with parse(BuildContext context) method that converts StacTooltipThemeData to Flutter's native TooltipThemeData.
Public Exports
packages/stac_core/lib/foundation/theme/theme.dart, packages/stac/lib/src/parsers/theme/themes.dart, packages/stac/lib/src/parsers/theme/stac_theme_parser.dart
Adds exports for StacTooltipThemeData model and parser; updates StacThemeParser to import and integrate tooltip theme parsing.

Sequence Diagram

sequenceDiagram
    actor Config as JSON Config
    participant FromJson as StacTooltipThemeData
    participant Parser as StacTooltipThemeDataParser
    participant Flutter as TooltipThemeData

    Config->>FromJson: parse JSON
    FromJson->>FromJson: deserialize fields<br/>(height, constraints,<br/>padding, decoration, etc.)
    activate FromJson
    FromJson->>FromJson: parse nested objects<br/>(StacBoxDecoration,<br/>StacTextStyle, etc.)
    deactivate FromJson
    
    FromJson->>Parser: new instance created
    Parser->>Parser: parse(BuildContext)
    activate Parser
    Parser->>Parser: map all 15 fields<br/>to Flutter equivalents
    deactivate Parser
    
    Parser->>Flutter: return TooltipThemeData
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify field completeness: Ensure all 15 tooltip properties are correctly mapped in the parser extension, especially nested object conversions (constraints, decoration, textStyle)
  • JSON roundtrip validation: Check that serialization/deserialization cycle preserves all data types and enums (StacTextAlign, StacTooltipTriggerMode)
  • Consistency with existing patterns: Confirm that the parser implementation aligns with sibling theme parsers in the codebase

Possibly related PRs

Suggested reviewers

  • Potatomonsta
  • divyanshub024

Poem

🐰 A tooltip hops into the theme,
With padding, shadows, and gleaming dream,
From JSON to Flutter's own delight,
Fifteen fields now shining bright! ✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc7a5e5 and fd5a725.

⛔ Files ignored due to path filters (1)
  • examples/stac_gallery/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • packages/stac/lib/src/parsers/theme/stac_theme_parser.dart (2 hunks)
  • packages/stac/lib/src/parsers/theme/stac_tool_tip_theme_data_parser.dart (1 hunks)
  • packages/stac/lib/src/parsers/theme/themes.dart (2 hunks)
  • packages/stac_core/lib/foundation/theme/stac_theme/stac_theme.dart (3 hunks)
  • packages/stac_core/lib/foundation/theme/stac_theme/stac_theme.g.dart (2 hunks)
  • packages/stac_core/lib/foundation/theme/stac_tool_tip_theme_data/stac_tool_tip_theme_data.dart (1 hunks)
  • packages/stac_core/lib/foundation/theme/stac_tool_tip_theme_data/stac_tool_tip_theme_data.g.dart (1 hunks)
  • packages/stac_core/lib/foundation/theme/theme.dart (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@akhil-ge0rge akhil-ge0rge deleted the add-tool-tip-theme branch December 19, 2025 20:14
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