Skip to content

Fix vault item icon image size to be adaptive on Large Font Size Accessibility#1795

Merged
fedemkr merged 3 commits intomasterfrom
fix-large-font-size-row-height
Feb 22, 2022
Merged

Fix vault item icon image size to be adaptive on Large Font Size Accessibility#1795
fedemkr merged 3 commits intomasterfrom
fix-large-font-size-row-height

Conversation

@fedemkr
Copy link
Copy Markdown
Member

@fedemkr fedemkr commented Feb 21, 2022

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix icon image size to be adaptive on Large Font Size Accessibility which also fixes the row height being really high on large vault items.

Code changes

  • CipherViewCell: Change the Width/HeightrRequest of the CachedImage icon to be calculated with the font scale.

Screenshots

Before:

image

After:

image

image

Testing requirements

Test that the icons have the correct size and check this on large vault as well.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@fedemkr fedemkr self-assigned this Feb 21, 2022
@fedemkr fedemkr requested a review from a team February 21, 2022 14:47
@fedemkr fedemkr enabled auto-merge (squash) February 21, 2022 14:49
var fontScale = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService").GetSystemFontSizeScale();
_iconColumn.Width = new GridLength(40 * fontScale, GridUnitType.Absolute);
_iconImage.WidthRequest = 22 * fontScale;
_iconImage.HeightRequest = 22 * fontScale;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this 22 need to be the same value as the original WidthRequest and HeightRequest? If so, we should consider putting it in a const or grabbing the value from _iconColumn before using it.

Copy link
Copy Markdown
Member Author

@fedemkr fedemkr Feb 22, 2022

Choose a reason for hiding this comment

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

Yes, exactly I'm using the original WidthRequest and HeightRequest. I'll put it in a cost, we can't grab it from _iconColumn (unless we do the math proportion: 40/22=1.82 => _iconImage.WidthRequest = _iconColumn.Width.PropetyForTheActualValue / 1,82 but we'd need a const here as well and it's simpler with the 22 const) 😄 . I'll make the change

@fedemkr fedemkr requested a review from jlf0dev February 22, 2022 14:11
@fedemkr fedemkr merged commit 23ca0f4 into master Feb 22, 2022
@fedemkr fedemkr deleted the fix-large-font-size-row-height branch February 22, 2022 15:33
fedemkr added a commit that referenced this pull request Feb 25, 2022
* master: (82 commits)
  Autosync the updated translations (#1812)
  Apply Disable Favicon setting globally to match desktop (#1811)
  Fix for missing bio unlock on app restart (#1810)
  Changed link on Settings "Change Master Password" and "Two Step Login" to go to the web vault settings. Also refactored a bit to reuse the urls (#1809)
  take environment into account when checking for existing account (#1808)
  Account Switching (#1807)
  Fixes incorrect path in workflow (#1806)
  [BEEEP] - Added workflows to ignored paths (#1802)
  Add dry run option to release workflow (#1801)
  Changed Input keyboard on phone to be the telephone keyboard and also capitalized the keyboard on some fields of add/edit identity (#1800)
  Fix Options being seen in two lines on Add/edit Send (#1798)
  Fix icon image size to be adaptive on Large Font Size Accessibility which fixes row height on large vault (#1795)
  We're Hiring (#1797)
  Moved to new Google Service Account (#1789)
  Moved to new Google Service Account (#1788)
  Move to using shared workflow (#1787)
  Autosync the updated translations (#1786)
  Fixed some Large Font Accessibility issues on Vault and Send screens for Icons Display #1774 (#1785)
  Created initial workflow for workflow linting (#1783)
  Enforce Hold label (#1779)
  ...

# Conflicts:
#	src/App/Pages/Accounts/DeleteAccountViewModel.cs
#	src/App/Pages/Settings/ExportVaultPageViewModel.cs
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