-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix History and Bookmarks and ShieldsPanel and 3-Dot menu URL-Eliding #26226
Conversation
ios/brave-ios/Sources/Shared/Extensions/URLFormatterExtension.swift
Outdated
Show resolved
Hide resolved
ios/brave-ios/Sources/Shared/Extensions/URLFormatterExtension.swift
Outdated
Show resolved
Hide resolved
import UIKit | ||
|
||
extension URLFormatter { | ||
public static func createAttributedString( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're better off creating a custom Text
view for this instead btw. something like:
struct URLElidedText: View {
var content: String
@Environment(\.font) private var font: Font
private var paragraphStyle: NSParagraphStyle {
...
}
var body: some View {
Text(AttributedString("\u{200E}\(content)", attributes: [.font: font, paragraphStyle: paragraphStyle]))
}
}```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't address this ☝️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only saw this after. Just pushed a commit to address it: 59cad1f
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import BraveCore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BraveUI
doesn't have a dependency on BraveCore
and probably shouldn't, maybe better to keep this in BraveShared despite it being UI
.font(font ?? .body) | ||
.truncationMode(truncationMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not needed, they're already part of the environment
Released in v1.73.51 |
Verification PASSED on
Verification notes can be found via https://github.com/brave/internal/issues/1217#issuecomment-2443047245. |
Resolves https://github.com/brave/internal/issues/1217
Resolves brave/brave-browser#41954
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: