News for hackers. Stuff that matters.
Re:Flutter 2 by tvolkert on Wednesday March 03, 2021 @03:17PM (#26333816)
Flutter team member here. In Flutter, the developer consciously decides which text should be selectable (and thus copy/paste'able), so while it's true that text is not inherently selectable in a Flutter app, text that the app developer decided to make selectable will be.
Re:Flutter 2 by selykg on Wednesday March 03, 2021 @03:24PM (#26333905)
This sounds awful. Like some sort of bullshit DRM in a way.

Now I'm thinking of all the ways I could get screwed here.

* Not being able to copy transactions from my bank account

* Not being able to easily send text to a read-later service (not sure if this necessarily depends on selectable text, but who knows, maybe selectable means the text isn't visible to these services now)

* Not being able to easily copy something that needs entering into another page

This reminds of sites that try really hard to NOT allow password managers, or even allowing pasting of text into form fields.

Pass.

Re:Flutter 2 by monkeybutton on Wednesday March 03, 2021 @03:49PM (#26334293)
I use the select text -> web search feature in Chrome all the time to quickly look up definitions of words. Breaking this will be really annoying to anyone reading webpages in a 2nd language than their own.
Re:Flutter 2 by fastball on Wednesday March 03, 2021 @03:47PM (#26334241)
You know devs can already make text not selectable on the web, right?
Re:Flutter 2 by SamBam on Wednesday March 03, 2021 @04:08PM (#26334573)
It takes work to make it non-selectable. In Flutter, it defaults to non-selectable.

Most of the time a dev isn't thinking "I'd better make this selectable," because they simply aren't going to think of all the reasons someone might select text. They'll think of the obvious-to-them cases, and leave all the other text as unselectable.

Re:Flutter 2 by Hixie on Wednesday March 03, 2021 @05:23PM (#26335597)
It doesn't really default to anything. There's a widget for selectable text and a widget for non-selectable text.
Re:Flutter 2 by CGamesPlay on Wednesday March 03, 2021 @08:45PM (#26337554)
OK, but the Flutter gallery has zero selectable text, as far as I can see. Seems like a great case of where developer decided "doesn't need selection, let's let the user drag to scroll with their mouse instead".
Re:Flutter 2 by unityByFreedom on Wednesday March 03, 2021 @09:51PM (#26338024)
Why even make it a 50/50 choice? I hate apps without selectable text and they're everywhere. Translating something becomes a nightmare and that hurts useability.

It's like if you made spoiler 50/50. Do you want to see this without clicking?

I think we really overlook the thought that had gone into making js, and other open tech.

Re:Flutter 2 by SamBam on Wednesday March 03, 2021 @10:30PM (#26338283)
Exactly. And I didn't even realize how often I subconsciously select text while I read until I saw the relevant xkcd. [1]

I truly think my random clicking on paragraphs that I'm approaching isn't just ADHD but a way of helping my eyes stay on track. It's very disconcerting when the text doesn't select. (As, clearly, all these comments noticed as well -- why were we all trying to select the text? To check if it's Flash-ish, of course, but also we just like things to grab onto while we read.)

1. https://xkcd.com/1271/

Re:Flutter 2 by staz on Thursday March 04, 2021 @10:49AM (#26343880)
I would even add this XKCD. https://xkcd.com/1174/

Or even translating...

Try putting their demo website in Google Translate or even try to select the text on an email in their demo webmail app to copy paste it in google translate ....

Re:Flutter 2 by catmanjan on Wednesday March 03, 2021 @03:58PM (#26334434)
Flutter should pick sensible defaults, in this case most agree that text should be selectable
Re:Flutter 2 by shawnz on Wednesday March 03, 2021 @04:40PM (#26335013)
I'm not happy about "user-select" not having an easy override. But at least it can be overridden by a user CSS file or a browser extension, which isn't so bad. This is much worse.
Re:Flutter 2 by capableweb on Wednesday March 03, 2021 @04:03PM (#26334498)
Flutter: defaults to unselectable

Web: defaults to selectable

Flutter on Web: defaults to Flutter, not Web

Re:Flutter 2 by selykg on Wednesday March 03, 2021 @03:55PM (#26334380)
Was not aware of that, thanks for letting me know. In either case, it's a dick move and shouldn't be encouraged.
Re:Flutter 2 by kroltan on Wednesday March 03, 2021 @04:19PM (#26334715)
Yes but on the web you can use a user-agent that doesn't care about what the site says should be selectable, or at least an extension that overrides the CSS in question.
Re:Flutter 2 by lrem on Thursday March 04, 2021 @01:29AM (#26339299)
When was the last time you tried to copy the text of the menu items of whatever native app you're using? Or the tab title?
Re:Flutter 2 by cure on Wednesday March 03, 2021 @03:59PM (#26334436)
Oh boy, that is a spectacularly bad idea.

Not only is this making it easy for app developers to do the wrong thing ("I will just put some text here and make it unselectable, that is going to be great UX") but even worse, it is the default?

There are going to be some unintended consequences here, I suspect.

This reminds me of those websites that use javascript to preventing pasting into password fields "because security", thus breaking everyone's password managers, and making everyone less secure in the process ("if I have to type in that password every time, I'd better choose something simple I can remember...").

So, what about accessibility? If the text is not accessible, how are screen readers going to work?Vision impaired people are just going to have to ... do what, exactly? Will they have to apply OCR to access the content of a Flutter app?

This really reminds me of what was so sucky about Flash. I guess we'll get lots of little walled gardens that make basic interaction via text deliberately difficult. This feels like the opposite of the open web.

Re:Flutter 2 by michaelmrose on Wednesday March 03, 2021 @03:32PM (#26334012)
As a user I don't want the developer to need to anticipate which text ought to be selectable as they will inevitably fail to consider some use cases it ought to be the default.
Re:Flutter 2 by LocalPCGuy on Wednesday March 03, 2021 @03:27PM (#26333942)
In the context of the web, this seems like it should be a non-starter. Why should the developer be able to tell the user what can and cannot be selected?
Re:Flutter 2 by themacguffinman on Wednesday March 03, 2021 @03:49PM (#26334285)
They already can, CSS has a property called "user-select" that can be set to "none". It's pretty common to disable user selection on label text that isn't expected to be copied.
Re:Flutter 2 by mkl on Wednesday March 03, 2021 @04:27PM (#26334820)
This is annoying, but is at least trivial to get around with browser debugging tools. The web developer is not the person whose expectations matter. Selecting label text is almost essential for being to explain to someone else how to do things, or communicate about the interface with the site developer.
Re:Flutter 2 by themacguffinman on Wednesday March 03, 2021 @04:40PM (#26335017)
Depends on the label, it's not essential for plenty of things. I don't, for example, need to copy "Cancel" in my browser before I am capable of talking about the cancel button in the UI. You're right, user expectations are what matter, and users do not expect most buttons and controls to be text-selectable. It was never an expectation in native apps while users find it frustrating when control labels unexpectedly seep into blocks of text they are dragging to select.

Most users don't open devtools to workaround this (Safari doesn't even enable devtools by default). While it's annoying when developers get it wrong (put "user-select: none" on things that should be selectable), this changes very little for the vast majority of web users.

Re:Flutter 2 by danShumway on Wednesday March 03, 2021 @05:44PM (#26335880)
But it changes quite a lot for me.

"This thing that will noticeably make your web experience worse won't affect John over there, so why are you complaining" is not the best response.

I like to be able to override developer decisions about what text is and isn't selectable, and Flutter basically makes that impossible.

Re:Flutter 2 by themacguffinman on Wednesday March 03, 2021 @06:32PM (#26336388)
Sure but presumably many developers who are deciding whether to adopt Flutter aren't only targeting a population of you and other people in this thread. The fact remains that this is not a significant issue for most users and rational developers will weigh it as such against potential benefits that Flutter provides.
Re:Flutter 2 by danShumway on Wednesday March 03, 2021 @09:56PM (#26338060)
I guess but... I don't think that changes anything about the complaints that people have about this. What you're saying is a fact, but I don't think it's a relevant fact.

I'm looking over this thread, nobody has said that they're in a majority. We're just saying that Flutter's default behavior is bad for us, and that it encourages developers to make bad choices about text, and that it's pretty demonstrable that the average Flutter app has less selectable text than the average web app in general.

The fact that many companies will not care about this when weighing the technology is exactly why we're complaining. Because we don't want the web to suddenly become unusable for us just because we're in a minority of users.

It still doesn't make me feel any better or make me any less likely to complain to hear that my problems don't affect everyone else. It's not addressing the criticism, or explaining why I shouldn't be upset about Flutter's decision, or explaining why the current situation on the web is equivalent. It's just a polite way of saying, "yes this will affect you, but we don't care because we don't think you can do anything about it."

And yeah, it's probably true that this issue in specific is not going to cause Flutter to fail (there are plenty of other problems with Flutter on the web that will do that), but does that fact change anything about whether or not widespread Flutter adoption would make my web experience worse?

Re:Flutter 2 by LocalPCGuy on Monday March 08, 2021 @05:10PM (#26392344)
I think you overlook that, at least to me, it's an accessibility thing and as such, is not just the population of people here in this thread but is an issue for anyone who is disabled and takes advantage of those features of the web, and now will not be able to in Flutter apps.

I know Flutter is working on accessibility, but they have already made choices that are counter to the default expectations web users have. And are having to work to fix the accessibility issues they introduced by not adhering to web standards and/or best practices to begin with.

Re:Flutter 2 by LocalPCGuy on Monday March 08, 2021 @05:06PM (#26392312)
I am aware, and I would argue against any spec that told me to implement that also for the same reasons I don't think its a good idea for Flutter. Not that I haven't had to do it for reasons, but I'd make the case against it when I can.

Don't want to restart the entire thread that already existed, but I rarely check comments and just saw this.

Re:Flutter 2 by fastball on Wednesday March 03, 2021 @03:48PM (#26334259)
Um. You can do this in HTML/CSS too.
Re:Flutter 2 by jamil7 on Wednesday March 03, 2021 @04:04PM (#26334525)
Except it’s opt in rather than opt out.
Re:Flutter 2 by fastball on Wednesday March 03, 2021 @06:43PM (#26336506)
It's not really either. There is a widget for selectable text and one for not selectable text.
Re:Flutter 2 by greatwhitenorth on Wednesday March 03, 2021 @03:26PM (#26333919)
Why can't the default be always selectable? Let the developer choose which ones they don't want to be selectable. Also, what is the use case for non selectable behavior?
Re:Flutter 2 by onli on Wednesday March 03, 2021 @04:20PM (#26334731)
Come on. Isn't this only happening because the initial text widget did not have text selection, the one with text selection came later and now we are in this bad situation? Just enable text selection for both/all text widgets when targeting the web. You could couple that with a major version increase...

This feedback you get here will only get worse with time, and it will block adoption.

Re:Flutter 2 by tofuahdude on Wednesday March 03, 2021 @05:32PM (#26335734)
Wow, that is a remarkably terrible default behavior. Virtually all other platforms behave in the opposite manner.

If the goal of the environment is to provide a new standard for cross-platform development, your default behaviors are extremely important decisions.

Re:Flutter 2 by vendiddy on Wednesday March 03, 2021 @09:09PM (#26337727)
I think the selection some improvement improvements needed reach a native-feel. For example, interactions like triple-click to select a line.

However I think the decision to make text selection opt-in makes sense from the context of an application that targets web.

For example, if you open up your mail app or Slack, you will find that a lot of text on the screen isn't selectable. For example, you can't select the text of the tabs on your browser.

If all text was selectable by default for an app, it may cause unexpected results rather than having the develop opt-in to deciding what is selectable. We have many widgets in our app that we wouldn't want selectable for UX reasons.

In practice, it hasn't been much effort for us to make things selectable. Just need to replace a Text widget with a SelectableText widget.

Re:Flutter 2 by wffurr on Wednesday March 03, 2021 @03:57PM (#26334414)
I get that user-select was already a thing in CSS, but why is so much of the text in the demos at https://gallery.flutter.dev/ not-selectable? It's a real bad look.
Re:Flutter 2 by jkrems on Wednesday March 03, 2021 @08:07PM (#26337268)
Is the goal to get full parity with native text selection? I went to the plasma demo and tried to double/triple click on text and it didn't match what text selection is supposed to do, at least on macOS. Which makes it a bit jarring. Right now it seems to be a bit "uncanny valley".

(Disclaimer: I work for Google but not related to Flutter.)

Re:Flutter 2 by mdoms on Wednesday March 03, 2021 @03:46PM (#26334235)
Question for the flutter devs - have you ever used The Internet?
Re:Flutter 2 by fastball on Wednesday March 03, 2021 @03:48PM (#26334269)
Re:Flutter 2 by mdoms on Wednesday March 03, 2021 @04:02PM (#26334488)
Yes I have, which is why I know text can be selected by default in every web environment.
Re:Flutter 2 by fastball on Wednesday March 03, 2021 @06:44PM (#26336514)
There is no default in Flutter. Everything is a widget that you have to deliberately choose.

https://api.flutter.dev/flutter/material/SelectableText-clas...

Re:Flutter 2 by jkrems on Wednesday March 03, 2021 @08:10PM (#26337296)
If `Text` and `SelectableText` exist, I would call that an opt-in. The default is "Text" (not selectable) and a modifier can be applied to opt into using "SelectableText". It would be different if they were called "UnselectableText" and "SelectableText".
Re:Flutter 2 by drusepth on Wednesday March 03, 2021 @08:34PM (#26337464)
Isn't that just semantics?

Seems like every dev using Flutter for more than a few days would know that both `Text` and `SelectableText` exist and pick the one that's relevant to whatever kind of text they're adding. At that point, it's the dev's fault for making a conscious decision to make text selectable or not (if they choose wrong); not really the language's.