Skip to content

Conversation

@behnam-deriv
Copy link
Collaborator

@behnam-deriv behnam-deriv commented Oct 22, 2025

Clickup link:
Fixes issue: #

This PR contains the following changes:

  • ✨ 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

Developers Note (Optional)

Pre-launch Checklist (For PR creator)

As a creator of this PR:

  • ✍️ I have included clickup id and package/app_name in the PR title.
  • 👁️ I have gone through the code and removed any temporary changes (commented lines, prints, debug statements etc.).
  • ⚒️ I have fixed any errors/warnings shown by the analyzer/linter.
  • 📝 I have added documentation, comments and logging wherever required.
  • 🧪 I have added necessary tests for these changes.
  • 🔎 I have ensured all existing tests are passing.

Reviewers

Pre-launch Checklist (For Reviewers)

As a reviewer I ensure that:

  • ✴️ This PR follows the standard PR template.
  • 🪩 The information in this PR properly reflects the code changes.
  • 🧪 All the necessary tests for this PR's are passing.

Pre-launch Checklist (For QA)

  • 👌 It passes the acceptance criteria.

Pre-launch Checklist (For Maintainer)

  • [MAINTAINER_NAME] I make sure this PR fulfills its purpose.

Summary by Sourcery

Revamp accumulator marker icons by removing previous tick marker support and simplifying barrier drawing

Enhancements:

  • Remove previousTick parameter and related handling from AccumulatorMarkerIconPainter
  • Simplify barrier circle rendering to use only the barrier color
  • Delete previousTick enum entry from MarkerType

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors the accumulator marker icon painter by removing the previous tick barrier feature and cleaning up related parameters and enum definitions.

Class diagram for refactored AccumulatorMarkerIconPainter and ChartMarker

classDiagram
class AccumulatorMarkerIconPainter {
  +paintMarkers()
  -_drawPreviousTickBarrier(size, canvas, startX, endX, y, barrierColor)
}
class TickMarkerIconPainter
AccumulatorMarkerIconPainter --|> TickMarkerIconPainter
class ChartMarker
class MarkerType
MarkerType : latestTick
MarkerType : highBarrier
MarkerType : lowBarrier
MarkerType : exitSpot
MarkerType : tick

%% Removed enum value
%% MarkerType : previousTick (removed)
Loading

File-Level Changes

Change Details Files
Remove previousTick marker handling and related drawing logic
  • Eliminate retrieval of previousTickMarker from markers map
  • Remove previousTickMarker parameter from internal draw function
  • Replace conditional draw logic with unconditional barrier draw using barrierColor
  • Delete circle drawing code for previous tick barrier
  • Update function call signature to reflect removed parameter
lib/src/deriv_chart/chart/data_visualization/markers/marker_icon_painters/accumulator_marker_icon_painter.dart
Purge previousTick enum entry from MarkerType
  • Delete previousTick value and its documentation in MarkerType enum
lib/src/deriv_chart/chart/data_visualization/markers/chart_marker.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Since the previousTick marker was fully removed, make sure to clean up or update any remaining references to MarkerType.previousTick elsewhere in the codebase for consistency.
  • The accumulator painter’s paint method still handles multiple drawing responsibilities—consider extracting the barrier and shape rendering into smaller helper methods for better readability and testability.
  • Now that _drawPreviousTickBarrier only uses a single color, rename the method or its parameters to reflect that it’s no longer tied to a distinct ‘previous tick’ color for clarity.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since the previousTick marker was fully removed, make sure to clean up or update any remaining references to MarkerType.previousTick elsewhere in the codebase for consistency.
- The accumulator painter’s paint method still handles multiple drawing responsibilities—consider extracting the barrier and shape rendering into smaller helper methods for better readability and testability.
- Now that _drawPreviousTickBarrier only uses a single color, rename the method or its parameters to reflect that it’s no longer tied to a distinct ‘previous tick’ color for clarity.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@behnam-deriv behnam-deriv marked this pull request as draft October 24, 2025 03:29
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