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

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

jcansdale added 3 commits Apr 30, 2019
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.
@shana
shana approved these changes Apr 30, 2019
Copy link
Collaborator

@shana shana left a comment

Working well here now 👍

@jcansdale jcansdale added the bug label Apr 30, 2019
@jcansdale jcansdale merged commit 8783e10 into master Apr 30, 2019
2 of 3 checks passed
2 of 3 checks passed
github.VisualStudio Build #20190430.4 failed
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@jcansdale jcansdale deleted the fixes/2336-2fa-on-2015 branch Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.