MM-28336 Align hamburger menu badges (#4894)

* MM-28336 Align hamburger menu badges

* Fix Fastlane and CI artifacts for PR's

* Fastlane to post to QA build channel

* Fix plist.erb template

* Fix variable type
This commit is contained in:
Elias Nahum 2020-10-19 21:48:37 -03:00 committed by GitHub
parent 043b3a0e8e
commit aeb61cb162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 17 deletions

View file

@ -202,8 +202,13 @@ commands:
filename:
type: string
steps:
- run:
name: Copying artifacts
command: |
mkdir /tmp/artifacts;
cp ~/mattermost-mobile/<<parameters.filename>> /tmp/artifacts;
- store_artifacts:
path: ~/mattermost-mobile/<<parameters.filename>>
path: /tmp/artifacts
jobs:
test:

View file

@ -40,9 +40,9 @@ export const CHANNEL_ITEM_LARGE_BADGE_MAX_WIDTH = 38;
export const CHANNEL_ITEM_SMALL_BADGE_MAX_WIDTH = 32;
export const LARGE_BADGE_MAX_WIDTH = 30;
export const SMALL_BADGE_MAX_WIDTH = 26;
export const MAX_BADGE_RIGHT_POSITION = -17;
export const LARGE_BADGE_RIGHT_POSITION = -16;
export const SMALL_BADGE_RIGHT_POSITION = -13;
export const MAX_BADGE_RIGHT_POSITION = -13;
export const LARGE_BADGE_RIGHT_POSITION = -11;
export const SMALL_BADGE_RIGHT_POSITION = -9;
const ViewTypes = keyMirror({
DATA_CLEANUP: null,

View file

@ -80,7 +80,7 @@ exports[`ChannelDrawerButton should match, full snapshot 2`] = `
"borderRadius": 14,
"borderWidth": 2,
"position": "absolute",
"right": -13,
"right": -9,
"top": -6,
}
}

View file

@ -185,7 +185,8 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
borderRadius: 14,
borderWidth: 2,
position: 'absolute',
right: -7,
right: -4,
top: 0,
},
mention: {

View file

@ -234,17 +234,17 @@ lane :upload_file_to_s3 do |options|
threads.each { |t| t.join }
if is_build_pr
if os_type == 'Android'
if os_type == 'android'
install_url = "https://#{s3_bucket_name}/#{s3_folder}/#{pr_file}"
elsif os_type == 'iOS'
elsif os_type == 'ios'
current_build_number = get_build_number(xcodeproj: './ios/Mattermost.xcodeproj')
plist_template = File.read('plist.erb')
plist_body = ERB.new(plist_template).result(binding)
plist_obj = s3_bucket.object("#{s3_folder}/#{file_plist}")
plist_obj = s3_bucket.object("#{s3_folder}/#{plist_file}")
plist_obj.put(body: plist_body)
install_url = "itms-services://?action=download-manifest&url=https://#{s3_bucket_name}/#{s3_folder}/#{file_plist}"
install_url = "itms-services://?action=download-manifest&url=https://#{s3_bucket_name}/#{s3_folder}/#{plist_file}"
end
qa_build_message({
@ -326,7 +326,7 @@ platform :ios do
update_identifiers
replace_assets
build_ios
upload_file_to_s3({:os_type => "iOS"})
upload_file_to_s3({:os_type => "ios"})
end
desc 'Build an unsigned ipa'
@ -367,7 +367,7 @@ platform :ios do
sh 'rm -rf ../build-ios/'
upload_file_to_s3({
:os_type => "iOS",
:os_type => "ios",
:file => "Mattermost-simulator-x86_64.app.zip"
})
end
@ -591,7 +591,7 @@ platform :android do
link_sentry_android
build_android
move_apk_to_root
upload_file_to_s3({:os_type => "Android"})
upload_file_to_s3({:os_type => "android"})
end
desc 'Build an unsigned apk'
@ -922,10 +922,10 @@ def qa_build_message(options)
unless ENV['MATTERMOST_WEBHOOK_URL'].nil? || ENV['MATTERMOST_WEBHOOK_URL'].empty?
os_type = options[:os_type]
if os_type == 'Android'
if os_type == 'android'
msg = "QA build [#{abbreviated_commit_hash}](https://github.com/mattermost/mattermost-mobile/commit/#{abbreviated_commit_hash}) — [Android APK Link](#{install_url})"
mattermost(message: msg, username: 'Fastlane', icon_url: 'https://lh3.ggpht.com/XL0CrI8skkxnboGct-duyg-bZ_MxJDTrjczyjdU8OP2PM1dmj7SP4jL1K8JQeMIB3AM=w300')
elsif os_type == 'iOS'
elsif os_type == 'ios'
msg = "QA build [#{abbreviated_commit_hash}](https://github.com/mattermost/mattermost-mobile/commit/#{abbreviated_commit_hash}) — [iOS pList Link](#{install_url})"
mattermost(message: msg, username: 'Fastlane', icon_url: 'https://support.apple.com/library/content/dam/edam/applecare/images/en_US/iOS/move-to-ios-icon.png')
end

View file

@ -11,7 +11,7 @@
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://<%= s3_bucket %>/<%= s3_folder %>/<%= filename %>.ipa</string>
<string>https://<%= s3_bucket_name %>/<%= s3_folder %>/<%= pr_file %></string>
</dict>
<dict>
<key>kind</key>
@ -19,7 +19,7 @@
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://<%= s3_bucket %>/<%= ENV['AWS_FOLDER_NAME'] %>/beta-logo.png</string>
<string>https://<%= s3_bucket_name %>/<%= ENV['AWS_FOLDER_NAME'] %>/beta-logo.png</string>
</dict>
</array>
<key>metadata</key>