From 31a5d46ee032caa54b2ae2f47e3ce596499b9914 Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Sat, 22 Jun 2019 01:40:16 +0530 Subject: [PATCH] Ios accessibility fixes (#2842) * UCHAT-4371 // MM-15771 - iOS - Larger Fonts Cut Off Text in menu and settings screens revert padding right * Update snapshot --- .../__snapshots__/channel_item.test.js.snap | 28 +++++-------------- .../channel_item/channel_item.js | 4 +-- .../settings/settings_item/style.ios.js | 2 +- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap b/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap index 5940ff56f..8a859004b 100644 --- a/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap +++ b/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap @@ -81,14 +81,12 @@ exports[`ChannelItem should match snapshot 1`] = ` style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", @@ -196,14 +194,12 @@ exports[`ChannelItem should match snapshot for current user i.e currentUser (you style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", @@ -311,14 +307,12 @@ exports[`ChannelItem should match snapshot for current user i.e currentUser (you style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", @@ -426,14 +420,12 @@ exports[`ChannelItem should match snapshot for deactivated user and is currentCh style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", @@ -530,14 +522,12 @@ exports[`ChannelItem should match snapshot for deactivated user and is searchRes style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", @@ -640,14 +630,12 @@ exports[`ChannelItem should match snapshot with draft 1`] = ` style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", @@ -746,14 +734,12 @@ exports[`ChannelItem should match snapshot with mentions and muted 1`] = ` style={ Array [ Object { + "alignSelf": "center", "color": "rgba(255,255,255,0.4)", "flex": 1, "fontSize": 14, "fontWeight": "600", - "height": "100%", - "lineHeight": 44, "paddingRight": 10, - "textAlignVertical": "center", }, Object { "color": "#ffffff", diff --git a/app/components/sidebars/main/channels_list/channel_item/channel_item.js b/app/components/sidebars/main/channels_list/channel_item/channel_item.js index 4e5301985..e1ab8a03a 100644 --- a/app/components/sidebars/main/channels_list/channel_item/channel_item.js +++ b/app/components/sidebars/main/channels_list/channel_item/channel_item.js @@ -242,10 +242,8 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 14, fontWeight: '600', paddingRight: 10, - height: '100%', flex: 1, - textAlignVertical: 'center', - lineHeight: 44, + alignSelf: 'center', }, textActive: { color: theme.sidebarTextActiveColor, diff --git a/app/screens/settings/settings_item/style.ios.js b/app/screens/settings/settings_item/style.ios.js index ddf47bf21..bebbcfe96 100644 --- a/app/screens/settings/settings_item/style.ios.js +++ b/app/screens/settings/settings_item/style.ios.js @@ -40,7 +40,7 @@ export default makeStyleSheetFromTheme((theme) => { color: theme.centerChannelColor, flex: 1, fontSize: 17, - lineHeight: 43, + alignSelf: 'center', }, arrowContainer: { justifyContent: 'center',