News for hackers. Stuff that matters.
Re:Flutter 2 by kureikain on Wednesday March 03, 2021 @02:49PM (#26333437)
I want to love Flutter. But once looking at it, it's a no go. It's the new flash. Really, you cannot copy the text anymore. React native is my goto solution now.
Re:Flutter 2 by kevincox on Wednesday March 03, 2021 @03:05PM (#26333665)
Yup. I would also like to open links in new tabs, view images, copy links, search on page, use browser extensions...

I can see it being useful for games and similar where there isn't really any UI but even then I would want dialogs and similar to use regular text that I can copy.

I am definitely not looking forward to flutter on the web. I foresee a lot of websites that I will need to avoid.

Re:Flutter 2 by pieno on Wednesday March 03, 2021 @04:01PM (#26334472)
But do you really need that as a requirement across the boars for all apps? How many times have you wanted to save an image or copy text from a UI element in a native app? (eg. a save icon and “Save” on a button) How many times have you been frustrated in a web app that when you search using the browser you are getting results from UI elements or “app chrome” instead of the actual content that the web app is displaying? Isn’t it enough to have some fields with content a user actually would want to copy/search, which would be set based on the component type you are using and can be overridden per element if needed?

The only thing I do get is that you’d want open in new tab and copyable links. However, that’s hard from a developer perspective as you have to make sure you create links that store all data needed to rebuild the same UI in the same “conceptual” context but a different underlying data context (logged in user may be different, data may have changed so some saved context has become stale). You’ll likely end up spending an awful lot of time to cater for all the unexpected things that may happen when someone just clicks a link copied from the address bar or a link by another user 2 days before, that may have been the result of that second user clicking through 10 levels deep in your app with all sorts of filters and options based on the state of data at that exact time two days before the first user clicks the link. Obviously you can’t show them the data from two days ago, but what if the data is still there but the path to get there is different? Does it conceptually still make sense to show the data and perhaps some breadcrumbs showing the new path? Or should you just say sorry that data isn’t here anymore? That depends entirely on what the data is and what you’re users are trying to do, so you can’t build one-size-fits-all technical solutions for this (if that were even possible). How are you ever going to reliably rebuild the UI and context that the first user intended to share by copying the link without spending huge amounts of time? That requires actual business logic and functional design.

For a lot of apps, it may make more sense to just have a share button in some places where you actually and intentionally support this (and where it will be actually used by a substantial number of users). Less time spent on developing things that are hugely complex and very little used (on average per state for ALL your different UI states that you have links to somewhere in the app, even if it’s a typical line-of-business master-detail form with some filters for the master list and a details segment with a dialog box or expanded element showing additional details of a certain property).

Re:Flutter 2 by kevincox on Wednesday March 03, 2021 @06:13PM (#26336192)
> But do you really need that as a requirement across the boars for all apps?

No, there are a few exceptions, but mostly yes. And I'm sure more than just the exceptions will use Flutter which is why I'm not looking forward to it.

> How many times have you wanted to save an image or copy text from a UI element in a native app?

Often. I mean not necessarily from a UI element but a lot of the time I want to get an image from a native app and can't.

> How many times have you been frustrated in a web app that when you search using the browser you are getting results from UI elements or “app chrome” instead of the actual content that the web app is displaying?

Almost never. There are rarely many extra results. In fact I already am bothered far more often when websites hijack Ctrl-F (I do not understand why browsers allow this) and fail to search the entire page. With flutter this will become the norm and I am not looking forward to it.

> Isn’t it enough to have some fields with content a user actually would want to copy/search

No, it isn't. I regularly copy things that people didn't expect. If it is just to send someone instructions how to use the app. In fact Android has automatic copy based on OCR from the app switcher and I use that a couple of times a day. There is already too much uncopyable text around. For example all messaging apps on android appear to only support copying the full message. This is what happens when you let people mess with standard UX patterns, they break them!

> You’ll likely end up spending an awful lot of time to cater for all the unexpected things that may happen when someone just clicks a link copied from the address bar

Good! I love apps with great links. It makes them so much easier to use. I don't need to go through their custom navigation to get to my favourite pages. I can use the browser navigation that I already know and love. Also I can share links to my friends! Maybe I can help people use the app better!

You just described a bunch of problems that I already have! Especially on mobile devices. This is why I hope that Flutter on web doesn't take off. We will be making all of those annoyances more common! You seem to think that you can predict all of my use cases and provide the share button manually right when I need it. However product developers on a time crunch often miss or skip use cases so it is much better to have supported by default (like text find/copy that can be disabled) than hope that a developer will think, and find time, to implement them. And if URLs encourage people to make it possible to save and share the state of their app then I think that is a good thing!

Re:Flutter 2 by okamiueru on Wednesday March 03, 2021 @03:49PM (#26334282)
I would expect you to have come from a react background then? When evaluating technologies 1.5 years ago for the company I work at, I took a good look at comparing both react native, as well as flutter, and we decided on flutter.

Now, out of the many considerations we had, in this process, "cannot copy the text" is... well, I have no idea what you are talking about. Are you referring to not being able to do this in a EditableText widget, and if so, have to tried a `TextField` with `enableInteractiveSelection: true`?

I mean, there should be hugely more important development concerns when evaluating these things, than... a brief rejection based on something as trivial as that. Then again, I won't presume to know your situation or the criteria you had. But it does strike me as a bit... shallow reasoning.

I can say, that for our case, the dependency hell that you more easily get with React Native was what put me off completely.

Re:Flutter 2 by kroltan on Wednesday March 03, 2021 @04:16PM (#26334679)
Looks like a very developer/product-owner-sided opinion, not being able to select text and other "trivial" things are what makes software tolerable and actually usable, as listed by sibling post by kevincox, I'll quote:

> Yup. I would also like to open links in new tabs, view images, copy links, search on page, use browser extensions...

Throwing away all platform conventions is a very heavy-handed and user-unfriendly way of bringing about portability.

Another triviality, for example is the behaviour of scroll chaining as compared to my browser: In Flutter, as soon as the inner scrollable hits its boundary, the outer scrollable takes over, while the expected behaviour for me would be for the outer scroll to not move until I reposition the mouse.

It's exactly the same as Microsoft's Windows 8 fiasco, by unifying the experience across platforms every one of them felt broken and contrived, and this effect is even more notable if your application deals with a more diverse user-platform ecosystem. Your app will be the odd one out that works strangely compared to everything else in every system.

Re:Flutter 2 by okamiueru on Wednesday March 03, 2021 @04:26PM (#26334806)
I do appreciate your point of view on this, and I hope I did not come across as dismissive of your choice. If it was a thorough evaluation of the capabilities, and it did not seem able to provide the user interactions you needed, I'm sure that is then a reasonable enough basis. My knee-jerk reaction however, was to think this might have been made without properly evaluating the capabilities of the platform. If I head over to https://gallery.flutter.dev/#/crane, I am annoyed by how "app-like" it feels. I'm in a browser, I should be able to select tings. Clicking and dragging isn't supposed to scroll, it's supposed to select. It feels all wrong. But then again, this was mostly when coming at it from a "this is a website" approach. If the use case is to develop an app, then the conventions used have not felt weird to me.
Re:Flutter 2 by kroltan on Wednesday March 03, 2021 @04:43PM (#26335060)
Fair enough, and sorry if I seemed a bit combative too.

However, I believe "this is a website" or "this is an app" is a perspective the user will take, despite what our intentions as creators were, and so, the safest bet would always be assume what is the norm for the platform, since the user would never be "disappointed" by that even if they expected an app-like feel. On the Web, (at least some, in my anecdata most) people expect to see Websites, even if highly interactive ones.

I have not tested Flutter in a mobile application so I wouldn't be able to tell if it feels par to the course with other mobile applications, so it might be viable if you only need "Android<>iOS" portability.

Re:Flutter 2 by okamiueru on Wednesday March 03, 2021 @04:58PM (#26335258)
I'm glad we can be nice, stalking and all :D. I think those are very valid points, and I think Flutter has a much more natural place as a framework for mobile apps, or desktop software. The gallery showcase feels like a half-assed attempt at creating web-site like pages, that as you pointed out, all feel wrong. So using flutter to develop something like that, I think I'd have agreed with you. However, from just the app side, I do feel flutter developers have made the UX very much in line with that of apps. I rarely know if an app is made using flutter, or pure android (as for iOS, I have no clue. The cupertino stuff looks like iOS to me, but I also have no clue).

I'm also not entirely convince that native apps with flutter is a good thing, especially considering that I'll be just another attempt at providing an opinionated UX stack that is completely different from that of the native experience.

So, maybe we agreed more than we thought. I also believe that a native experience, one that matches the otherwise existing UI interactions should be king. Throwing App UX paradigms into website or desktop app bound to feel terrible. Maybe it can be made more enjoyable to use with better configurations more in line with the respective platforms.

Re:Flutter 2 by Dylan16807 on Wednesday March 03, 2021 @04:17PM (#26334688)
Ability to copy text is less something I worry about as a dev and more something I worry about as a user, where I then hope nobody uses this thing.

It's not trivial.

Re:Flutter 2 by shawnz on Wednesday March 03, 2021 @04:17PM (#26334686)
Breaking common user affordances (e.g. the back button, bookmarks, text selection, copy and paste) is indeed a big concern in the apps we make at my workplace and I would hope that's the case anywhere that values a positive user experience.
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.

Re:Flutter 2 by merrvk on Wednesday March 03, 2021 @03:14PM (#26333766)
Yeah I feel the same, love the idea but I’m never going to be able to convince a team to drop TS for dart..
Re:Flutter 2 by anchorlink on Wednesday March 03, 2021 @06:52PM (#26336608)
You (and your team) would be surprised at how performant and well designed dart is https://dart.dev/samples. Not to mention the ability to use flutter and target multiple platforms.
Re:Flutter 2 by neurostimulant on Wednesday March 03, 2021 @05:49PM (#26335938)
Would adblockers work on these kind of webapps? Adblocker typically look for specific piece of js files and DOM nodes to block ads, but Flutter web doesn't really work like that, no?
Re:Flutter 2 by eulers_secret on Wednesday March 03, 2021 @03:34PM (#26334037)
> you cannot copy the text anymore.

Isn't this a feature? Having text easy to copy and paste is a copyright problem for many sites. Same with being able to save full-resolution images. It's pretty common to see a copy/paste in forum comments to get around a paywall.

IMO either this or some other webassembly view is the future, simply because it's great DRM. Sure, you can circumvent it, but most people cannot.

Re:Flutter 2 by whalesalad on Wednesday March 03, 2021 @03:37PM (#26334067)
Interesting rationalization. Don’t you think copying text is the norm and not the exception?
Re:Flutter 2 by eulers_secret on Wednesday March 03, 2021 @03:48PM (#26334273)
I do think it's the norm, and very much dislike this trend.

I should make my position more clear: I hate this stuff with a passion. But, big business wants better content protection, and big money always gets what it wants - very few exceptions there. I wish we could do something as technologists who want to keep these features of the web; but against trillion dollar companies I know who I'd bet for...

Re:Flutter 2 by ttt0 on Wednesday March 03, 2021 @04:30PM (#26334875)
It's the same argument as with DRM. I can just screenshot the text. It doesn't solve anything and only makes it painful for the average user.
Re:Flutter 2 by whalesalad on Wednesday March 03, 2021 @04:11PM (#26334608)
With that attitude they will continue to win!