-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev gui - Darkmode using HSL Hue #630
base: develop
Are you sure you want to change the base?
Conversation
styles/app.scss - change theme color HSL Hue degree on the color wheel from 0 to 360 ie. 0 is red, 120 is green, and 214 is blue.
β Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thank you @gigamaster I will have a good look and let you know. Meanwhile, please run Very grateful. Thanks. |
Hi @hatemhosny I was surprise that the Draft pull request to share the work-in-progress did trigger automated workflows π€¨ |
No worries, @gigamaster I understand this is still WIP. I did trigger the automated checks just to get an idea. I will go through the changes and design decisions and give feedback. One note for now: Overall, I really like what you are doing here. I'm a bit busy with some personal commitments for the next few days. I will have a good look when I have a chance and get back to discuss with you here. Thank you. |
Hi @gigamaster I had a good look around. I very much like your approach. I do have some comments. A few are related to UI & colors (e.g. contrast of text/images with background, etc.). I think I would keep these till you finish because you are probably going to improve them anyways. You are much better than me in this area. Other comments:
Otherwise, please go on. I do like your approach. |
Hi @hatemhosny I'm glad for the feedback.
Ok then lets try to keep it simple...
Great, I'll dig into the code to see how changes can be made.
Noted.
Oohh... gitattributes was merged from my workspace mockup/prototype/test : android -> old imac -> windows
Dark/light mode implements a color-layer for the livecodes app and color-hue on elements only. Livecodes UI ModalLivecodes UI DialogLivecodes UI Menu Settings |
Oh wow!
Yes, currently users can choose a light
This is reasonable. Actually the left column of the "App menu" is related to the current project (except the login/logout link). While the right column is related to overall app settings. So it may be reasonable to split them to 2 menus: "Project" and "App Settings" (also with login link)
I will need to see a demo of this to make up my mind. Please note that LiveCodes does not provide multi-file support, so having a menu called "file" would probably not be suitable. "Project" would be a more suitable name. Whenever possible, please push your changes, so that I can try it in the deploy preview. It does not need to pass the tests for now. Thank you :) |
@gigamaster A lot of LiveCodes users are Arabic speakers. So it would be great if we can also offer RTL layout. This does not need to be in this PR. Just wanted to give you heads up. Thank you :) |
Hi @hatemhosny So, to avoid any issues with editor theme selection, dark mode applies only to the application UI layer. By the way, I also noticed that Luna console and notifications are configured with light theme by default - maybe this can be changed to match the selected editor dark theme and, or app darkmode !? After a quick check of i18n support branch, it doesn't seem like it's a problem to adapt and merge the UI. You can focus on i18n and later merge dark mode. Let me know when it's ready for translations. About RTL layout - css dir pseudo-class might do the trick, maybe similar to html.dark, ie. html[dir="rtl"] to provide optional direction. I'll check browser support and test. |
Yes, let's keep it like this for now.
You are correct. I have opened a PR in your repo to fix that. You may want to customize notification colors here. You can get the active theme using
That's great. Thank you.
@shadeed has a great guide about RTL styling here: https://rtlstyling.com/posts/rtl-styling Thank you. |
I'll merge the fix ToolsPane and update. |
fix(ToolsPane): fix console themes
add menus project, settings, help remove CodeRunButton mobile orientation landscape assets base64 scroll
UI darkmode |
Thank you @gigamaster
Yes, I see now what you mean. I think this is a nice layout. That's more organized. The hint tooltip covers the first menu item. It needs to be moved.
This was needed for small screens because of lack of space in the top bar. I see you have not yet implemented the design for mobile portrait orientation. So, I'll just wait to see how this evolves. We also have now the login button (which is no longer in menu).
I'm not sure this is useful. It might even be a bit confusing for users to scroll through the very long data urls. The embedded playgrounds now break (demo). The dark loading screen should work only in dark mode. At that time the app data have not been loaded yet. Please go on. I like the direction you are going. |
Hi @hatemhosny The main idea is to make the user interface layout match the modern web apps design that Internet users are familiar with. The base64 asset scrolling was an attempt to fix the very long string after adding an image. While I try to avoid touching the core files as much as possible, I noticed that modals have a different HTML element structure that can't be solved by CSS alone, same for tabindex and flex ordering to facilitate LTR and RTL. Some buttons don't show up, but I find them useful, for example, split and full screen. Thanks for reporting the issues - I'll check that out further. |
Validation Error: Element hr not allowed as child of element ul However, the li[role="separator"] is allowed in HTML 5.2 Issue: listitem role (default - do not set), option, presentation, radio, separator, tab or treeitem. |
I do agree on the concept and approach. I think this is indeed more organized.
I do not mind introducing some changes in HTML, so long that they do not break the app.
It now works. Thank you.
Yes. Embedded playgrounds have limited space (inside the embedding page). So it would be useful to see the playground in full screen to have more room without taking up more space from the embedding page. In contrast, the full app already takes the full view port and can be easily viewed in full screen by pressing F11 (which is not available for embeds). On the other hand, all menus and login button should not be shown in embeds. I do not even attach event handlers to them. This is the current view for embeds. We should hide all menus and the login button: I noticed that changing the editor causes some flacky movement in the editor toolbar below: Screenity.video.-.Sep.7.2024.mp4
I do like the menu separators. They make things a lot more organized and also look great. |
WIP
|
Hmm... this relates to mode landscape taking over portrait... the other issues are related to console and tagify styles.
Just observe how people hold their phones in different ways at different times - in portrait mode when reading, or passively addicted to infinite scrolling, and in landscape mode when gaming, watching videos, working creatively and productively. ^_^/ |
Regarding font-size, there is a In welcome screen, in light mode, on hover, the links are not distinguishable from background In light mode, I think we need to make the switch in "off" state a bit dimmed to be distinguishable from "on" state. Can we make the logo slightly bigger? It looks a bit too small. |
I agree. Most of the time on mobile, it will be in landscape orientation. However, the app should still be usable in portrait even if we do not show the less important elements. |
hey @gigamaster I like the portrait mode :) Here are some more comments: π When in embed:
The welcome screen links now are good in light mode. Thank you. We need to update the focus mode to hide the buttons for project, settings and help menus. When closing console in dark mode, the console background flashes in white color while closing. closing-console.mp4The social icons in the share screen are dark The test editor is small and takes a small part of the screen by the way, the test results look beautiful in light and dark modes. Very pretty :) At last, I have some good and bad news: Thank you very much and sorry for overloading π |
Hi @hatemhosny The CSS comments were left in styles e.g. //TODO test embed, simple, etc. while waiting to have some examples of use. |
The color of the share icon images can be changed by using #modal #share-screen li img {
filter: invert(1);
}
/* in dark mode */
#modal #share-screen li img {
filter: invert(0.8);
}
To prevent the flickering in dark mode we can do a workaround like this: /* in dark mode */
#output {
background-color: #242424;
}
#result {
background-color: #fff;
} not pretty but works! |
Notes
const createIframe
|
dev+ui+i18n
Update i18n locales
Quality Gate failedFailed conditions |
Hi @gigamaster
In 2-column layout:
In 1-column layout:
|
|
Hi @hatemhosny Livecodes actually displays the "Recover" at the bottom; on request, the PR changed the modal to display "Recover" at the top on desktop and mobile, however the flex order can be set differently for LTR - RTL.
Unable to reproduce this, as the request was only to change the CSS color contrast.
This can be forced in html.dark { background } You might want to check the translation :
|
Thank you @gigamaster
On small screens, I changed the order to put it on top.
I see. This is probably because it now has a Also shall we animate it? cancel-recover.mp4
I mean like this: resize-label.mp4
Do you mean this code should be added by users in the editor?
I believe @zyf722 is busy these days. |
by the way, please check this :) Do you have any suggestions for styles? |
It's informative and looks nice. I will merge dev with the latest css changes in dev-gui. Aside from accent HUE input range for local storage and review i18n translations, without touching the core and adding an extra layer of complexity, it's pretty much done for the UI/UX. I'd recommend merging it with the dev branch, and maybe most importantly, consider highlighting the dev branch. A very opiniated direction would be to recommend focusing on user needs, instead of the Tower of Babel Confusio Linguarum. Mainly because VS Code was never built for mobile phones, and only recently has Apple reversed its decision about blocking web apps (PWAs) on iPhones in the EU. Replit has focused its campaign on this very specific need, drawing attention to mobility. Unfortunately, their βvisual materialβ goes wrong when it comes to βshowingβ everyday use, which leads to a sort of cognitive dissonance in their main message. Connection to a remote machine, like a bare metal or virtual machine, via a secure tunnel, remote development environments, or generally speaking, cloud services turn to be heavy and slow. Recently, I noticed that sources were not being found when using mobile applications. Taking a closer look at network performance, just to find out that using the CDN comes with its own set of challenges. Among the common problems that can occur, we saw latencies, cache misses and content delivery failures, resulting in data loss, data blocking, data inaccuracies, user inefficiency, bandwidth reduction and slowdowns, to name but a few. Livecodes could therefore meet the need for a portable application, lightning-fast and responsive, focused on individuals and their mobility needs. Not only because it's a niche, but also because it's where the tech giants fall that individuals can rise. |
What type of PR is this? (check all applicable)
Description
Feature: Improve overall app design (look and feel) #539
Images svg optimization.
Darkmode using HSL Hue degree on the color wheel from 0 to 360 ie. 0 is red, 120 is green, and 214 is blue.
Default css var --hue: 214;
Todo : add an input range under "dark theme" in main menu and store Hue value in localStorage.
Related Tickets & Documents
WIP #539
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentations?
[optional] Are there any post-deployment tasks we need to perform?
No.
[optional] What gif best describes this PR or how it makes you feel?
Dark Mode minimalist theming. Todo : rename CSS vars and improve colour scheme with high visual contrast.