Nantes
Nantes copied to clipboard
WIP - Only handle taps on truncation token
Proof of concept to force users to tap on the truncation token to trigger the label's tap block
@pilky @ValCanBuild Here's what you were looking for as far as only handling taps on the truncation token.
Instead of the boolean to enable / disable force taps on the token, I'm planning on turning it into an enum where you can pick what kind of tap handling you want, but I have a quick usability question. If you enable this mode, what happens after the user taps once and expands the text? Does it make sense to start capturing all taps after? Stop responding to taps? There's no longer truncation text to look for in the string.
I have some pending changes locally I didn't include in here, so I hope it works if you want to give it a shot, but there's more work to be done to support this.
I have a quick usability question. If you enable this mode, what happens after the user taps once and expands the text? Does it make sense to start capturing all taps after? Stop responding to taps? There's no longer truncation text to look for in the string.
For our case stopping responding to taps is ok as we don't allow users to shrink again. I also think this is probably the correct solution for this case as, if someone does want to change to capturing all taps afterwaards, they could change the "mode" inside the labelTappedBlock
@chansen22 I've just tried it with the 2 changes I mentioned and it seems to work pretty well. Thanks for this!
I haven't forgotten about this, coming back when I have a little more time.
@chansen22 status on this one? Would be good to get in. Been using it for a while and seems stable
Sorry, I haven't had any time to jump back in. I should have some coming up soon though.
Since I changed how truncation works in https://github.com/instacart/Nantes/pull/24. I think I should float that one down a little closer (adding tests and making sure it's all solid) and then fix this up + add in a couple improvements on how to enable / disable this setting.
If you've come across any other issues while using this, feel free to add them in this thread. That'll help me finish it up more quickly
Any further progress on this? 😅