Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Styles enabled or disabled, remove differentiation for border style in the left side of the row header when the style would have been set to Outset #11345

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricardobossan
Copy link
Contributor

@ricardobossan ricardobossan commented May 9, 2024

Fixes #5961

Proposed changes

  • If DataGridView is RightToLeft, with either visual styles enabled or not, remove differentiation for border style in the left side of the row header when the style would have been set to Outset

Customer Impact

  • Will be able to see left border of the row header when control is set to RightToLeft

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

  • Visual styles enabled

before_visual_style_on

  • Visual styles disabled

before_visual_style_off

After

  • Visual styles enabled

after_visual_style_on

  • Visual styles disabled

after_visual_style_off

Test methodology

  • Manual

Accessibility testing

  • Accessibility insights

Test environment(s)

  • dotnet 9.0.100-preview.3.24204.13
Microsoft Reviewers: Open in CodeFlow

@ricardobossan ricardobossan requested a review from a team as a code owner May 9, 2024 20:41
@ricardobossan ricardobossan self-assigned this May 9, 2024
@ricardobossan ricardobossan added the waiting-review This item is waiting on review by one or more members of team label May 9, 2024
@Tanya-Solyanik
Copy link
Member

Please investigate the failing tests

@Tanya-Solyanik Tanya-Solyanik added 📭 waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels May 10, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label May 10, 2024
@ricardobossan
Copy link
Contributor Author

Please investigate the failing tests

@Tanya-Solyanik In my fix, I discovered that the transparency issue stems from the DataGridViewRow header's left border being set to Outset when RightToLeft is defined. By changing it to OutsetDouble, which matches the configuration when RightToLeft isn't chosen, the transparency problem is resolved.

However, this fix conflicts with existing tests, which expect the DataGridViewRow header's left border to be set to Outset. To ensure the integrity of the codebase, I'm considering modifying the tests to accommodate this fix.

I believe implementing this fix is crucial for resolving the reported issue and ensuring consistent behavior across different globalization settings. I'd appreciate your input on how best to proceed.

@Tanya-Solyanik
Copy link
Member

However, this fix conflicts with existing tests, which expect the DataGridViewRow header's left border to be set to Outset. To ensure the integrity of the codebase, I'm considering modifying the tests to accommodate this fix.

I agree!

@Tanya-Solyanik
Copy link
Member

In this image -
image

the column border is not visible between the column headers. Could you please open a new issue for that?

Copy link
Member

@LeafShi1 LeafShi1 left a comment

Choose a reason for hiding this comment

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

In this image - image

the column border is not visible between the column headers. Could you please open a new issue for that?

Using the same border style OutsetDouble here can resolve this issue

if (RightToLeftInternal)
{
dgvabs.LeftInternal = DataGridViewAdvancedCellBorderStyle.Outset;
}
else
{
dgvabs.LeftInternal = DataGridViewAdvancedCellBorderStyle.OutsetDouble;
}

@elachlan elachlan added the 📭 waiting-author-feedback The team requires more information from the author label May 15, 2024
@ricardobossan ricardobossan force-pushed the Issue_5961_RightToLeft_DataGrid_Low_Luminosity branch from 1c2322e to 4618bd8 Compare May 17, 2024 20:51
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label May 17, 2024
@ricardobossan
Copy link
Contributor Author

ricardobossan commented May 17, 2024

In this image - image

the column border is not visible between the column headers. Could you please open a new issue for that?

@Tanya-Solyanik, Leaf's suggestion fixed it:

image

@Tanya-Solyanik
Copy link
Member

@ricardobossan - please investigate unit test failures

@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label May 17, 2024
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label May 17, 2024
@ricardobossan ricardobossan force-pushed the Issue_5961_RightToLeft_DataGrid_Low_Luminosity branch from 41427ac to 397002e Compare May 20, 2024 20:05
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 74.28949%. Comparing base (f53f153) to head (9bda02d).

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #11345         +/-   ##
===================================================
- Coverage   74.29395%   74.28949%   -0.00446%     
===================================================
  Files           3026        3026                 
  Lines         627152      627152                 
  Branches       46758       46758                 
===================================================
- Hits          465936      465908         -28     
- Misses        157863      157893         +30     
+ Partials        3353        3351          -2     
Flag Coverage Δ
Debug 74.28949% <83.33333%> (-0.00446%) ⬇️
integration 17.98732% <0.00000%> (-0.00282%) ⬇️
production 47.02044% <50.00000%> (-0.00984%) ⬇️
test 96.98768% <100.00000%> (ø)
unit 43.97963% <50.00000%> (-0.03194%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@LeafShi1
Copy link
Member

LGTM!

dataGridViewAdvancedBorderStylePlaceholder.LeftInternal =
DataGridView.CellBorderStyle is DataGridViewCellBorderStyle.Raised or DataGridViewCellBorderStyle.RaisedVertical
? DataGridViewAdvancedCellBorderStyle.OutsetPartial
: DataGridViewAdvancedCellBorderStyle.OutsetDouble;

Copy link
Member

Choose a reason for hiding this comment

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

                    dataGridViewAdvancedBorderStylePlaceholder.LeftInternal =
                        DataGridView.CellBorderStyle is DataGridViewCellBorderStyle.Raised or DataGridViewCellBorderStyle.RaisedVertical
                            ? DataGridViewAdvancedCellBorderStyle.OutsetPartial
                            : DataGridViewAdvancedCellBorderStyle.OutsetDouble;

@Tanya-Solyanik
Copy link
Member

@Olina-Zhang - could you please test this change when you have time?

@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label May 21, 2024
@ricardobossan ricardobossan marked this pull request as draft May 22, 2024 22:51
@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label May 23, 2024
…ightToLeft mode, both with VisualStyles enabled or disabled
@ricardobossan ricardobossan force-pushed the Issue_5961_RightToLeft_DataGrid_Low_Luminosity branch from 397002e to 9bda02d Compare May 24, 2024 01:02
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label May 24, 2024
@ricardobossan ricardobossan marked this pull request as ready for review May 24, 2024 01:03
@dotnet-policy-service dotnet-policy-service bot removed the draft draft PR label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants