38 votes

Feature suggestion: Highlighted text in comment automatically creates quote when you respond to that comment

I'm fairly sure it's either a Reddit or RES feature, but whenever I select text in a comment and then click Reply, it'll copy that text to the comment box and add a > in front so it'll turn into a quote. It makes it a little quicker to respond to a specific part of someone's message.

I'm no IT bird and as such I don't know if this is something that can be implemented easily(if at all). It'd also require more JS, not sure if that's an issue as well.

In any case, let me know what you think.

Edit: I'd like to suggest something else, should I make a secondary post or append it to this one? I'd like to avoid cluttering up the front page.

18 comments

  1. [11]
    Deimos Link
    I've implemented this now. Please let me know if you notice any issues with it. (@hungariantoast @Soptik)
    • Exemplary

    I've implemented this now. Please let me know if you notice any issues with it. (@hungariantoast @Soptik)

    19 votes
    1. [5]
      asoftbird (edited ) Link Parent
      edit4: seems to be a timing issue where a quick tap doesn't invoke quotes, not sure if it's apple devices being weird or if it can be solved with code. It works on all mentioned platforms and...

      edit4: seems to be a timing issue where a quick tap doesn't invoke quotes, not sure if it's apple devices being weird or if it can be solved with code. It works on all mentioned platforms and browsers if l tap slightly longer than l'm used to.

      Does not seem to work on Safari on iOS 10.3.3, but not like l'm expecting to see this work for old software anyway.

      Edit: Safari on iOS 12.0 doesn't seem to work either.

      Edit2: Experimenting with Chrome on iOS 12.0 and it does work but rather inconsistently, some parts of my sentence quoting, some parts not. I'll look into this tomorrow and figure out if it's a bug or my devices acting weird.

      Edit3: Couldn't resist experimenting a little more before going to bed. Apparently it only works with a slightly longer tap on "Reply" than usual, since a short tap(0.1-0.2s l think) does not invoke the quote function but only the reply window.
      A slightly longer tap(0.3-0.4s or so) does work and quotes the selected text.

      Not sure if this is my device acting up.
      Tested on:
      2017 iPad Pro running iOS 12.0 in Chrome and Safari;
      iPhone 5c running iOS 10.3.3 in Safari

      3 votes
      1. [3]
        Deimos (edited ) Link Parent
        That's odd, there shouldn't be any relation to the length of the tap. About the only thing I can think of (and I have no idea if this is right) is that maybe it's clearing your selection when you...

        That's odd, there shouldn't be any relation to the length of the tap. About the only thing I can think of (and I have no idea if this is right) is that maybe it's clearing your selection when you release the tap, so holding it a little longer allows it to grab the selection, but releasing quickly doesn't give it enough time to do so (but it should be extremely fast, so that would be surprising).

        You were always selecting text from inside a single comment? It won't work if you select text that isn't inside a comment, or make a large selection that crosses over multiple comments.

        2 votes
        1. [2]
          asoftbird Link Parent
          Yep, always inside a comment. Tested going over it's limits as well which didn't work as expected. I'll actually go sleep now though, l'll look into the issue tomorrow as the deselect thing you...

          Yep, always inside a comment. Tested going over it's limits as well which didn't work as expected.

          I'll actually go sleep now though, l'll look into the issue tomorrow as the deselect thing you mention sounds plausible. (good excuse to use a high-speed camera l guess ;)

          2 votes
          1. Deimos Link Parent
            Haha, a high-speed camera is probably pretty excessive for trying to figure it out. Remind me tomorrow and I can try moving the selection-capturing code so that it's the first thing that happens...

            Haha, a high-speed camera is probably pretty excessive for trying to figure it out. Remind me tomorrow and I can try moving the selection-capturing code so that it's the first thing that happens when you tap the reply button, that might solve it if something earlier in the process is clearing the selection.

            3 votes
      2. cfabbro (edited ) Link Parent
        It's not. I can confirm that a quick tap on reply with text highlighted doesn't activate the quote mechanic on even the latest iOS 12.1.4 released Feb 7 (also using 2017 iPad Pro) but a slightly...

        Not sure if this is my device acting up.

        It's not. I can confirm that a quick tap on reply with text highlighted doesn't activate the quote mechanic on even the latest iOS 12.1.4 released Feb 7 (also using 2017 iPad Pro) but a slightly longer press, shy of activating text highlighting again, does seem to work.

        That's a weird one. Hopefully deimos' idea of moving the capturing code around solves it. :/

        p.s. @deimos, might this have something to do with the iOS "fast-tap/click" mechanic that WebKit uses based on viewport width and initial-scale?
        https://webkit.org/blog/5610/more-responsive-tapping-on-ios/
        https://trac.webkit.org/changeset/191644/webkit

        Perhaps specifically related to its behavior on focused input fields?
        https://trac.webkit.org/changeset/233225/webkit

        If moving the capturing code around doesn't solve it, perhaps playing around with touch-action CSS properties or using preventDefault() somehow might be able to?

        2 votes
    2. masochist Link Parent
      Works on Safari on iOS (12.1.4). :)

      I've implemented this now. Please let me know if you notice any issues with it.

      Works on Safari on iOS (12.1.4). :)

      2 votes
    3. [3]
      Algernon_Asimov Link Parent
      It works on my Android phone.

      Please let me know if you notice any issues with it.

      It works on my Android phone.

      1 vote
      1. [2]
        Weldawadyathink Link Parent
        Are subquotes a thing? Edit: yes they are, and they don't work with quick quotes. Should I post it in the bug tracker?

        Please let me know if you notice any issues with it.

        It works on my Android phone.

        Are subquotes a thing?

        Edit: yes they are, and they don't work with quick quotes. Should I post it in the bug tracker?

        3 votes
        1. Deimos Link Parent
          I wouldn't add an issue for it. Making that work with the quick quotes would be quite difficult, and there would just be other edge cases that are probably almost impossible to fix, like selecting...

          I wouldn't add an issue for it. Making that work with the quick quotes would be quite difficult, and there would just be other edge cases that are probably almost impossible to fix, like selecting two chunks of text with a quote between them. It doesn't really need to be an incredibly in-depth feature that can handle everything, it's just supposed to be an easy way to quickly quote some text.

          9 votes
    4. apoctr Link Parent
      It's a little annoying on desktop because Ctrl+C doesn't deselect the highlighted text, meaning I've ended up double-quoting messages a few times by accident. No issues on mobile (Android 9,...

      Please let me know if you notice any issues with it.

      It's a little annoying on desktop because Ctrl+C doesn't deselect the highlighted text, meaning I've ended up double-quoting messages a few times by accident. No issues on mobile (Android 9, Firefox mobile) however, very convenient!

      1 vote
  2. [4]
    hungariantoast Link
    I just checked and this is a Reddit thing, not a RES thing. It's a useful feature that I don't recall seeing anywhere else. I don't use it often (or I often use it by mistake) but yeah, I think it...

    I just checked and this is a Reddit thing, not a RES thing.

    It's a useful feature that I don't recall seeing anywhere else. I don't use it often (or I often use it by mistake) but yeah, I think it would be a nice, minor addition to the site. This also becomes more useful the more you participate on the site.

    If it works on mobile as well, then I think it would be much, much more useful there than on the desktop, so that's just an added bonus.

    If your second suggestion is a big one, or largely unrelated to this topic, I'd say go ahead and post another topic for separate discussion.

    13 votes
    1. [2]
      Deimos Link Parent
      It's definitely a reddit thing. Looks like some "Deimos" guy wrote the code, I can probably get him to implement it here. If I remember right, I think it was inspired by Github:...

      It's definitely a reddit thing. Looks like some "Deimos" guy wrote the code, I can probably get him to implement it here.

      If I remember right, I think it was inspired by Github: https://github.blog/2013-02-04-quick-quotes/

      34 votes
      1. aphoenix Link Parent
        I realize this is a "noise" comment, but this gave me a very sensible chuckle.

        I realize this is a "noise" comment, but this gave me a very sensible chuckle.

        14 votes
    2. asoftbird Link Parent
      Yep, though selecting text properly still is a pain. I intuitively do it since I'm used to Reddit, and expect the to-be-quoted message to show up in the box, but it doesn't. And I keep forgetting...

      If it works on mobile as well, then I think it would be much, much more useful there than on the desktop, so that's just an added bonus.

      Yep, though selecting text properly still is a pain.
      I intuitively do it since I'm used to Reddit, and expect the to-be-quoted message to show up in the box, but it doesn't. And I keep forgetting that Tildes doesn't have this feature ;)

      I've made a separate post, thanks!

      2 votes
  3. [3]
    Soptik Link
    That's great idea, I really like it. I've made gitlab issue for it. However it'll be quite hard to discover this feature if it gets implemented, it'd probably need to be included in the welcome...

    That's great idea, I really like it. I've made gitlab issue for it.

    However it'll be quite hard to discover this feature if it gets implemented, it'd probably need to be included in the welcome message (but it feels not significant enough to be there), or in some kind of tutorial after registration if it eventually get's made.

    7 votes
    1. asoftbird Link Parent
      It could be added to the Formatting help page that's at the top right of every comment box, I'd reckon.

      It could be added to the Formatting help page that's at the top right of every comment box, I'd reckon.

      6 votes
    2. Algernon_Asimov Link Parent
      After it's implemented, it will be one of the many features I'll include in the "how to" guide that I'm working on. I assume that, at some point, Deimos will create an official wiki for Tildes,...

      in some kind of tutorial after registration if it eventually get's made.

      After it's implemented, it will be one of the many features I'll include in the "how to" guide that I'm working on. I assume that, at some point, Deimos will create an official wiki for Tildes, and I can then transfer the guide from the unofficial wiki to the official wiki.

      3 votes