From b96446bee8778cacaf145e1e5bd36ebe3b343001 Mon Sep 17 00:00:00 2001 From: boreq Date: Fri, 4 Aug 2023 15:37:19 +0200 Subject: [PATCH 1/3] Fix compilation errors --- Source/UI/Identity/IdentityHeaderView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/UI/Identity/IdentityHeaderView.swift b/Source/UI/Identity/IdentityHeaderView.swift index fdd8f4474a..5a2943ad61 100644 --- a/Source/UI/Identity/IdentityHeaderView.swift +++ b/Source/UI/Identity/IdentityHeaderView.swift @@ -97,8 +97,8 @@ struct IdentityHeaderView: View { .font(.subheadline) .lineLimit(1) .foregroundColor(Color.secondaryTxt) - if let aliases, let count = aliases.count, count > 1 { - AliasCountButton(aliases: aliases, count: count - 1) + if let aliases, aliases.count > 1 { + AliasCountButton(aliases: aliases, count: aliases.count - 1) } } if extendedHeader { From a5d99f2224e908e8a1a82c5a1af9253a696db453 Mon Sep 17 00:00:00 2001 From: boreq Date: Mon, 7 Aug 2023 14:23:04 +0200 Subject: [PATCH 2/3] tmp --- Planetary.xcodeproj/project.pbxproj | 10 ++++ Source/Controller/ContactUsMailView.swift | 70 +++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 Source/Controller/ContactUsMailView.swift diff --git a/Planetary.xcodeproj/project.pbxproj b/Planetary.xcodeproj/project.pbxproj index 727ef3b08b..240530ef73 100644 --- a/Planetary.xcodeproj/project.pbxproj +++ b/Planetary.xcodeproj/project.pbxproj @@ -1212,6 +1212,10 @@ C9F5E477288891DC000BCF03 /* HighlightedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9F5E476288891DC000BCF03 /* HighlightedText.swift */; }; C9FBE36C288A1A830068F63A /* SingleAxisGeometryReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9FBE36B288A1A820068F63A /* SingleAxisGeometryReader.swift */; }; C9FBE36D288A1A830068F63A /* SingleAxisGeometryReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9FBE36B288A1A820068F63A /* SingleAxisGeometryReader.swift */; }; + DC08FF842A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; + DC08FF852A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; + DC08FF862A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; + DC08FF872A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; DC8DF3C329A4E35300DDE4FC /* ReceiveLogMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC8DF3C229A4E35300DDE4FC /* ReceiveLogMessage.swift */; }; DC8DF3C429A4E35300DDE4FC /* ReceiveLogMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC8DF3C229A4E35300DDE4FC /* ReceiveLogMessage.swift */; }; E0020B27292D438F002CA1B1 /* RoomAliasAnnouncement+ViewDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0020B26292D438F002CA1B1 /* RoomAliasAnnouncement+ViewDatabase.swift */; }; @@ -1901,6 +1905,7 @@ C9FBE36B288A1A820068F63A /* SingleAxisGeometryReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleAxisGeometryReader.swift; sourceTree = ""; }; CF9B62C70608D7BF6B9E6C75 /* Pods-UnitTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UnitTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests.test.xcconfig"; sourceTree = ""; }; DA47D5E4C3A8F4D56C502C60 /* Pods_Planetary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Planetary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUsMailView.swift; sourceTree = ""; }; DC8DF3C229A4E35300DDE4FC /* ReceiveLogMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReceiveLogMessage.swift; sourceTree = ""; }; E0020B26292D438F002CA1B1 /* RoomAliasAnnouncement+ViewDatabase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RoomAliasAnnouncement+ViewDatabase.swift"; sourceTree = ""; }; E0020B2A292D47E5002CA1B1 /* RoomAliasAnnouncement_registered.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = RoomAliasAnnouncement_registered.json; sourceTree = ""; }; @@ -2202,6 +2207,7 @@ 53B634B322150A4100400403 /* MainViewController.swift */, 0AD8D630240EC38600D87A95 /* ManagePubsViewController.swift */, 5319EBD622F22BA700EC7583 /* MenuViewController.swift */, + DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */, 53B4F5F022B7123900027C6A /* NotificationsViewController.swift */, 5B1FF5E428D8AA25008F3A85 /* RawMessageController.swift */, 0AD8D634240EFF8800D87A95 /* RedeemInviteViewController.swift */, @@ -3758,6 +3764,7 @@ 2358695D24A0FB3500F4FC1D /* Dictionary+JSONSerialization.swift in Sources */, 23EF5AA6249CE69900469977 /* NullBlocksAPI.swift in Sources */, 2358695F24A0FB6500F4FC1D /* Date+ISO8601.swift in Sources */, + DC08FF872A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, 2358695924A0FAE800F4FC1D /* APIError.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3922,6 +3929,7 @@ C949E96F28119B47006C5F18 /* ProgressButton.swift in Sources */, 5B97D1E629635FFF000AA5D1 /* SearchResultsView.swift in Sources */, C9724B742809E7A6000EBCCD /* UIFont+Verse.swift in Sources */, + DC08FF862A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, C969F0E12899CFEE00081615 /* Room.swift in Sources */, 5B46612529CFB537008B8E8C /* LoadingCard.swift in Sources */, C9724BE22809EE7D000EBCCD /* SyncOperation.swift in Sources */, @@ -4372,6 +4380,7 @@ 5314EF5722EA29330065D02A /* GoBotInternal.swift in Sources */, 0A64A83824735392009A5EBF /* PushAPIService.swift in Sources */, 5314EF5C22EA29BA0065D02A /* NSAttributedString+Markdownable.swift in Sources */, + DC08FF852A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, 23EF5AA4249CE69900469977 /* NullBlocksAPI.swift in Sources */, 237D057D2335149200973D63 /* Blob+UIImage.swift in Sources */, 5314EF5222EA28F50065D02A /* Content.swift in Sources */, @@ -4639,6 +4648,7 @@ 5336611122D965B300100707 /* UIColor+Random.swift in Sources */, 5BC7F5082999BCC9007D5566 /* CompactVoteView.swift in Sources */, C9F1C85527C9875A005A3228 /* Color+Hex.swift in Sources */, + DC08FF842A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, 8DA9567D230DA46C00A334EB /* UIButton+Text.swift in Sources */, 53B4F5F122B7123900027C6A /* NotificationsViewController.swift in Sources */, 5BA32EDC291597DE00744984 /* BotRepository.swift in Sources */, diff --git a/Source/Controller/ContactUsMailView.swift b/Source/Controller/ContactUsMailView.swift new file mode 100644 index 0000000000..ee827d8fab --- /dev/null +++ b/Source/Controller/ContactUsMailView.swift @@ -0,0 +1,70 @@ +import MessageUI +import SwiftUI +import Logger + +struct ReportABugMailView: UIViewControllerRepresentable { + + @Environment(\.presentationMode) var presentation + @Binding var result: Result? + + typealias UIViewControllerType = MFMailComposeViewController + + class Coordinator: NSObject, MFMailComposeViewControllerDelegate { + @Binding var presentation: PresentationMode + @Binding var result: Result? + + init( + presentation: Binding, + result: Binding?> + ) { + _presentation = presentation + _result = result + } + func mailComposeController( + _ controller: MFMailComposeViewController, + didFinishWith result: MFMailComposeResult, + error: Error? + ) { + defer { + $presentation.wrappedValue.dismiss() + } + guard error == nil else { + self.result = .failure(error!) + return + } + self.result = .success(result) + } + } + + func makeCoordinator() -> Coordinator { + Coordinator(presentation: presentation, result: $result) + } + + func makeUIViewController(context: Context) -> MFMailComposeViewController { + let mailViewController = MFMailComposeViewController() + mailViewController.mailComposeDelegate = context.coordinator + mailViewController.setToRecipients(["support@planetary.social"]) + mailViewController.setSubject("Reporting a bug in Planetary") + mailViewController.setMessageBody( + "Hello, \n\n I have found a bug in Planetary and would like to provide feedback", + isHTML: false + ) + Task { + do { + /* + mailViewController.addAttachmentData( + try Data(contentsOf: try await LogHelper.zipLogs()), + mimeType: "application/zip", + fileName: "diagnostics.zip" + ) + */ + } catch { + Log.error("failed to zip logs for ReportABugMailView") + } + } + return mailViewController + } + + func updateUIViewController(_ uiViewController: MFMailComposeViewController, context: Context) { + } +} From c408df7cccd70423c549e34c2db743d804e81eee Mon Sep 17 00:00:00 2001 From: boreq Date: Thu, 31 Aug 2023 20:06:02 +0200 Subject: [PATCH 3/3] Remove report bug button, display mail view when the support button is clicked --- Planetary.xcodeproj/project.pbxproj | 10 ---- Source/Controller/ContactUsMailView.swift | 70 ---------------------- Source/Controller/MenuViewController.swift | 52 +++++----------- 3 files changed, 16 insertions(+), 116 deletions(-) delete mode 100644 Source/Controller/ContactUsMailView.swift diff --git a/Planetary.xcodeproj/project.pbxproj b/Planetary.xcodeproj/project.pbxproj index 240530ef73..727ef3b08b 100644 --- a/Planetary.xcodeproj/project.pbxproj +++ b/Planetary.xcodeproj/project.pbxproj @@ -1212,10 +1212,6 @@ C9F5E477288891DC000BCF03 /* HighlightedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9F5E476288891DC000BCF03 /* HighlightedText.swift */; }; C9FBE36C288A1A830068F63A /* SingleAxisGeometryReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9FBE36B288A1A820068F63A /* SingleAxisGeometryReader.swift */; }; C9FBE36D288A1A830068F63A /* SingleAxisGeometryReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9FBE36B288A1A820068F63A /* SingleAxisGeometryReader.swift */; }; - DC08FF842A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; - DC08FF852A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; - DC08FF862A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; - DC08FF872A8116DC009F87D1 /* ContactUsMailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */; }; DC8DF3C329A4E35300DDE4FC /* ReceiveLogMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC8DF3C229A4E35300DDE4FC /* ReceiveLogMessage.swift */; }; DC8DF3C429A4E35300DDE4FC /* ReceiveLogMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC8DF3C229A4E35300DDE4FC /* ReceiveLogMessage.swift */; }; E0020B27292D438F002CA1B1 /* RoomAliasAnnouncement+ViewDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0020B26292D438F002CA1B1 /* RoomAliasAnnouncement+ViewDatabase.swift */; }; @@ -1905,7 +1901,6 @@ C9FBE36B288A1A820068F63A /* SingleAxisGeometryReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleAxisGeometryReader.swift; sourceTree = ""; }; CF9B62C70608D7BF6B9E6C75 /* Pods-UnitTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UnitTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests.test.xcconfig"; sourceTree = ""; }; DA47D5E4C3A8F4D56C502C60 /* Pods_Planetary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Planetary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUsMailView.swift; sourceTree = ""; }; DC8DF3C229A4E35300DDE4FC /* ReceiveLogMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReceiveLogMessage.swift; sourceTree = ""; }; E0020B26292D438F002CA1B1 /* RoomAliasAnnouncement+ViewDatabase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RoomAliasAnnouncement+ViewDatabase.swift"; sourceTree = ""; }; E0020B2A292D47E5002CA1B1 /* RoomAliasAnnouncement_registered.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = RoomAliasAnnouncement_registered.json; sourceTree = ""; }; @@ -2207,7 +2202,6 @@ 53B634B322150A4100400403 /* MainViewController.swift */, 0AD8D630240EC38600D87A95 /* ManagePubsViewController.swift */, 5319EBD622F22BA700EC7583 /* MenuViewController.swift */, - DC08FF832A8116DC009F87D1 /* ContactUsMailView.swift */, 53B4F5F022B7123900027C6A /* NotificationsViewController.swift */, 5B1FF5E428D8AA25008F3A85 /* RawMessageController.swift */, 0AD8D634240EFF8800D87A95 /* RedeemInviteViewController.swift */, @@ -3764,7 +3758,6 @@ 2358695D24A0FB3500F4FC1D /* Dictionary+JSONSerialization.swift in Sources */, 23EF5AA6249CE69900469977 /* NullBlocksAPI.swift in Sources */, 2358695F24A0FB6500F4FC1D /* Date+ISO8601.swift in Sources */, - DC08FF872A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, 2358695924A0FAE800F4FC1D /* APIError.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3929,7 +3922,6 @@ C949E96F28119B47006C5F18 /* ProgressButton.swift in Sources */, 5B97D1E629635FFF000AA5D1 /* SearchResultsView.swift in Sources */, C9724B742809E7A6000EBCCD /* UIFont+Verse.swift in Sources */, - DC08FF862A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, C969F0E12899CFEE00081615 /* Room.swift in Sources */, 5B46612529CFB537008B8E8C /* LoadingCard.swift in Sources */, C9724BE22809EE7D000EBCCD /* SyncOperation.swift in Sources */, @@ -4380,7 +4372,6 @@ 5314EF5722EA29330065D02A /* GoBotInternal.swift in Sources */, 0A64A83824735392009A5EBF /* PushAPIService.swift in Sources */, 5314EF5C22EA29BA0065D02A /* NSAttributedString+Markdownable.swift in Sources */, - DC08FF852A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, 23EF5AA4249CE69900469977 /* NullBlocksAPI.swift in Sources */, 237D057D2335149200973D63 /* Blob+UIImage.swift in Sources */, 5314EF5222EA28F50065D02A /* Content.swift in Sources */, @@ -4648,7 +4639,6 @@ 5336611122D965B300100707 /* UIColor+Random.swift in Sources */, 5BC7F5082999BCC9007D5566 /* CompactVoteView.swift in Sources */, C9F1C85527C9875A005A3228 /* Color+Hex.swift in Sources */, - DC08FF842A8116DC009F87D1 /* ContactUsMailView.swift in Sources */, 8DA9567D230DA46C00A334EB /* UIButton+Text.swift in Sources */, 53B4F5F122B7123900027C6A /* NotificationsViewController.swift in Sources */, 5BA32EDC291597DE00744984 /* BotRepository.swift in Sources */, diff --git a/Source/Controller/ContactUsMailView.swift b/Source/Controller/ContactUsMailView.swift deleted file mode 100644 index ee827d8fab..0000000000 --- a/Source/Controller/ContactUsMailView.swift +++ /dev/null @@ -1,70 +0,0 @@ -import MessageUI -import SwiftUI -import Logger - -struct ReportABugMailView: UIViewControllerRepresentable { - - @Environment(\.presentationMode) var presentation - @Binding var result: Result? - - typealias UIViewControllerType = MFMailComposeViewController - - class Coordinator: NSObject, MFMailComposeViewControllerDelegate { - @Binding var presentation: PresentationMode - @Binding var result: Result? - - init( - presentation: Binding, - result: Binding?> - ) { - _presentation = presentation - _result = result - } - func mailComposeController( - _ controller: MFMailComposeViewController, - didFinishWith result: MFMailComposeResult, - error: Error? - ) { - defer { - $presentation.wrappedValue.dismiss() - } - guard error == nil else { - self.result = .failure(error!) - return - } - self.result = .success(result) - } - } - - func makeCoordinator() -> Coordinator { - Coordinator(presentation: presentation, result: $result) - } - - func makeUIViewController(context: Context) -> MFMailComposeViewController { - let mailViewController = MFMailComposeViewController() - mailViewController.mailComposeDelegate = context.coordinator - mailViewController.setToRecipients(["support@planetary.social"]) - mailViewController.setSubject("Reporting a bug in Planetary") - mailViewController.setMessageBody( - "Hello, \n\n I have found a bug in Planetary and would like to provide feedback", - isHTML: false - ) - Task { - do { - /* - mailViewController.addAttachmentData( - try Data(contentsOf: try await LogHelper.zipLogs()), - mimeType: "application/zip", - fileName: "diagnostics.zip" - ) - */ - } catch { - Log.error("failed to zip logs for ReportABugMailView") - } - } - return mailViewController - } - - func updateUIViewController(_ uiViewController: MFMailComposeViewController, context: Context) { - } -} diff --git a/Source/Controller/MenuViewController.swift b/Source/Controller/MenuViewController.swift index 4163e96440..a53308b659 100644 --- a/Source/Controller/MenuViewController.swift +++ b/Source/Controller/MenuViewController.swift @@ -13,8 +13,9 @@ import Analytics import CrashReporting import Logger import Support +import MessageUI -class MenuViewController: UIViewController, ConnectedPeerListRouter { +class MenuViewController: UIViewController, ConnectedPeerListRouter, MFMailComposeViewControllerDelegate { var menuWidth: CGFloat = 300 @@ -110,7 +111,6 @@ class MenuViewController: UIViewController, ConnectedPeerListRouter { self.menuView.profileButton.addTarget(self, action: #selector(profileButtonTouchUpInside), for: .touchUpInside) self.menuView.settingsButton.addTarget(self, action: #selector(settingsButtonTouchUpInside), for: .touchUpInside) self.menuView.helpButton.addTarget(self, action: #selector(helpButtonTouchUpInside), for: .touchUpInside) - self.menuView.reportBugButton.addTarget(self, action: #selector(reportBugButtonTouchUpInside), for: .touchUpInside) } @objc private func closeButtonTouchUpInside() { @@ -142,31 +142,18 @@ class MenuViewController: UIViewController, ConnectedPeerListRouter { @objc private func helpButtonTouchUpInside() { Analytics.shared.trackDidTapButton(buttonName: "support") - guard let controller = Support.shared.mainViewController() else { - AppController.shared.alert( - title: Localized.error.text, - message: Localized.Error.supportNotConfigured.text, - cancelTitle: Localized.ok.text - ) - return - } - self.close { - AppController.shared.push(controller) - } - } - - @objc private func reportBugButtonTouchUpInside() { - Analytics.shared.trackDidTapButton(buttonName: "report_bug") - guard let controller = Support.shared.myTicketsViewController(from: Bots.current.identity) else { - AppController.shared.alert( - title: Localized.error.text, - message: Localized.Error.supportNotConfigured.text, - cancelTitle: Localized.ok.text - ) - return - } + + let mailViewController = MFMailComposeViewController() + mailViewController.mailComposeDelegate = self + mailViewController.setToRecipients(["support@planetary.social"]) + mailViewController.setSubject("Reporting a bug in Planetary") + mailViewController.setMessageBody( + "Hello, \n\n I have found a bug in Planetary and would like to provide feedback", + isHTML: false + ) + self.close { - AppController.shared.push(controller) + AppController.shared.present(mailViewController, animated: true) } } @@ -225,7 +212,6 @@ private class MenuView: UIView { let profileButton = MenuButton(title: .yourProfile, image: UIImage.verse.profile) let settingsButton = MenuButton(title: .settings, image: UIImage.verse.settings) let helpButton = MenuButton(title: .helpAndSupport, image: UIImage.verse.help) - let reportBugButton = MenuButton(title: .reportBug, image: UIImage.verse.reportBug) init(frame: CGRect, connectedPeersView: UIView) { @@ -298,19 +284,13 @@ private class MenuView: UIView { Layout.fillSouth(of: separator, with: self.helpButton) self.helpButton.constrainHeight(to: 50) self.helpButton.imageEdgeInsets = .top(2) + if !MFMailComposeViewController.canSendMail() { + self.helpButton.isEnabled = false + } separator = Layout.separatorView(color: UIColor.menuBorderColor) Layout.fillSouth(of: self.helpButton, with: separator) - Layout.fillSouth(of: separator, with: self.reportBugButton) - self.reportBugButton.constrainHeight(to: 50) - - separator = Layout.separatorView(color: UIColor.menuBorderColor) - Layout.fillSouth(of: self.reportBugButton, with: separator) - - separator = Layout.separatorView(color: UIColor.menuBorderColor) - Layout.fillSouth(of: reportBugButton, with: separator) - separator.bottomAnchor.constraint(equalTo: menuButtonContainer.bottomAnchor).isActive = true return menuButtonContainer