Coloured code blocks

コメント

50件のコメント

  • DEM0N194

    Wouldn't be the code needed for this feature be almost the same as for desktop? What's taking you so long?

    4
  • WhoNeedszZz

    Is it too much to ask for Discord support to actually respond to these requests? As mentioned, adding the functionality is trivial and this is now a year old. What's the excuse for why there isn't a major feature parity between desktop and mobile. Programming communities are growing steadily on Discord, but not being able to read the code blocks on mobile is a major problem. I've been a major supporter of Discord since the beginning, but things like this makes me not want to take it seriously for a programming community.

    4
  • ÜberUser

    This would definitely be a marked improvement, and hopefully not too complex to implement given the existing framework for the desktop client. Giving this a +1 in the hopes that the Discord devs pick up on this thread :)

    3
  • JaAnton

    This is really a problem. Code blocks exists for a reason.

    3
  • circuit10

    Also word wrap should be disabled so you can scroll instead

    3
  • circuit10

    Made a (slightly) interactive demo (works best on mobile or a resized window):

    https://mobile-code-mockup.heathmitchell1.repl.co/

    3
  • circuit10

    My mockup thing:

    Normal:

    8
  • circuit10

    Notice that text size is a bit smaller so you can see more code, word wrap is off and it has syntax highlighting

    4
  • Blake 🧙♂

    PLEASE DO THIS SOON

    3
  • Elite

    @circuit10 I like the scroll option, however I think it would be a more reasonable approach to adapt it based on screen size, instead of forcing it on device type - Either way, it would fix word wrap issue, but it doesn't add a scroll bar, unless it absolutely needs to.

    4
  • circuit10

    > I think it would be a more reasonable approach to adapt it based on screen size, instead of forcing it on device type

    Maybe it should be a setting, with the default being set by screen size?

    0
  • circuit10

    Syntax highlighting has been added on mobile! Only for a few languages though

    0
  • CrazyInfin8

    @circuit10 Wait has it really been added? Do I need to wait for an update or is it not available on iOS as yet. Also what languages work so far?

    0
  • Elite

    circuit10 CrazyInfin8 As far as Android-Mobile goes, I tested and couldn't duplicate *any* colour to display.
    I tested the 6 color-codes, and all 186+ supported languages. 

    Actually, in doing so I discovered 2 of them to have issues with Windows 10 Desktop Version:
    Node-REPL couldn't get it to highlight period
    AngelScript wasn't highlighting in the area where you type, but was fine after submitting.

    Everything else seemed to work fine in Desktop, but Not on Android-Mobile.

    EDIT (11/20): Tested on iOS as well, and No colour, as well.

    EDIT (11/21): Asked in Testing Community, and ran more thorough tests (Post down below), and a very few individuals Do have it - Unclear how access is given out at the moment.

    1
  • circuit10

    https://support.discord.com/hc/en-us/profiles/381752693371-Elite It's on the latest Android app and only supports Kotlin, Python, Rust, XML and ProtoBuf.

    0
  • circuit10

    Elite

    1
  • Elite

    circuit10 So I guess you're super super lucky - I asked around in the Testing Community and ran tests myself. I ran the latest Alpha APK, and Beta v49.14

    Most don't have it, but a very small few *do* - One of the individuals that has it is on version v49.12

    Some of the lead testers believe it's just an experiment, so either:

    • A few of the previous versions had it temporarily, since Reply feature technically include Color in part of the mention.
    • A few individuals were randomly chosen (or are pre-alpha grandfathered) and see it, while others don't. 
    • EDIT: *or* it could be server-based, unless you've tried it on multiple servers

    Either way, it doesn't appear to be version based (Possibly just account or device based) - Since later versions have been tested and don't include it.


    Hopefully it won't be too long until it's included in the APKs for Alpha live testing, but I don't want to speculate until they announce something ;) 

    1
  • locastan

    I can see the highlights for the mentioned languages. I would prefer having css support with the colors similar to how the desktop app handles it. (See: https://www.online-tech-tips.com/wp-content/uploads/2019/12/discord-syntax-css.png.webp for example.)

    The ones added so far seem to differ from the colors used by desktop, as I noticed at least for xml.

    0
  • insane breadstick

    Definitely a must, whether you are actually sharing code or just using the colors to spice up your messages. +1 to see this on mobile

    0
  • Théo

    +1

    0

サインインしてコメントを残してください。