bsky-app/modules/react-native-ui-text-view/ios/RNUITextView.swift

154 lines
4.6 KiB
Swift
Raw Normal View History

Merge PR #2495 by haileyok Squashed commit of the following: commit 9d9c46ced116079add8ae1beaed854b38962d608 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 14:12:32 2024 -0800 Fix reference error on the web build commit 1981621c5b6f2b63b3e3875b68721161487d7df0 Merge: cda4fe4a 0d9b6954 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 12:43:51 2024 -0800 Merge branch 'feat/selectable-text' of https://github.com/haileyok/social-app into haileyok-feat/selectable-text commit 0d9b6954472bb89f63be479d79986bb6d8b7e735 Merge: 3c381f94 f1a7a571 Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Fri Jan 19 16:42:13 2024 -0800 Merge branch 'main' into feat/selectable-text commit 3c381f94700167367b8519cb5d56360c51cea131 Merge: f9510156 fb596e7f Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Thu Jan 18 23:48:10 2024 -0800 Merge branch 'main' into feat/selectable-text commit f951015637132d99d3523c1d93279b6b0b728293 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:46:25 2024 -0800 update readme commit aa9b8b06eda6c4a00f7e4b0bcd5f7e5205c9b166 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:37:49 2024 -0800 calculate line height commit 9fe479630c763fe3fe5dd7b8a5a6d82803f1ad06 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:19:31 2024 -0800 improve height calculation, render on prop changes commit 209caffa7df30af933eff10ab16bf32d53b26df4 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 22:53:08 2024 -0800 presses commit 384c8ec3a8774b075d0dca665d01de82ff9d19bd Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:57:56 2024 -0800 line break mode commit adfcf05fe498b5ab6554e9b3fd399d7dd3ade79b Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:50:21 2024 -0800 onTextLayout event commit e9ba104e6f12eb8144ee752335cdeecdfbf3d8e5 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:34:35 2024 -0800 better naming commit e335f5ab7f813ec0d458476eeb91d0070fde0933 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:31:38 2024 -0800 remove android commit 9e197934ba996a422ab03a204255a1b0b40d2d25 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:28:28 2024 -0800 remove expo module commit 99882c7e3976a0cb59648e67f0eb4916f93f6830 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:27:43 2024 -0800 handle presses commit 18f818649efcd1e18c810aaf4ea1a4cb93ddd111 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:14:38 2024 -0800 make use of rctshadowview commit 7134e1106e338013555c984607d51124727b9264 Author: Hailey <me@haileyok.com> Date: Wed Jan 17 20:38:39 2024 -0800 stop unnecessary layouts, resize container before setting text commit 340b84f053d48e45a5e4e9648ac4f87fc00e5f4a Author: Hailey <me@haileyok.com> Date: Wed Jan 17 11:17:36 2024 -0800 handle prop changes for both children and root views commit d906fe4fcfa4a919dbb66f4ec3f17e8f8be8bf02 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 18:42:22 2024 -0800 handle onpress better commit b6b096416894893973be54793f4d3e3f08974293 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 16:57:31 2024 -0800 resolve animation issue, animate alt text expansion commit daedd1f671fc933af27e2953b52b3a08eddb7c92 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 15:47:24 2024 -0800 move getChildren to didMoveToWindow commit 87d44e4b576cce56a12a1f887e1b9605db1427aa Author: Hailey <me@haileyok.com> Date: Mon Jan 15 18:48:36 2024 -0800 simplify getPressed commit d92584bad7db7179d95f155bd480854df8fae17f Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:56:43 2024 -0800 just more cleanup commit d39f7a937dc8b47b98d120469db35d697bcf74be Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:03:19 2024 -0800 remove unnecessary property for gesture recognizer commit a35513a1d236bcd94aab0e7c5ac1cd0907f61762 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:55:36 2024 -0800 remove debug line commit 788956aa01d2b46783ad0d0a45949fc5ca9e0aab Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:33:44 2024 -0800 typo commit a3ba6e782542a8e9ca09b5b49b1043ba046dcc70 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 13:42:25 2024 -0800 make alt text selectable commit e5472a13da277ef7cccb870d62197dd86b9c3e86 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 05:27:15 2024 -0800 re-render on numberOfLines change commit 9f5b7602c11a92cb83704feb3946fe6b4f584fa5 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 04:57:35 2024 -0800 more implementations commit aa96bba0664d14f12ee742739c70847407062f35 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 03:12:43 2024 -0800 merge main in what are you doing there? go away fix recognizer to clear selected text on tap remove jank/hacks update readme remove android stuff (?) don't remove clipped subview on android for selection enable selection of alt text add numberOfLines properly apply container styles handle both selection and expand press events in alt text far better implementation revert link changes revert lightbox changes for now fix file name commit ec8c05f3f05949b6e3ae8be2e4d153d7d51b18f9 Merge: 2435a252 12a0ceee Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:41:10 2024 -0800 Merge branch 'main' into feat/selectable-text # Conflicts: # src/view/com/util/Link.tsx commit 2435a25257c4a3b12c38949b1928848a0acf1a97 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:30:13 2024 -0800 cleanup commit fdf75927f6fc176a390a11cba56e462c6fe48bdf Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:23 2024 -0800 remove debug commit 36d8cd82ef57483dcf3740c803c6524bc76e87c9 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:17 2024 -0800 reset text selection on text update commit b8f7bc23c2df8532941af8b62a4d36a4814c5965 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:24:43 2024 -0800 use textkit 1 commit 5216464458f4ffd1d6384a1d15ca7be5e8a96d5d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:50:15 2024 -0800 properly handle link press events commit 2802902c69f5d68140c3b573115e8e73638ce9b5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:49:47 2024 -0800 modify Link so that we can create the TextLink press handler outside commit 860610e63ab15cfa9b18da317243137b35a6bf6d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 19:17:51 2024 -0800 always make sure we use the latest styles commit 7f05d0141b6355aa4f521f91056edc06ffc2f5ba Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:57:08 2024 -0800 update readme with tech info commit b8318446a34d07fb0fc37029c3143d0b81eb2b29 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:35 2024 -0800 remove all uitextview padding commit 0f0b6aa131a1e68e0e4eeb456157c866ebc85de3 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:28 2024 -0800 cleanup imports commit c9f0064836d5fe26c55ce571b5d1abf5678ca3a5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:18:08 2024 -0800 update interface commit 7dcac644baeedb506f91f1f4dcaf80dbfb46f610 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:49 2024 -0800 remove useless struct commit 5174744213c97cb74ca7fe3a513a3abc108fe83d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:34 2024 -0800 adjust deps commit ce8b9ed62bcf484ad498b0de05998d8986b132ac Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:15:50 2024 -0800 add readme, update info commit 33c6e3b15c64bcb952b62d1f5c3100c517a64c57 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:04:53 2024 -0800 remove unnecessary android/web stuff commit fbca531bdfeff90bd2a99214482e102f2601c453 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:02:30 2024 -0800 simplify cast of string.index to int before i forget commit 648552eafbc3bf861567ca160c6e84295eec26f8 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 02:01:20 2024 -0800 wip commit c6d2e54923e779180f456bef3ba275dcb2f74d5d Author: Hailey <me@haileyok.com> Date: Thu Jan 11 00:38:47 2024 -0800 selectable text experiment
2024-01-23 23:14:46 +01:00
class RNUITextView: UIView {
var textView: UITextView
@objc var numberOfLines: Int = 0 {
didSet {
textView.textContainer.maximumNumberOfLines = numberOfLines
}
}
@objc var selectable: Bool = true {
didSet {
textView.isSelectable = selectable
}
}
@objc var ellipsizeMode: String = "tail" {
didSet {
textView.textContainer.lineBreakMode = self.getLineBreakMode()
}
}
@objc var onTextLayout: RCTDirectEventBlock?
override init(frame: CGRect) {
if #available(iOS 16.0, *) {
textView = UITextView(usingTextLayoutManager: false)
} else {
textView = UITextView()
}
// Disable scrolling
textView.isScrollEnabled = false
// Remove all the padding
textView.textContainerInset = .zero
textView.textContainer.lineFragmentPadding = 0
// Remove other properties
textView.isEditable = false
textView.backgroundColor = .clear
// Init
super.init(frame: frame)
self.clipsToBounds = true
// Add the view
addSubview(textView)
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(callOnPress(_:)))
tapGestureRecognizer.isEnabled = true
textView.addGestureRecognizer(tapGestureRecognizer)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
// Resolves some animation issues
override func reactSetFrame(_ frame: CGRect) {
UIView.performWithoutAnimation {
super.reactSetFrame(frame)
}
}
func setText(string: NSAttributedString, size: CGSize, numberOfLines: Int) -> Void {
self.textView.frame.size = size
self.textView.textContainer.maximumNumberOfLines = numberOfLines
self.textView.attributedText = string
self.textView.selectedTextRange = nil
if let onTextLayout = self.onTextLayout {
var lines: [String] = []
textView.layoutManager.enumerateLineFragments(
forGlyphRange: NSRange(location: 0, length: textView.attributedText.length))
{ (rect, usedRect, textContainer, glyphRange, stop) in
let characterRange = self.textView.layoutManager.characterRange(forGlyphRange: glyphRange, actualGlyphRange: nil)
let line = (self.textView.text as NSString).substring(with: characterRange)
lines.append(line)
}
onTextLayout([
"lines": lines
])
}
}
@IBAction func callOnPress(_ sender: UITapGestureRecognizer) -> Void {
// If we find a child, then call onPress
if let child = getPressed(sender) {
if textView.selectedTextRange == nil, let onPress = child.onPress {
onPress(["": ""])
} else {
// Clear the selected text range if we are not pressing on a link
textView.selectedTextRange = nil
}
}
}
// Try to get the pressed segment
func getPressed(_ sender: UITapGestureRecognizer) -> RNUITextViewChild? {
let layoutManager = textView.layoutManager
var location = sender.location(in: textView)
// Remove the padding
location.x -= textView.textContainerInset.left
location.y -= textView.textContainerInset.top
// Get the index of the char
let charIndex = layoutManager.characterIndex(
for: location,
in: textView.textContainer,
fractionOfDistanceBetweenInsertionPoints: nil
)
2024-02-28 22:28:27 +01:00
var lastUpperBound: String.Index? = nil
Merge PR #2495 by haileyok Squashed commit of the following: commit 9d9c46ced116079add8ae1beaed854b38962d608 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 14:12:32 2024 -0800 Fix reference error on the web build commit 1981621c5b6f2b63b3e3875b68721161487d7df0 Merge: cda4fe4a 0d9b6954 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 12:43:51 2024 -0800 Merge branch 'feat/selectable-text' of https://github.com/haileyok/social-app into haileyok-feat/selectable-text commit 0d9b6954472bb89f63be479d79986bb6d8b7e735 Merge: 3c381f94 f1a7a571 Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Fri Jan 19 16:42:13 2024 -0800 Merge branch 'main' into feat/selectable-text commit 3c381f94700167367b8519cb5d56360c51cea131 Merge: f9510156 fb596e7f Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Thu Jan 18 23:48:10 2024 -0800 Merge branch 'main' into feat/selectable-text commit f951015637132d99d3523c1d93279b6b0b728293 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:46:25 2024 -0800 update readme commit aa9b8b06eda6c4a00f7e4b0bcd5f7e5205c9b166 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:37:49 2024 -0800 calculate line height commit 9fe479630c763fe3fe5dd7b8a5a6d82803f1ad06 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:19:31 2024 -0800 improve height calculation, render on prop changes commit 209caffa7df30af933eff10ab16bf32d53b26df4 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 22:53:08 2024 -0800 presses commit 384c8ec3a8774b075d0dca665d01de82ff9d19bd Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:57:56 2024 -0800 line break mode commit adfcf05fe498b5ab6554e9b3fd399d7dd3ade79b Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:50:21 2024 -0800 onTextLayout event commit e9ba104e6f12eb8144ee752335cdeecdfbf3d8e5 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:34:35 2024 -0800 better naming commit e335f5ab7f813ec0d458476eeb91d0070fde0933 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:31:38 2024 -0800 remove android commit 9e197934ba996a422ab03a204255a1b0b40d2d25 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:28:28 2024 -0800 remove expo module commit 99882c7e3976a0cb59648e67f0eb4916f93f6830 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:27:43 2024 -0800 handle presses commit 18f818649efcd1e18c810aaf4ea1a4cb93ddd111 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:14:38 2024 -0800 make use of rctshadowview commit 7134e1106e338013555c984607d51124727b9264 Author: Hailey <me@haileyok.com> Date: Wed Jan 17 20:38:39 2024 -0800 stop unnecessary layouts, resize container before setting text commit 340b84f053d48e45a5e4e9648ac4f87fc00e5f4a Author: Hailey <me@haileyok.com> Date: Wed Jan 17 11:17:36 2024 -0800 handle prop changes for both children and root views commit d906fe4fcfa4a919dbb66f4ec3f17e8f8be8bf02 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 18:42:22 2024 -0800 handle onpress better commit b6b096416894893973be54793f4d3e3f08974293 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 16:57:31 2024 -0800 resolve animation issue, animate alt text expansion commit daedd1f671fc933af27e2953b52b3a08eddb7c92 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 15:47:24 2024 -0800 move getChildren to didMoveToWindow commit 87d44e4b576cce56a12a1f887e1b9605db1427aa Author: Hailey <me@haileyok.com> Date: Mon Jan 15 18:48:36 2024 -0800 simplify getPressed commit d92584bad7db7179d95f155bd480854df8fae17f Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:56:43 2024 -0800 just more cleanup commit d39f7a937dc8b47b98d120469db35d697bcf74be Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:03:19 2024 -0800 remove unnecessary property for gesture recognizer commit a35513a1d236bcd94aab0e7c5ac1cd0907f61762 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:55:36 2024 -0800 remove debug line commit 788956aa01d2b46783ad0d0a45949fc5ca9e0aab Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:33:44 2024 -0800 typo commit a3ba6e782542a8e9ca09b5b49b1043ba046dcc70 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 13:42:25 2024 -0800 make alt text selectable commit e5472a13da277ef7cccb870d62197dd86b9c3e86 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 05:27:15 2024 -0800 re-render on numberOfLines change commit 9f5b7602c11a92cb83704feb3946fe6b4f584fa5 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 04:57:35 2024 -0800 more implementations commit aa96bba0664d14f12ee742739c70847407062f35 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 03:12:43 2024 -0800 merge main in what are you doing there? go away fix recognizer to clear selected text on tap remove jank/hacks update readme remove android stuff (?) don't remove clipped subview on android for selection enable selection of alt text add numberOfLines properly apply container styles handle both selection and expand press events in alt text far better implementation revert link changes revert lightbox changes for now fix file name commit ec8c05f3f05949b6e3ae8be2e4d153d7d51b18f9 Merge: 2435a252 12a0ceee Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:41:10 2024 -0800 Merge branch 'main' into feat/selectable-text # Conflicts: # src/view/com/util/Link.tsx commit 2435a25257c4a3b12c38949b1928848a0acf1a97 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:30:13 2024 -0800 cleanup commit fdf75927f6fc176a390a11cba56e462c6fe48bdf Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:23 2024 -0800 remove debug commit 36d8cd82ef57483dcf3740c803c6524bc76e87c9 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:17 2024 -0800 reset text selection on text update commit b8f7bc23c2df8532941af8b62a4d36a4814c5965 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:24:43 2024 -0800 use textkit 1 commit 5216464458f4ffd1d6384a1d15ca7be5e8a96d5d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:50:15 2024 -0800 properly handle link press events commit 2802902c69f5d68140c3b573115e8e73638ce9b5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:49:47 2024 -0800 modify Link so that we can create the TextLink press handler outside commit 860610e63ab15cfa9b18da317243137b35a6bf6d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 19:17:51 2024 -0800 always make sure we use the latest styles commit 7f05d0141b6355aa4f521f91056edc06ffc2f5ba Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:57:08 2024 -0800 update readme with tech info commit b8318446a34d07fb0fc37029c3143d0b81eb2b29 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:35 2024 -0800 remove all uitextview padding commit 0f0b6aa131a1e68e0e4eeb456157c866ebc85de3 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:28 2024 -0800 cleanup imports commit c9f0064836d5fe26c55ce571b5d1abf5678ca3a5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:18:08 2024 -0800 update interface commit 7dcac644baeedb506f91f1f4dcaf80dbfb46f610 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:49 2024 -0800 remove useless struct commit 5174744213c97cb74ca7fe3a513a3abc108fe83d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:34 2024 -0800 adjust deps commit ce8b9ed62bcf484ad498b0de05998d8986b132ac Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:15:50 2024 -0800 add readme, update info commit 33c6e3b15c64bcb952b62d1f5c3100c517a64c57 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:04:53 2024 -0800 remove unnecessary android/web stuff commit fbca531bdfeff90bd2a99214482e102f2601c453 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:02:30 2024 -0800 simplify cast of string.index to int before i forget commit 648552eafbc3bf861567ca160c6e84295eec26f8 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 02:01:20 2024 -0800 wip commit c6d2e54923e779180f456bef3ba275dcb2f74d5d Author: Hailey <me@haileyok.com> Date: Thu Jan 11 00:38:47 2024 -0800 selectable text experiment
2024-01-23 23:14:46 +01:00
for child in self.reactSubviews() {
if let child = child as? RNUITextViewChild, let childText = child.text {
let fullText = self.textView.attributedText.string
2024-02-28 17:31:04 +01:00
// We want to skip over the children we have already checked, otherwise we could run into
// collisions of similar strings (i.e. links that get shortened to the same hostname but
// different paths)
2024-02-28 22:28:27 +01:00
let range = fullText.range(of: childText, options: [], range: (lastUpperBound ?? String.Index(utf16Offset: 0, in: fullText) )..<fullText.endIndex)
2024-02-28 17:31:04 +01:00
Merge PR #2495 by haileyok Squashed commit of the following: commit 9d9c46ced116079add8ae1beaed854b38962d608 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 14:12:32 2024 -0800 Fix reference error on the web build commit 1981621c5b6f2b63b3e3875b68721161487d7df0 Merge: cda4fe4a 0d9b6954 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 12:43:51 2024 -0800 Merge branch 'feat/selectable-text' of https://github.com/haileyok/social-app into haileyok-feat/selectable-text commit 0d9b6954472bb89f63be479d79986bb6d8b7e735 Merge: 3c381f94 f1a7a571 Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Fri Jan 19 16:42:13 2024 -0800 Merge branch 'main' into feat/selectable-text commit 3c381f94700167367b8519cb5d56360c51cea131 Merge: f9510156 fb596e7f Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Thu Jan 18 23:48:10 2024 -0800 Merge branch 'main' into feat/selectable-text commit f951015637132d99d3523c1d93279b6b0b728293 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:46:25 2024 -0800 update readme commit aa9b8b06eda6c4a00f7e4b0bcd5f7e5205c9b166 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:37:49 2024 -0800 calculate line height commit 9fe479630c763fe3fe5dd7b8a5a6d82803f1ad06 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:19:31 2024 -0800 improve height calculation, render on prop changes commit 209caffa7df30af933eff10ab16bf32d53b26df4 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 22:53:08 2024 -0800 presses commit 384c8ec3a8774b075d0dca665d01de82ff9d19bd Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:57:56 2024 -0800 line break mode commit adfcf05fe498b5ab6554e9b3fd399d7dd3ade79b Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:50:21 2024 -0800 onTextLayout event commit e9ba104e6f12eb8144ee752335cdeecdfbf3d8e5 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:34:35 2024 -0800 better naming commit e335f5ab7f813ec0d458476eeb91d0070fde0933 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:31:38 2024 -0800 remove android commit 9e197934ba996a422ab03a204255a1b0b40d2d25 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:28:28 2024 -0800 remove expo module commit 99882c7e3976a0cb59648e67f0eb4916f93f6830 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:27:43 2024 -0800 handle presses commit 18f818649efcd1e18c810aaf4ea1a4cb93ddd111 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:14:38 2024 -0800 make use of rctshadowview commit 7134e1106e338013555c984607d51124727b9264 Author: Hailey <me@haileyok.com> Date: Wed Jan 17 20:38:39 2024 -0800 stop unnecessary layouts, resize container before setting text commit 340b84f053d48e45a5e4e9648ac4f87fc00e5f4a Author: Hailey <me@haileyok.com> Date: Wed Jan 17 11:17:36 2024 -0800 handle prop changes for both children and root views commit d906fe4fcfa4a919dbb66f4ec3f17e8f8be8bf02 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 18:42:22 2024 -0800 handle onpress better commit b6b096416894893973be54793f4d3e3f08974293 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 16:57:31 2024 -0800 resolve animation issue, animate alt text expansion commit daedd1f671fc933af27e2953b52b3a08eddb7c92 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 15:47:24 2024 -0800 move getChildren to didMoveToWindow commit 87d44e4b576cce56a12a1f887e1b9605db1427aa Author: Hailey <me@haileyok.com> Date: Mon Jan 15 18:48:36 2024 -0800 simplify getPressed commit d92584bad7db7179d95f155bd480854df8fae17f Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:56:43 2024 -0800 just more cleanup commit d39f7a937dc8b47b98d120469db35d697bcf74be Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:03:19 2024 -0800 remove unnecessary property for gesture recognizer commit a35513a1d236bcd94aab0e7c5ac1cd0907f61762 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:55:36 2024 -0800 remove debug line commit 788956aa01d2b46783ad0d0a45949fc5ca9e0aab Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:33:44 2024 -0800 typo commit a3ba6e782542a8e9ca09b5b49b1043ba046dcc70 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 13:42:25 2024 -0800 make alt text selectable commit e5472a13da277ef7cccb870d62197dd86b9c3e86 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 05:27:15 2024 -0800 re-render on numberOfLines change commit 9f5b7602c11a92cb83704feb3946fe6b4f584fa5 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 04:57:35 2024 -0800 more implementations commit aa96bba0664d14f12ee742739c70847407062f35 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 03:12:43 2024 -0800 merge main in what are you doing there? go away fix recognizer to clear selected text on tap remove jank/hacks update readme remove android stuff (?) don't remove clipped subview on android for selection enable selection of alt text add numberOfLines properly apply container styles handle both selection and expand press events in alt text far better implementation revert link changes revert lightbox changes for now fix file name commit ec8c05f3f05949b6e3ae8be2e4d153d7d51b18f9 Merge: 2435a252 12a0ceee Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:41:10 2024 -0800 Merge branch 'main' into feat/selectable-text # Conflicts: # src/view/com/util/Link.tsx commit 2435a25257c4a3b12c38949b1928848a0acf1a97 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:30:13 2024 -0800 cleanup commit fdf75927f6fc176a390a11cba56e462c6fe48bdf Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:23 2024 -0800 remove debug commit 36d8cd82ef57483dcf3740c803c6524bc76e87c9 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:17 2024 -0800 reset text selection on text update commit b8f7bc23c2df8532941af8b62a4d36a4814c5965 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:24:43 2024 -0800 use textkit 1 commit 5216464458f4ffd1d6384a1d15ca7be5e8a96d5d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:50:15 2024 -0800 properly handle link press events commit 2802902c69f5d68140c3b573115e8e73638ce9b5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:49:47 2024 -0800 modify Link so that we can create the TextLink press handler outside commit 860610e63ab15cfa9b18da317243137b35a6bf6d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 19:17:51 2024 -0800 always make sure we use the latest styles commit 7f05d0141b6355aa4f521f91056edc06ffc2f5ba Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:57:08 2024 -0800 update readme with tech info commit b8318446a34d07fb0fc37029c3143d0b81eb2b29 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:35 2024 -0800 remove all uitextview padding commit 0f0b6aa131a1e68e0e4eeb456157c866ebc85de3 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:28 2024 -0800 cleanup imports commit c9f0064836d5fe26c55ce571b5d1abf5678ca3a5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:18:08 2024 -0800 update interface commit 7dcac644baeedb506f91f1f4dcaf80dbfb46f610 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:49 2024 -0800 remove useless struct commit 5174744213c97cb74ca7fe3a513a3abc108fe83d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:34 2024 -0800 adjust deps commit ce8b9ed62bcf484ad498b0de05998d8986b132ac Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:15:50 2024 -0800 add readme, update info commit 33c6e3b15c64bcb952b62d1f5c3100c517a64c57 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:04:53 2024 -0800 remove unnecessary android/web stuff commit fbca531bdfeff90bd2a99214482e102f2601c453 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:02:30 2024 -0800 simplify cast of string.index to int before i forget commit 648552eafbc3bf861567ca160c6e84295eec26f8 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 02:01:20 2024 -0800 wip commit c6d2e54923e779180f456bef3ba275dcb2f74d5d Author: Hailey <me@haileyok.com> Date: Thu Jan 11 00:38:47 2024 -0800 selectable text experiment
2024-01-23 23:14:46 +01:00
if let lowerBound = range?.lowerBound, let upperBound = range?.upperBound {
2024-02-28 17:31:04 +01:00
let lowerOffset = lowerBound.utf16Offset(in: fullText)
let upperOffset = upperBound.utf16Offset(in: fullText)
if charIndex >= lowerOffset,
charIndex <= upperOffset
{
Merge PR #2495 by haileyok Squashed commit of the following: commit 9d9c46ced116079add8ae1beaed854b38962d608 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 14:12:32 2024 -0800 Fix reference error on the web build commit 1981621c5b6f2b63b3e3875b68721161487d7df0 Merge: cda4fe4a 0d9b6954 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 12:43:51 2024 -0800 Merge branch 'feat/selectable-text' of https://github.com/haileyok/social-app into haileyok-feat/selectable-text commit 0d9b6954472bb89f63be479d79986bb6d8b7e735 Merge: 3c381f94 f1a7a571 Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Fri Jan 19 16:42:13 2024 -0800 Merge branch 'main' into feat/selectable-text commit 3c381f94700167367b8519cb5d56360c51cea131 Merge: f9510156 fb596e7f Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Thu Jan 18 23:48:10 2024 -0800 Merge branch 'main' into feat/selectable-text commit f951015637132d99d3523c1d93279b6b0b728293 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:46:25 2024 -0800 update readme commit aa9b8b06eda6c4a00f7e4b0bcd5f7e5205c9b166 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:37:49 2024 -0800 calculate line height commit 9fe479630c763fe3fe5dd7b8a5a6d82803f1ad06 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:19:31 2024 -0800 improve height calculation, render on prop changes commit 209caffa7df30af933eff10ab16bf32d53b26df4 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 22:53:08 2024 -0800 presses commit 384c8ec3a8774b075d0dca665d01de82ff9d19bd Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:57:56 2024 -0800 line break mode commit adfcf05fe498b5ab6554e9b3fd399d7dd3ade79b Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:50:21 2024 -0800 onTextLayout event commit e9ba104e6f12eb8144ee752335cdeecdfbf3d8e5 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:34:35 2024 -0800 better naming commit e335f5ab7f813ec0d458476eeb91d0070fde0933 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:31:38 2024 -0800 remove android commit 9e197934ba996a422ab03a204255a1b0b40d2d25 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:28:28 2024 -0800 remove expo module commit 99882c7e3976a0cb59648e67f0eb4916f93f6830 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:27:43 2024 -0800 handle presses commit 18f818649efcd1e18c810aaf4ea1a4cb93ddd111 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:14:38 2024 -0800 make use of rctshadowview commit 7134e1106e338013555c984607d51124727b9264 Author: Hailey <me@haileyok.com> Date: Wed Jan 17 20:38:39 2024 -0800 stop unnecessary layouts, resize container before setting text commit 340b84f053d48e45a5e4e9648ac4f87fc00e5f4a Author: Hailey <me@haileyok.com> Date: Wed Jan 17 11:17:36 2024 -0800 handle prop changes for both children and root views commit d906fe4fcfa4a919dbb66f4ec3f17e8f8be8bf02 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 18:42:22 2024 -0800 handle onpress better commit b6b096416894893973be54793f4d3e3f08974293 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 16:57:31 2024 -0800 resolve animation issue, animate alt text expansion commit daedd1f671fc933af27e2953b52b3a08eddb7c92 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 15:47:24 2024 -0800 move getChildren to didMoveToWindow commit 87d44e4b576cce56a12a1f887e1b9605db1427aa Author: Hailey <me@haileyok.com> Date: Mon Jan 15 18:48:36 2024 -0800 simplify getPressed commit d92584bad7db7179d95f155bd480854df8fae17f Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:56:43 2024 -0800 just more cleanup commit d39f7a937dc8b47b98d120469db35d697bcf74be Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:03:19 2024 -0800 remove unnecessary property for gesture recognizer commit a35513a1d236bcd94aab0e7c5ac1cd0907f61762 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:55:36 2024 -0800 remove debug line commit 788956aa01d2b46783ad0d0a45949fc5ca9e0aab Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:33:44 2024 -0800 typo commit a3ba6e782542a8e9ca09b5b49b1043ba046dcc70 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 13:42:25 2024 -0800 make alt text selectable commit e5472a13da277ef7cccb870d62197dd86b9c3e86 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 05:27:15 2024 -0800 re-render on numberOfLines change commit 9f5b7602c11a92cb83704feb3946fe6b4f584fa5 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 04:57:35 2024 -0800 more implementations commit aa96bba0664d14f12ee742739c70847407062f35 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 03:12:43 2024 -0800 merge main in what are you doing there? go away fix recognizer to clear selected text on tap remove jank/hacks update readme remove android stuff (?) don't remove clipped subview on android for selection enable selection of alt text add numberOfLines properly apply container styles handle both selection and expand press events in alt text far better implementation revert link changes revert lightbox changes for now fix file name commit ec8c05f3f05949b6e3ae8be2e4d153d7d51b18f9 Merge: 2435a252 12a0ceee Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:41:10 2024 -0800 Merge branch 'main' into feat/selectable-text # Conflicts: # src/view/com/util/Link.tsx commit 2435a25257c4a3b12c38949b1928848a0acf1a97 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:30:13 2024 -0800 cleanup commit fdf75927f6fc176a390a11cba56e462c6fe48bdf Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:23 2024 -0800 remove debug commit 36d8cd82ef57483dcf3740c803c6524bc76e87c9 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:17 2024 -0800 reset text selection on text update commit b8f7bc23c2df8532941af8b62a4d36a4814c5965 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:24:43 2024 -0800 use textkit 1 commit 5216464458f4ffd1d6384a1d15ca7be5e8a96d5d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:50:15 2024 -0800 properly handle link press events commit 2802902c69f5d68140c3b573115e8e73638ce9b5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:49:47 2024 -0800 modify Link so that we can create the TextLink press handler outside commit 860610e63ab15cfa9b18da317243137b35a6bf6d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 19:17:51 2024 -0800 always make sure we use the latest styles commit 7f05d0141b6355aa4f521f91056edc06ffc2f5ba Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:57:08 2024 -0800 update readme with tech info commit b8318446a34d07fb0fc37029c3143d0b81eb2b29 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:35 2024 -0800 remove all uitextview padding commit 0f0b6aa131a1e68e0e4eeb456157c866ebc85de3 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:28 2024 -0800 cleanup imports commit c9f0064836d5fe26c55ce571b5d1abf5678ca3a5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:18:08 2024 -0800 update interface commit 7dcac644baeedb506f91f1f4dcaf80dbfb46f610 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:49 2024 -0800 remove useless struct commit 5174744213c97cb74ca7fe3a513a3abc108fe83d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:34 2024 -0800 adjust deps commit ce8b9ed62bcf484ad498b0de05998d8986b132ac Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:15:50 2024 -0800 add readme, update info commit 33c6e3b15c64bcb952b62d1f5c3100c517a64c57 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:04:53 2024 -0800 remove unnecessary android/web stuff commit fbca531bdfeff90bd2a99214482e102f2601c453 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:02:30 2024 -0800 simplify cast of string.index to int before i forget commit 648552eafbc3bf861567ca160c6e84295eec26f8 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 02:01:20 2024 -0800 wip commit c6d2e54923e779180f456bef3ba275dcb2f74d5d Author: Hailey <me@haileyok.com> Date: Thu Jan 11 00:38:47 2024 -0800 selectable text experiment
2024-01-23 23:14:46 +01:00
return child
2024-02-28 17:31:04 +01:00
} else {
2024-02-28 22:28:27 +01:00
lastUpperBound = upperBound
Merge PR #2495 by haileyok Squashed commit of the following: commit 9d9c46ced116079add8ae1beaed854b38962d608 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 14:12:32 2024 -0800 Fix reference error on the web build commit 1981621c5b6f2b63b3e3875b68721161487d7df0 Merge: cda4fe4a 0d9b6954 Author: Paul Frazee <pfrazee@gmail.com> Date: Tue Jan 23 12:43:51 2024 -0800 Merge branch 'feat/selectable-text' of https://github.com/haileyok/social-app into haileyok-feat/selectable-text commit 0d9b6954472bb89f63be479d79986bb6d8b7e735 Merge: 3c381f94 f1a7a571 Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Fri Jan 19 16:42:13 2024 -0800 Merge branch 'main' into feat/selectable-text commit 3c381f94700167367b8519cb5d56360c51cea131 Merge: f9510156 fb596e7f Author: Hailey <153161762+haileyok@users.noreply.github.com> Date: Thu Jan 18 23:48:10 2024 -0800 Merge branch 'main' into feat/selectable-text commit f951015637132d99d3523c1d93279b6b0b728293 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:46:25 2024 -0800 update readme commit aa9b8b06eda6c4a00f7e4b0bcd5f7e5205c9b166 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:37:49 2024 -0800 calculate line height commit 9fe479630c763fe3fe5dd7b8a5a6d82803f1ad06 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 23:19:31 2024 -0800 improve height calculation, render on prop changes commit 209caffa7df30af933eff10ab16bf32d53b26df4 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 22:53:08 2024 -0800 presses commit 384c8ec3a8774b075d0dca665d01de82ff9d19bd Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:57:56 2024 -0800 line break mode commit adfcf05fe498b5ab6554e9b3fd399d7dd3ade79b Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:50:21 2024 -0800 onTextLayout event commit e9ba104e6f12eb8144ee752335cdeecdfbf3d8e5 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:34:35 2024 -0800 better naming commit e335f5ab7f813ec0d458476eeb91d0070fde0933 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:31:38 2024 -0800 remove android commit 9e197934ba996a422ab03a204255a1b0b40d2d25 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:28:28 2024 -0800 remove expo module commit 99882c7e3976a0cb59648e67f0eb4916f93f6830 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:27:43 2024 -0800 handle presses commit 18f818649efcd1e18c810aaf4ea1a4cb93ddd111 Author: Hailey <me@haileyok.com> Date: Thu Jan 18 21:14:38 2024 -0800 make use of rctshadowview commit 7134e1106e338013555c984607d51124727b9264 Author: Hailey <me@haileyok.com> Date: Wed Jan 17 20:38:39 2024 -0800 stop unnecessary layouts, resize container before setting text commit 340b84f053d48e45a5e4e9648ac4f87fc00e5f4a Author: Hailey <me@haileyok.com> Date: Wed Jan 17 11:17:36 2024 -0800 handle prop changes for both children and root views commit d906fe4fcfa4a919dbb66f4ec3f17e8f8be8bf02 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 18:42:22 2024 -0800 handle onpress better commit b6b096416894893973be54793f4d3e3f08974293 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 16:57:31 2024 -0800 resolve animation issue, animate alt text expansion commit daedd1f671fc933af27e2953b52b3a08eddb7c92 Author: Hailey <me@haileyok.com> Date: Tue Jan 16 15:47:24 2024 -0800 move getChildren to didMoveToWindow commit 87d44e4b576cce56a12a1f887e1b9605db1427aa Author: Hailey <me@haileyok.com> Date: Mon Jan 15 18:48:36 2024 -0800 simplify getPressed commit d92584bad7db7179d95f155bd480854df8fae17f Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:56:43 2024 -0800 just more cleanup commit d39f7a937dc8b47b98d120469db35d697bcf74be Author: Hailey <me@haileyok.com> Date: Mon Jan 15 17:03:19 2024 -0800 remove unnecessary property for gesture recognizer commit a35513a1d236bcd94aab0e7c5ac1cd0907f61762 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:55:36 2024 -0800 remove debug line commit 788956aa01d2b46783ad0d0a45949fc5ca9e0aab Author: Hailey <me@haileyok.com> Date: Mon Jan 15 16:33:44 2024 -0800 typo commit a3ba6e782542a8e9ca09b5b49b1043ba046dcc70 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 13:42:25 2024 -0800 make alt text selectable commit e5472a13da277ef7cccb870d62197dd86b9c3e86 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 05:27:15 2024 -0800 re-render on numberOfLines change commit 9f5b7602c11a92cb83704feb3946fe6b4f584fa5 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 04:57:35 2024 -0800 more implementations commit aa96bba0664d14f12ee742739c70847407062f35 Author: Hailey <me@haileyok.com> Date: Mon Jan 15 03:12:43 2024 -0800 merge main in what are you doing there? go away fix recognizer to clear selected text on tap remove jank/hacks update readme remove android stuff (?) don't remove clipped subview on android for selection enable selection of alt text add numberOfLines properly apply container styles handle both selection and expand press events in alt text far better implementation revert link changes revert lightbox changes for now fix file name commit ec8c05f3f05949b6e3ae8be2e4d153d7d51b18f9 Merge: 2435a252 12a0ceee Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:41:10 2024 -0800 Merge branch 'main' into feat/selectable-text # Conflicts: # src/view/com/util/Link.tsx commit 2435a25257c4a3b12c38949b1928848a0acf1a97 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:30:13 2024 -0800 cleanup commit fdf75927f6fc176a390a11cba56e462c6fe48bdf Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:23 2024 -0800 remove debug commit 36d8cd82ef57483dcf3740c803c6524bc76e87c9 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:25:17 2024 -0800 reset text selection on text update commit b8f7bc23c2df8532941af8b62a4d36a4814c5965 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 23:24:43 2024 -0800 use textkit 1 commit 5216464458f4ffd1d6384a1d15ca7be5e8a96d5d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:50:15 2024 -0800 properly handle link press events commit 2802902c69f5d68140c3b573115e8e73638ce9b5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 22:49:47 2024 -0800 modify Link so that we can create the TextLink press handler outside commit 860610e63ab15cfa9b18da317243137b35a6bf6d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 19:17:51 2024 -0800 always make sure we use the latest styles commit 7f05d0141b6355aa4f521f91056edc06ffc2f5ba Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:57:08 2024 -0800 update readme with tech info commit b8318446a34d07fb0fc37029c3143d0b81eb2b29 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:35 2024 -0800 remove all uitextview padding commit 0f0b6aa131a1e68e0e4eeb456157c866ebc85de3 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:34:28 2024 -0800 cleanup imports commit c9f0064836d5fe26c55ce571b5d1abf5678ca3a5 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:18:08 2024 -0800 update interface commit 7dcac644baeedb506f91f1f4dcaf80dbfb46f610 Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:49 2024 -0800 remove useless struct commit 5174744213c97cb74ca7fe3a513a3abc108fe83d Author: Hailey <me@haileyok.com> Date: Fri Jan 12 16:13:34 2024 -0800 adjust deps commit ce8b9ed62bcf484ad498b0de05998d8986b132ac Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:15:50 2024 -0800 add readme, update info commit 33c6e3b15c64bcb952b62d1f5c3100c517a64c57 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:04:53 2024 -0800 remove unnecessary android/web stuff commit fbca531bdfeff90bd2a99214482e102f2601c453 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 22:02:30 2024 -0800 simplify cast of string.index to int before i forget commit 648552eafbc3bf861567ca160c6e84295eec26f8 Author: Hailey <me@haileyok.com> Date: Thu Jan 11 02:01:20 2024 -0800 wip commit c6d2e54923e779180f456bef3ba275dcb2f74d5d Author: Hailey <me@haileyok.com> Date: Thu Jan 11 00:38:47 2024 -0800 selectable text experiment
2024-01-23 23:14:46 +01:00
}
}
}
}
return nil
}
func getLineBreakMode() -> NSLineBreakMode {
switch self.ellipsizeMode {
case "head":
return .byTruncatingHead
case "middle":
return .byTruncatingMiddle
case "tail":
return .byTruncatingTail
case "clip":
return .byClipping
default:
return .byTruncatingTail
}
}
}