Git Product home page Git Product logo

vscode-fluent-ui's Introduction

Fluent UI theme for VS Code

Inspired by and based on the awesome concept designs by u/zeealeidahmad. Using CSS3 I tried as much as possible to replicate his designs. Some transparency effects are not possible at the momend due to the current Electron version that VSCode is using.

Disclaimer

This is a workbench theme. That means that VS Code's UI is being heavily modified for aestethic purposes only. There's no intention to enhance or compete with the original look. Is merely an alternative. Also, please bear in mind that this theme is considered an experiment, and therefore beta software, since there's no official support for this type of modification, so used it at your own risk.

Install

  1. Run VSCode as admin.
    1. This is important, the extension won't work otherwise
  2. Install the extension from the Marketplace
    1. Optiona: Go to settings and adjust the colors (this can be done at any time)
  3. Run > Fluent UI: Enable and reload when prompted

VSCode will display a notification saying that the installtion is corrupt. That's normal, VSCode sees the installation as corrupt because the HTML (workbench.html) file is now changed.

Just click the lil' cog on the message and select Don't show again and you should be good to go.

Uninstall

  1. Run VSCode as admin.
    1. This is important, you'll end up with a messed up workbench.html file if you run the Disable command as regular user.
  2. Run > Fluent: Disable and reload when prompted
  3. Uninstall the extension like your normally would

If you ran the command as regular user, here's how you can fix your installation:

  1. On Windows, go to C:\Users\{username}\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-sandbox\workbench.

  2. Open the file workbench.html as admin

  3. Remove everything between the comments <!-- FUI-CSS-START --> and <!-- FUI-CSS-END -->.

    1. Your workbench.html file should look like this after removing the patched code:
    <!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8" />
            <meta
                http-equiv="Content-Security-Policy"
                content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote-resource:; media-src 'self'; frame-src 'self' vscode-webview:; object-src 'self'; script-src 'self' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline'; connect-src 'self' https: ws:; font-src 'self' https: vscode-remote-resource:;"
            />
            <meta
                http-equiv="Content-Security-Policy"
                content="require-trusted-types-for 'script'; trusted-types amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget stickyScrollViewLayer editorGhostText domLineBreaksComputer editorViewLayer diffReview dompurify notebookRenderer safeInnerHtml standaloneColorizer tokenizeToString;"
            />
        </head>
    
        <body aria-label=""></body>
    
        <!-- Startup (do not modify order of script tags!) -->
        <script src="workbench.js"></script>
    </html>
    1. If that doesn't work, reinstalling VSCode will fix it.
  4. Save and reload VSCode

Known issues

  • I'm unable to override the terminal, minimap and in some cases, the scrollbar background. So depending on the syntax theme you choose, the background colors will be off for those elements. You can set the colors for these panels (and others) manually via settings, like so:
"workbench.colorCustomizations": {
  "terminal.background": "#ffffff",
  "minimap.background": "#ffffff"
}

Features

The default installtion (via > Fluent UI: enable) has all features enabled by default (provided you didn't disable some of them via settings before activating). You can disable some features via settings, just search for Fluent there.

After changing one of the settings, you'll have to run > Fluent UI: reload to reapply the styles.

App background

The background feature is intended to mimic, to an extent, the Mica material used by Windows 11 native applications. Your current wallpaper will be sampled once during installation and used as a background for VSCode.

For example, my current wallpaper is this:

Wallpaper

VSCode will look like this after sampling the image:

Wallpaper

Wallpaper

Disabling the background in the settings results in VSCode looking like this:

Wallpaper

Wallpaper

If you change your wallpaper and want to refresh your VSCode you'll have to disable and enable the theme again (as admin):

  1. > Fluent UI: disable
  2. Restart (close and open VSCode)
  3. > Fluent UI: enable
  4. Restart (again :/)

Please note

When you install the extension, it will sample the current desktop wallpaper you have set, generate a blurred version of it and set VSCode window to use that as background. In some cases thay may cause low contrast or make stuff hard to read, depending on what you have for a wallpaper, so keep that in mind when running the default installation.

You can disale this feature by unchecking the Enable background image in the settings page.

Compact mode

Settings -> Fluent UI: Compact

This will apply the theme using slight less padding around some of the elements. The difference is subtle but can help those with limited space.

Normal mode

Normal mode

Compact mode

Compact mode

Custom colors

You can set custom colors for the accent, dark and light background colors via settings. Any HEX value will work, but bear in mind that the extension can't account for contrast issues as a result of a custom color.

Dynamic light/dark theme

The UI is dynamic and will apply the light and dark themes based on the current syntax theme type. For example, if you're using One Dark Pro, when you run > Fluent UI: Enable, the extension will identify One Dark Pro as a dark syntax theme and apply the correct UI mode. Same for light themes.

The extension will also do the same on the fly as you preview your syntax theme using Ctrl/Cmd + k Ctrl/Cmd + t

And to complete the look

Product icon themes:

The workbench is set to use Segoe UI Variable (the new standard font for Windows 11). I highly recommend downloading and installing it. If you don't, the theme will fallback to the default font.

Screenshots

Sidebar

Sidebar preview

Activity bar

Activity bar preview

Tabs

Tabs preview

Terminal

Terminal preview

Search widget

Search widget preview

Command palette

Command palette preview

Some of the great themes that go along with this UI (in no particular order):

Serendipity

Serendipity Light theme preview Serendipity Dark theme preview

Copilot

Copilot theme preview

Mariana Pro

Mariana Prot theme preview

Night Owl

Night Owl Light theme preview Night Owl Dark theme preview

One Dark Pro

One Dark Pro theme preview

VSCode default white

VSCode light theme preview


vscode-fluent-ui's People

Contributors

notaperson535 avatar theold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-fluent-ui's Issues

[Feature request] Settings file?

Hi there, I like your UI modifications here however I would prefer to make the UI darker and from quickly digging through your code you seem to have the default colour values hard-coded. Would it be possible to add a file that the user can configure to change the colour of the UI? While you mentioned the plugin is able to use themes, in my testing, changing the theme does not effect the background colours of the editor.
Below are the two files I had spotted that hard-code the values:

value: `rgba(32, 32, 32, ${opacity})`,

--card-bg: linear-gradient(0deg, rgba(32, 32, 32, 0.75), rgba(32, 32, 32, 0.75));

I would've modified this myself (which I did do in the inspector) however when I tried to build the code into a package to test, VSC would give me a command not found error, hence why I am not making a PR (also becuase today is the first time I've looked into VSC plugins)

Buttons Cut off

image

The rounded effect does not show as the window cut's it off.

Option to change the opacity of menu selection

Hi,

I'm using the default Dark theme and saw a point that needs to improve in your UI.
image
When I click on the menus on the top, the drop-down has a bit too much opacity.
Same issue with notification panel.
image

Do you have any option to change the opacity?
If not, can you add it?

Thank you for the beautiful UI.

Can't enable Fluent UI

Problem description: Unable to enable Fluent UI

Information:

Version: 1.61.0-insider (system setup)
Commit: 87260247dc7b912db6e6a21a366e6f50dca759ba
Date: 2021-09-03T20:58:36.778Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000

  • Looking for simliar issues on GitHub
  • Uninstall the software and remove the remaining files and repeat the steps
  • Reproduce issues with the Stable version

How to reproduce:

  1. Install vscode-insider from the official website.The installation directory is D:\Program Files\Microsoft VS Code Insiders

image

  1. Open extensions page and install Fluent UI and then What's New for Fluent UI documentation will open automatically (I don't know why this document can't be opened, maybe I'm in China, but I've opened the proxy tool)

image

image

  1. Run Fluent UI: Enable > a popup with Command 'Fluent UI: Enable' resulted in an error (command 'fluent.enableEffects' not found) error (command 'fluent.enableEffects' not found)

image

Edited: Just edited two stupid spell mistakes๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ

Issues with Padding missing font?

This is how the find and replace looks:
image

Buttons are missing here too, something to do with the padding I believe:

image

Do I have something wrong?

โœจ Code FluentUI reinvented

Hello vscode-fluent-ui community, I'm a lover ๐Ÿ’– of FluentUI and Code, and I wanted to give this old project some love.
I uploaded the light and dark themes here:
RiversideValley/Inspire.Styles

To use it, insert it into your workbench.html, situated at "%localappdata%\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-sandbox\workbench\workbench.html" or "%localappdata%\Programs\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-sandbox\workbench\workbench.html" if you're using Code Insiders.

๐Ÿ“ You don't need to edit the file urls for them to work.

Insert the Light.css or Dark.css file appropriately. (Remember to have your Code build set to the same theme as the file you choose, or the UI will break!)
You can use one of two options:

  • Insert using a <style src={etc.}/>
  • Insert by directly putting it into the <style/> element's contents
๐Ÿ“ I recommend turning off the new Dark Modern/Light Modern theme as they some of the css.

In end, your workbench.html should look something like this, depending on your install and theme:

Expand to see HTML
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
http-equiv="Content-Security-Policy"
content="
default-src
'none'
;
img-src
'self'
data:
blob:
vscode-remote-resource:
https:
;
media-src
'self'
;
frame-src
'self'
vscode-webview:
;
script-src
'self'
'unsafe-eval'
blob:
;
style-src
'self'
'unsafe-inline'
;
connect-src
'self'
https:
ws:
;
font-src
'self'
vscode-remote-resource:
;
require-trusted-types-for
'script'
;
trusted-types
amdLoader
cellRendererEditorText
defaultWorkerFactory
diffEditorWidget
diffReview
domLineBreaksComputer
dompurify
editorGhostText
editorViewLayer
notebookRenderer
stickyScrollViewLayer
tokenizeToString
;
"/>
</head>

<body aria-label="">
</body>

<style>
{style-file}
</style>

<!-- Startup (do not modify order of script tags!) -->
<script src="workbench.js"></script>
</html>

Can't enable, fluent.enableEffects not found

I cannot enable the UI design. I'm using One Dark Pro, but enabling the default VS Code theme
does not work. I got this message on each attempt to enable the Fluent design:

image

Release info:

Version: 1.68.1 (user setup)
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630
Date: 2022-06-14T12:48:58.283Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.22622

Sharp bottom corners of editor

image

The editor area has sharp corners on both right and left corners. Switching back and forth between themes does not make it rounded.

Is the project dead?

@TheOld thank you for your amazing contributions on this extension.

Although the extension features have become very complete, there is still an issue where mac/linux users can not use the extension after 3.3.0, have tried to fix it myself but with no luck.

Is it something on your roadmap to add support for?

Sidebar not rounded unless theme is changed

When loading up VS code with the theme, the sidebar appears with sharp corners:

image

Reloading the window or running "Fluent UI: reload" doesn't work. Upon changing colour theme and back, it fixes the issue:

image

Enabling Fluent UI makes it impossible to change the caret (cursor) color.

Fluent UI overrides the cursor (caret) color to a somewhat dark blue. This makes it extremely difficult to see when using a dark background and a theme with blue text in many places (such as the default dark VS Code theme).

The settings override that can normally set the caret color (https://stackoverflow.com/a/50201205) does not work when Fluent UI is enabled.

I am unsure of what is possible to solve this; but a here are some approaches that might be good if possible:

  • Read the settings I linked to above and use those to color the caret if they are defined.
  • Include an option in the settings to override the caret color.
  • Make the caret white by default in dark mode in order to ensure a minimum amount of contrast.

Can't execute any theme options

Hi,
when I try to execute an option from the theme (enable, disable or reload) I get this error:

 (ENOENT: no such file or directory, open 'c:\Users\Maicol\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-browser\workbench\workbench.html'))

Can you fix it?
Thanks

No reminder to open VSC as Admin when disabling

Expected behaviour: Fluent UI for VS Code should remind users to launch VS Code as administrator when disabling the Fluent UI. It does remind the user to launch as Administrator when Enabling however so this may be a bug.
Actual behaviour: Fluent UI for VS Code does nothing. Changes are not reverted. There is no pop up reminding the user to launch as administrator. This may result in the user being misled to believe that their VS Code installation is completely broken. The latest review on the marketplace page reflects this.

Furthermore please add to the README that Admin is required, although this may just be because I have a system wide installation rather than a user install.

termianl tabs cut off

I can't select the third terminal from the terminal tabs.
image


Happens in both right and left positions.

Is there any temporary solution for this?

I cannot enable the extension

I can't enable the extension:
image

  • OS: Artix Linux
  • Kernel: Linux 5.15.4-artix1-1
  • Editor: VSCodium

I'd like to be able to enable it, but I don't know how to get administrator permissions, I figured out how to open it via the terminal using sudo, but it corrupted my VSCodium installation, and the extension was not there.

I have since then fixed my VSCodium installation by re-installing it, but I am still unable to enable Fluent UI.

Problem with Auto Detect Color Scheme setting

I'm using AutoDarkMode to change the light/dark system theme automatically, I'd like my VSC to do so, but when setting window: Auto Detect Color Scheme is enabled, every time I reload VSC after a system theme changing, the VSC UI will mess up, half light and half dark, and I will have to reload a theme to fix it. Could you please look into that? Though not a huge problem but really annoying. Thanks for your hard work again!
image

Some themes not retaining their original background color

As you can see in the screenshot below on sidebar header, the original background color is Blue-wale, this is the same for other theme except.

The tabs also don't display properly

Screenshot 2021-08-18 at 1 54 03 AM
Screenshot 2021-08-18 at 1 55 19 AM
Screenshot 2021-08-18 at 1 55 47 AM

Same with light theme, this one has a silver light background-color

Screenshot 2021-08-18 at 2 09 39 AM
Screenshot 2021-08-18 at 2 09 27 AM

Not working on Mac

installed extension on Mac OS 11.4 to version: 1.60.0-insider.

run the command in the docs and I get this error

What's new for Fluent UI โ€” sendpro-anywhere-ui-20210820_091719

And then Code locks up and i need to force quit

some suggestion

thanks for you work,
and there is some suggestion for this UI

  1. small sidebar dock width (strongly for me)
    this wastes the space of Horizontal direction
    image

  2. hover setting item
    image

  3. the border of input box
    image

  4. Un useful space of panel
    image

  5. rectangles rounded corners of editor bottom;
    image

  6. Bread crumbs
    image

Use background color from theme for the terminal?

image

The overall UI looks great, But themes should have a slight more impact, especially for the terminal, which retains the color from the theme but doesnt match fluent-ui.

here is how it looks overall
image

Also possible duplicate of #5 ?

Editor doesn't hide overflowing text

I needed some motivation while working on a portfolio project, so I put opened a tab with the image of a singer I really like besides the main tab I was working on and I noticed the editor text overflowing, revealed by the gap between the image and the editor tab.

Full size images

Try to Fix These Problems

1st
Screenshot (6)

Try to remove shadow effect in tab bar cuz in many themes it doesn't Work fr

2nd
Screenshot (7)

Try to work on filter extensions responsiveness

3rd
Screenshot (8)

Fix the Search Ext UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.