Skip to content

full page scrreenshot enhancement vrt#4492

Merged
ravirk91 merged 1 commit into
Releases/Official-Releasefrom
Enhancement/VRTFullPageScreenshot
May 7, 2026
Merged

full page scrreenshot enhancement vrt#4492
ravirk91 merged 1 commit into
Releases/Official-Releasefrom
Enhancement/VRTFullPageScreenshot

Conversation

@AmanPrasad43
Copy link
Copy Markdown
Contributor

@AmanPrasad43 AmanPrasad43 commented May 7, 2026

Description

Type of Change

  • Bug fix - [ ] New feature - [ ] Breaking change - [ ] Plugin update

Checklist

  • PR description clearly describes the changes
  • Target branch is correct (master for features, Releases/* for fixes)
  • Latest code from target branch merged
  • No commented/junk code included
  • No new build warnings or errors
  • All existing unit tests pass
  • New unit tests added for new functionality
  • Cross-platform compatibility verified (Windows/Linux/macOS)
  • CI/CD pipeline passes
  • Code follows project conventions (Act{Platform}{Type}, {Platform}Driver)
  • Repository objects use [IsSerializedForLocalRepository] where needed
  • Error handling uses Reporter.ToLog() pattern
  • Documentation updated for user-facing changes
  • Self-review completed and code review comments addressed

Summary by CodeRabbit

  • Updates
    • Improved the visual testing comparison page layout with better control placement and spacing
    • Full-page screenshot capture feature now defaults to disabled
    • Enhanced conditional display of full-page screenshot capture options

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack

Walkthrough

The PR implements a full-page screenshot toggle feature for the Visual Testing action editor by changing the IsFullPageScreenshot property default to false, adding XAML layout for the checkbox control, binding it to the action model, and conditionally showing it based on action type and baseline configuration.

Changes

Full-Page Screenshot Feature

Layer / File(s) Summary
Property Default Value
Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs
IsFullPageScreenshot property default value changes from true to false when the input parameter cannot be parsed.
XAML Layout Structure
Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml
Grid RowDefinition added to extend available layout rows; baseline image section UI repositioned with updated Grid.Row values.
Model Binding
Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs
xFullPageScreenshotCheckbox bound to mAct.IsFullPageScreenshot via ObjFieldBinding in page constructor to sync checkbox state with model.
Action-Specific Visibility
Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs
Checkbox visibility controlled per action type: shown for Track action when both baselineImageBy == ActiveWindow and actionBy == Window; hidden for Start and Stop actions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Ginger-Automation/Ginger#4232: Implements full-page screenshot capture functionality that consumes the IsFullPageScreenshot property changed in this PR.

Suggested reviewers

  • Maheshkale447

Poem

🐰 A checkbox bounces into view,
Default false, not quite true,
Grid rows expand to make it fit,
Binding shines with every bit,
Track and Window—smart and right! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is largely incomplete—it contains only the template structure with no actual content filled in the Description section, Type of Change unchecked, and all checklist items unmarked. Complete the description section with details about the changes, select the appropriate Type of Change, and verify/check off the relevant checklist items.
Title check ❓ Inconclusive The title 'full page scrreenshot enhancement vrt' contains a typo ('scrreenshot' instead of 'screenshot') and is only partially related to the main change, which involves adjusting VRT layout, binding UI elements, and changing default values for full-page screenshot functionality. Correct the typo and clarify the title to better describe the specific changes, such as 'Fix VRT full-page screenshot default and UI layout' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Enhancement/VRTFullPageScreenshot

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@AmanPrasad43 AmanPrasad43 requested a review from ravirk91 May 7, 2026 06:58
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 7, 2026

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml`:
- Around line 96-97: The new controls xFullPageScreenshotLabel and
xFullPageScreenshotCheckbox currently lack an explicit Visibility setting and
briefly render visible before InitLayout() collapses them for the default Track
action state; add Visibility="Collapsed" to both control declarations (the Label
named xFullPageScreenshotLabel and the CheckBox named
xFullPageScreenshotCheckbox in VRTComparePage.xaml) so they start hidden and
avoid flicker, matching the pattern used by other conditionally-shown rows
handled by InitLayout().

In `@Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs`:
- Around line 184-186: The change introduced a new in-memory default of false
that causes existing saved actions missing the IsFullPageScreenshot param to
silently flip behavior; update the call that synthesizes the param in
ActVisualTesting (the GetOrCreateInputParam usage around IsFullPageScreenshot)
to use true as the runtime default (i.e., pass true.ToString() or otherwise
treat missing param as true) or implement a one-time migration/upgrade path that
detects absent IsFullPageScreenshot and sets it to "True" for persisted actions
so pre-existing actions keep their original full-page behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f00a3781-7a62-44ee-89e7-4edb425b6939

📥 Commits

Reviewing files that changed from the base of the PR and between 6d1e4c8 and e35758c.

📒 Files selected for processing (3)
  • Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml
  • Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml.cs
  • Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs

Comment on lines +96 to +97
<Label x:Name="xFullPageScreenshotLabel" Style="{StaticResource $LabelStyle}" Grid.Row="11" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Content="Full Page Screenshot:"/>
<CheckBox x:Name="xFullPageScreenshotCheckbox" Grid.Row="11" Grid.Column="1" VerticalAlignment="Center" Margin="5,10,0,0" Style="{StaticResource @InputCheckBoxStyle}" ToolTip="Capture the full page screenshot of the active window for baseline and checkpoint comparison"/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Add Visibility="Collapsed" as the XAML default for the new controls.

Neither xFullPageScreenshotLabel nor xFullPageScreenshotCheckbox declares an initial Visibility. WPF defaults both to Visible, so they are briefly shown until InitLayout() runs in the constructor and collapses them for the default Track action state. Adding the attribute eliminates any possible visual flicker and makes the intent explicit, consistent with how other conditionally-shown rows behave in this page.

🛡️ Proposed fix
-        <Label x:Name="xFullPageScreenshotLabel" Style="{StaticResource $LabelStyle}" Grid.Row="11" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Content="Full Page Screenshot:"/>
-        <CheckBox x:Name="xFullPageScreenshotCheckbox" Grid.Row="11" Grid.Column="1" VerticalAlignment="Center" Margin="5,10,0,0" Style="{StaticResource `@InputCheckBoxStyle`}" ToolTip="Capture the full page screenshot of the active window for baseline and checkpoint comparison"/>
+        <Label x:Name="xFullPageScreenshotLabel" Visibility="Collapsed" Style="{StaticResource $LabelStyle}" Grid.Row="11" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" Content="Full Page Screenshot:"/>
+        <CheckBox x:Name="xFullPageScreenshotCheckbox" Visibility="Collapsed" Grid.Row="11" Grid.Column="1" VerticalAlignment="Center" Margin="5,10,0,0" Style="{StaticResource `@InputCheckBoxStyle`}" ToolTip="Capture the full page screenshot of the active window for baseline and checkpoint comparison"/>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Ginger/Ginger/Actions/ActionEditPages/VisualTesting/VRTComparePage.xaml`
around lines 96 - 97, The new controls xFullPageScreenshotLabel and
xFullPageScreenshotCheckbox currently lack an explicit Visibility setting and
briefly render visible before InitLayout() collapses them for the default Track
action state; add Visibility="Collapsed" to both control declarations (the Label
named xFullPageScreenshotLabel and the CheckBox named
xFullPageScreenshotCheckbox in VRTComparePage.xaml) so they start hidden and
avoid flicker, matching the pattern used by other conditionally-shown rows
handled by InitLayout().

Comment on lines +184 to 186
bool value = false;
bool.TryParse(GetOrCreateInputParam(nameof(IsFullPageScreenshot), value.ToString()).Value, out value);
return value;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Silent behavioral regression for pre-existing actions lacking a stored IsFullPageScreenshot param.

Changing the in-memory default from true to false affects any action that was created (and saved) before this property was populated. For those actions, GetOrCreateInputParam will synthesize the value at runtime using "False" as the default — switching them from implicitly-enabled full-page screenshots to implicitly-disabled without any explicit save/migration step.

If the property was newly introduced in an earlier PR and users could have run actions that persisted "True" to their XML, this change is safe. But if any existing saved action XML files lack this param entirely, they will silently regress.

Consider checking whether a migration note or one-time upgrade path is needed, or assert in release notes that the new default is intentionally false.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/ActVisualTesting.cs` around
lines 184 - 186, The change introduced a new in-memory default of false that
causes existing saved actions missing the IsFullPageScreenshot param to silently
flip behavior; update the call that synthesizes the param in ActVisualTesting
(the GetOrCreateInputParam usage around IsFullPageScreenshot) to use true as the
runtime default (i.e., pass true.ToString() or otherwise treat missing param as
true) or implement a one-time migration/upgrade path that detects absent
IsFullPageScreenshot and sets it to "True" for persisted actions so pre-existing
actions keep their original full-page behavior.

@ravirk91 ravirk91 merged commit 9d673bb into Releases/Official-Release May 7, 2026
13 of 14 checks passed
@ravirk91 ravirk91 deleted the Enhancement/VRTFullPageScreenshot branch May 7, 2026 09:28
@coderabbitai coderabbitai Bot mentioned this pull request May 18, 2026
15 tasks
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