Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Fix 2FA when running on Visual Studio 2015 #2337

Merged
merged 3 commits into from
Apr 30, 2019
Merged

Conversation

jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Apr 30, 2019

On Visual Studio 2015, authentication was getting stuck on username/password and not showing the 2FA UI.

What this PR does

  • Use strongly typed VsResourceKeys rather than referencing style as a string
  • Use TextBlockEnvironment122PercentFontSizeStyleKey instead of TextBlockEnvironment1111PercentFontSizeStyleKey (which doesn't exist in VS 2015)
  • Add design time resources for font scaling (so these styles appear correctly in the designer)
  • Use default dialog foreground color for ErrorMessageStyle instead of GHTextBrush (which isn't themed for VS)

How to test

  1. Install extension in Visual Studio 2015
  2. Log out and back in using username/password
  3. Check that 2FA UI appears
  4. Give incorrect code and check error is a readable color

Fixes #2336

Change from using TextBlockEnvironment1111PercentFontSizeStyleKey to TextBlockEnvironment122PercentFontSizeStyleKey (which exists in VS 2015).
Instead use the dialog forground color. The color was previously GHTextBrush (which wasn't VS themed).
Add scaling styles for built in Labels and TextBlocks on Visual Studio 2015 and up.
Copy link
Contributor

@shana shana left a comment

Choose a reason for hiding this comment

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

Working well here now 👍

@jcansdale jcansdale added the bug label Apr 30, 2019
@jcansdale jcansdale merged commit 8783e10 into master Apr 30, 2019
@jcansdale jcansdale deleted the fixes/2336-2fa-on-2015 branch April 30, 2019 15:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2FA is broken on Visual Studio 2015
3 participants