Skip to content

Commit

Permalink
Address feedback + format
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Oct 25, 2024
1 parent 59cad1f commit b1005f8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import BraveCore
import BraveShared
import BraveUI
import BraveVPN
import BraveWallet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import BraveCore
import BraveUI
import BraveShared
import BraveStrings
import DesignSystem
import Favicon
Expand Down Expand Up @@ -38,10 +38,12 @@ struct HistoryItemView: View {
.fixedSize(horizontal: false, vertical: true)
.foregroundStyle(Color(braveSystemName: .textPrimary))
}

URLElidedText(text: URLFormatter.formatURLOrigin(
forDisplayOmitSchemePathAndTrivialSubdomains: url.absoluteString
))

URLElidedText(
text: URLFormatter.formatURLOrigin(
forDisplayOmitSchemePathAndTrivialSubdomains: url.absoluteString
)
)
.truncationMode(.tail)
.font(.footnote)
.frame(maxWidth: .infinity, alignment: .leading)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import BraveCore
import BraveShared
import BraveShields
import BraveUI
import Data
Expand Down Expand Up @@ -82,8 +83,8 @@ struct ShieldsPanelView: View {
isPrivateBrowsing: viewModel.isPrivateBrowsing
)
URLElidedText(text: displayHost)
.font(.title2)
.foregroundStyle(Color(.bravePrimary))
.font(.title2)
.foregroundStyle(Color(.bravePrimary))
}
.frame(minWidth: .zero, alignment: .center)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public struct URLElidedText: View {
paragraphStyle.baseWritingDirection = .leftToRight
return paragraphStyle
}

public init(text: String) {
self.text = text
}
Expand All @@ -36,7 +36,5 @@ public struct URLElidedText: View {
attributes: .init([.font: font ?? .body, .paragraphStyle: paragraphStyle])
)
)
.font(font ?? .body)
.truncationMode(truncationMode)
}
}

0 comments on commit b1005f8

Please sign in to comment.