Skip to content

Conversation

Aathish101
Copy link

@Aathish101 Aathish101 commented Oct 9, 2025

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

Summary by Sourcery

Refine document_toolbar integration tests by cleaning up formatting and adding a new test to ensure text styles persist through link insertion and removal.

Enhancements:

  • Remove redundant blank lines and streamline test file formatting for clarity.

Tests:

  • Add a test verifying that bold, italic, and underline styles are preserved when inserting and removing links in the document toolbar integration tests.

Copy link
Contributor

sourcery-ai bot commented Oct 9, 2025

Reviewer's Guide

This PR refactors the document_toolbar integration tests by removing redundant blank lines for cleaner formatting and extends link-handling coverage with a new test that verifies styled text attributes are preserved through link insertion and removal.

File-Level Changes

Change Details Files
Remove extraneous blank lines and tighten formatting
  • Removed blank lines between imports
  • Trimmed blank lines within helper functions and test groups
  • Consolidated code spacing for consistent style
frontend/appflowy_flutter/integration_test/desktop/document/document_toolbar_test.dart
Add integration test for styled link insertion and removal
  • Implemented new testWidgets 'edit link text with style'
  • Applied bold, italic, and underline before creating a link
  • Verified style attributes persist after link insertion and after link removal
frontend/appflowy_flutter/integration_test/desktop/document/document_toolbar_test.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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@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:

  • There are stray placeholder lines (e.g. “Expand Down”, “Expand Up”) and duplicated blocks near the end of the file—please remove those to restore valid Dart syntax.
  • The new ‘getAttribute’ logic and other selection helpers are duplicated—consider moving them into a shared test utility to reduce boilerplate.
  • The heading and toggle tests follow almost identical patterns; try parameterizing them in a loop or table-driven approach to make the code more concise and maintainable.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- There are stray placeholder lines (e.g. “Expand Down”, “Expand Up”) and duplicated blocks near the end of the file—please remove those to restore valid Dart syntax.
- The new ‘getAttribute’ logic and other selection helpers are duplicated—consider moving them into a shared test utility to reduce boilerplate.
- The heading and toggle tests follow almost identical patterns; try parameterizing them in a loop or table-driven approach to make the code more concise and maintainable.

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.

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.

2 participants