Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Buildings blocks are classes uses by devs to enabled General or Feature componen
- ``ContextualHintView``
- ``HeaderView``
- ``LinkButton``
- ``NavigationHeaderView``
- ``PaddedSwitch``
- ``PrimaryRoundedButton``
- ``SecondaryRoundedButton``
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import UIKit

class HeadersViewViewController: UIViewController, Themeable {
let headerTitle = "Website Title"
let backButtonTitle = "Back"
let headerSubtitle = "Website Subtitle"
let errorHeaderSubtitle = "Website Error"

Expand All @@ -17,7 +16,6 @@ class HeadersViewViewController: UIViewController, Themeable {
var themeObserver: NSObjectProtocol?
var notificationCenter: NotificationProtocol = NotificationCenter.default

private lazy var navigationHeaderView: NavigationHeaderView = .build()
private lazy var headerView: HeaderView = .build()
private lazy var errorHeaderView: HeaderView = .build()

Expand All @@ -37,13 +35,6 @@ class HeadersViewViewController: UIViewController, Themeable {
listenForThemeChanges(withNotificationCenter: notificationCenter)
applyTheme()

navigationHeaderView.setViews(with: headerTitle, and: backButtonTitle)
navigationHeaderView.adjustLayout()
navigationHeaderView.setupAccessibility(closeButtonA11yLabel: "CloseA11yLabel",
closeButtonA11yId: "CloseA11yId",
backButtonA11yLabel: "BackButtonA11yLabel",
backButtonA11yId: "BackButtonA11yId")

headerView.adjustLayout()
errorHeaderView.adjustLayout()

Expand All @@ -53,25 +44,31 @@ class HeadersViewViewController: UIViewController, Themeable {
errorHeaderView.setupDetails(subtitle: errorHeaderSubtitle,
title: headerTitle,
icon: UIImage(named: StandardImageIdentifiers.Large.logoFirefox),
warningIcon: StandardImageIdentifiers.Large.criticalFill,
warningIcon: StandardImageIdentifiers.Large.warningFill,
theme: themeManager.currentTheme)

headerView.setupAccessibility(closeButtonA11yLabel: "CloseA11yLabel",
closeButtonA11yId: "CloseA11yId")
errorHeaderView.setupAccessibility(closeButtonA11yLabel: "ErrorCloseA11yLabel",
closeButtonA11yId: "ErrorCloseA11yId")
headerView.setupAccessibility(
faviconA11yId: "FavIconA11yId",
titleLabelA11yId: "TitleA11yId",
subtitleLabelA11yId: "SubtitlesA11yId",
closeButtonA11yLabel: "CloseA11yLabel",
closeButtonA11yId: "CloseA11yId"
)
errorHeaderView.setupAccessibility(
faviconA11yId: "ErrorFavIconA11yId",
titleLabelA11yId: "ErrorTitleA11yId",
subtitleLabelA11yId: "ErrorSubtitlesA11yId",
closeButtonA11yLabel: "ErrorCloseA11yLabel",
closeButtonA11yId: "ErrorCloseA11yId"
)
}

private func setupView() {
view.addSubview(navigationHeaderView)
view.addSubview(headerView)
view.addSubview(errorHeaderView)

NSLayoutConstraint.activate([
navigationHeaderView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),
navigationHeaderView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20),
navigationHeaderView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20),
headerView.topAnchor.constraint(equalTo: navigationHeaderView.bottomAnchor, constant: 40),
headerView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 20),
headerView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),
headerView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20),
errorHeaderView.topAnchor.constraint(equalTo: headerView.bottomAnchor, constant: 40),
Expand All @@ -87,7 +84,6 @@ class HeadersViewViewController: UIViewController, Themeable {
// MARK: Themeable
func applyTheme() {
view.backgroundColor = themeManager.currentTheme.colors.layer1
navigationHeaderView.applyTheme(theme: themeManager.currentTheme)
headerView.applyTheme(theme: themeManager.currentTheme)
errorHeaderView.applyTheme(theme: themeManager.currentTheme)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ struct AccessibilityIdentifiers {

struct DetailsScreen {
static let scrollView = "TrackingProtectionDetails.ScrollView"
static let headerView = "TrackingProtectionDetails.HeaderView"
static let mainView = "TrackingProtectionDetails.MainView"
static let containerView = "TrackingProtectionDetails.BaseView"
static let connectionView = "TrackingProtectionDetails.ConnectionView"
Expand Down Expand Up @@ -218,16 +217,11 @@ struct AccessibilityIdentifiers {
}

struct BlockedTrackersLearnMore {
static let headerView = "BlockedTrackersLearnMore.HeaderView"
static let containerView = "BlockedTrackersLearnMore.containerView"
static let closeButton = "BlockedTrackersLearnMore.CloseButton"
static let backButton = "BlockedTrackersLearnMore.BackButton"
static let titleLabel = "BlockedTrackersLearnMore.TitleLabel"
}

struct CertificatesScreen {
static let headerView = "CertificatesViewController.HeaderView"
}
}

struct FirefoxHomepage {
Expand Down
Loading
Loading