processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.38k stars 1.32k forks source link

Fix [#2785] text color not changing in dark/high contrast theme #2801

Closed somesh4747 closed 3 months ago

somesh4747 commented 9 months ago

fix [#2785] I have changed the preferences.js file for detecting the state and changed the files in the state, and index.js for reflecting the changes to actual files, createDefaultFiles.js for the default CSS setting. [#1852] Here the same problem.

Fixes #2785 fixes #1852

Changes:

I have verified that this pull request:

https://github.com/processing/p5.js-web-editor/assets/109422834/210a747f-f588-44bf-9f72-e4cdf37a7de5

I am a beginner still learning to contribute, if further changes are needed do let me know... thank you

welcome[bot] commented 9 months ago

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

lindapaiste commented 9 months ago

This is a really interesting approach. We had talked about solving it in a much simpler way by forcing the sketch background to always be white. I'm honestly not sure if modifying the user's sketch files is over-reaching or if it's genius.

If we decide to go with this general approach then I have some more specific feedback about your code. But at this point I'm on the fence about the fundamentals. @raclim -- thoughts?

somesh4747 commented 9 months ago

@lindapaiste, see... before several PRs were trying to solve this by changing the default style.css file to as background-color: white, but the problem is -- design-wise @raclim is not that sure that it is the best solution -- in https://github.com/processing/p5.js-web-editor/pull/2481#issuecomment-1793064898.

That's why I tried a different approach to change the file based on the theme selected by user. please feel free to give any suggestions or feedback for any further updates, I would highly appreciate any feedback from you and other respected maintainers.

raclim commented 9 months ago

Thanks for working on this @somesh4747! I think this feels closer to what I was imagining when I mentioned in that comment wanting to find another solution that would blend in better with the High Contrast and Dark Themes!

I also agree with @lindapaiste that this approach is really interesting but might need some minor adjustments. I'm not sure if there's a different one that could work better, but I'm not opposed to giving this a go either.

somesh4747 commented 9 months ago

@raclim thanks for the feedback, please tell me what to improve in this, I would really appreciate any further suggestions and updates on this PR.

raclim commented 3 months ago

Thanks so much for your work on this! I'm sorry that we couldn't get back to this in time, but since it's been a while since this PR was submitted I'm going to close this for now. I'm really sorry again that we couldn't get this in, but please feel free to reopen this PR with any updates or check out our other issues!