Skip to content

Please add a dark mode to the Typescript Playground for better accessibilty #90

Closed

Description

Currently, the Typescript playground , is not much comfortable as it only has a white theme For someone like me with a low vision

image

It would be nice if there is a dark mode for the playground.

Activity

  1. orta commented on Oct 18, 2019

    @orta
    Contributor

    Moved to the website repo, and it will get one when the new site gets dark mode too. If you'd like to see it before then, feel free to submit a PR 👍

  2. nisarhassan12 commented on Oct 20, 2019

    @nisarhassan12
    Author

    Thanks! a bunch Orta Therox (@orta). I'm Junior Front-end Developer would love to make a PR but not sure whether my skillset is ok for this but I will try anyway to make it happen 🙂

  3. nisarhassan12 commented on Oct 29, 2019

    @nisarhassan12
    Author

    I'm so Sorry! Orta Therox (@orta) I have got busy in other things so I can't make the PR.

  4. orta commented on Nov 1, 2019

    @orta
    Contributor

    Never feel guilty for not contributing to open source

  5. nisarhassan12 commented on Nov 1, 2019

    @nisarhassan12
    Author

    Never feel guilty for not contributing to open source

    Thanks! a bunch! 🙂 ❤️

  6. keithlayne commented on Nov 4, 2019

    @keithlayne

    So, instead of constantly trolling Orta Therox (@orta) about this feature, I figured I should just implement it. The implementation is super easy, but probably need some questions answered before actually doing it.

    Currently there's a single theme defined and used in main-2.js. That's all there is to it.

    Monaco comes with (AFAICT) 3 built-in themes: vs, vs-dark, and hc-black. Changing the editor theme is as simple as i.e. monaco.editor.setTheme("vs-dark"). BUT, looks like Orta used 'vs' (the built-in light theme) as a basis for the playground theme, which makes me think it would not be desirable to just plug in one of the other two.

    So, questions:

    1. Would it be okay to use those as-is, at least for a first pass?
    2. The other two don't jive too well with the overall theme and branding of the site - should there be changes in the non-editor css when the editor theme changes?
    3. I was thinking vscode shipped with more themes (i.e. Solarized) - should this just be a light/dark/HC option, or maybe include at least the default vscode themes for user pleasure? I was thinking of just writing a script to scrape the relevant stuff right out of the vscode repo. Seems like low-hanging fruit, but may not be valuable.
    4. Should the theme choice be persisted? If so, how? I think of this as a user preference, i.e. not something that should be reflected in the URL.
    5. How do you wanna reflect this in the UI? I was thinking a dropdown on the right side near 'About' named 'Theme' or 'Editor Theme'. I'm an amazing UI designer 🚎

    With some guidance on these things, I can turn this around quickly...let me know!

  7. keithlayne commented on Nov 4, 2019

    @keithlayne

    Ummmm...is orta/typescript-play even relevant? Now I feel dumb.

  8. orta commented on Nov 4, 2019

    @orta
    Contributor

    orta/typescript-play even relevant

    Yep, it's used as a sub-module in this repo.

    Would it be okay to use those as-is, at least for a first pass?

    Yes

    • You can't easily use a vscode theme in monaco (vscode has a theming engine which doesn't run in monaco solo) so I'd make it from scratch. Honestly though, if you get 90% there I'll wrap that up and make it consistent etc. Look here instead for ideas but IMO write it yourself so that we don't have to think about licensing.

    • I'd persist it in local storage (we do that for your query) which should be fine IMO

    • Yeah, lets start with a dropdown like themes. The site uses bootstrap 3 so you can use these docs to make a dropdown. Theme is fine and a list of options is cool, I'll eventually move it out into the site selector, so please don't offer more than a dark and a high contrast or else they'll get removed later and folks will be sad

  9. keithlayne commented on Nov 4, 2019

    @keithlayne

    I'm a little confused. Are you saying that setTheme('vs-dark') won't work? Seemed to when I ran it locally. Especially since there's the base property.

    No biggie, I can do pretty much all of this without a lot of specifics on the theme, so I'll get something for you to look at ASAP.

  10. orta commented on Nov 4, 2019

    @orta
    Contributor

    too cool for defaults

  11. keithlayne commented on Nov 7, 2019

    @keithlayne

    Should this be closed for now or stay open for the eventual v2 implementation?

  12. orta commented on Nov 7, 2019

    @orta
    Contributor

    Nah, this is enough IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PlaygroundIssues that affect the Playground

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions