[Feature] Responsive Color Picker #48
Labels
feature
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Responsive Color Picker
The color picker in the Color view should automatically resize to fit the view.
Relevant Code
The 'Color' view in CodeUI is a Webview, which is no different than an ordinary webpage.
The HTML comes from a template literal:
codeui/src/color.ts
Lines 65 to 87 in fff58bb
This is the JavaScript behind the view:
codeui/media/main.js
Lines 5 to 49 in fff58bb
Currently, there is no CSS other than the stylesheet included with the color picker package:
codeui/media/lib/reinvented-color-wheel.css
Lines 1 to 42 in 2325927
Solution
The solve for this issue could involve:
./media/lib/reinvented-color-wheel.css
or a new file, ex:./media/style.css
)./media/main.js
:codeui/media/main.js
Lines 36 to 47 in fff58bb
The VS Code Extension API. I can help with this side of things if you are only comfortable with the 'traditional web' stuff.
An example is the
onDidChangeVisibility
event of the WebviewView. For the most part, we can work within the webview--but if we want to detect open/close/collapse events for the view container itself, we need to 'ask' VS Code.The text was updated successfully, but these errors were encountered: