Add Material UI 3 component library #3606
No reviewers
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#3606
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ArjixWasTaken/mdui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
About
This PR does the necessary changes needed in order to use a material 3 component library, specifically mdui.
With Material Design 3 we can easily create beautiful UI on-top of ytmusic, I am mainly working on this as a pre-requisite for #3066 .
Tasks:
Fix ytmusic icons, they just can't render(magically went away)Honestly, it might be better if we can somehow transcompile mdui to be in ES5 syntax.
But I don't really know if that would work 🥲
Opened this for review, but I am unsure if it's actually ready to get merged.
Pull Request Overview
This PR integrates the mdui Material Design 3 component library into the YouTube Music desktop application to enable modern UI components on top of the existing interface. The changes focus on making LitElements coexist with the existing Polymer components and resolving CSS conflicts between YouTube Music and mdui.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
Files not reviewed (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -8,6 +8,37 @@ import is from 'electron-is';
import * as config from './config';
import mduiStyleSheet from "@assets/mdui.css?inline"
Missing semicolon at the end of the import statement. Add a semicolon for consistency with the rest of the codebase.
@ -11,0 +13,4 @@
contextBridge.exposeInMainWorld('litIssuedWarnings', new Set([
"Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information.",
"Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded. See https://lit.dev/msg/polyfill-support-missing for more information."
]))
This code suppresses Lit warnings without explanation. Add a comment explaining why these specific warnings are being suppressed and the implications for the application.
@ -3,0 +3,4 @@
import 'mdui';
import { setTheme } from 'mdui/functions/setTheme.js';
setTheme('dark')
Missing semicolon at the end of the statement. Add a semicolon for consistency with the rest of the codebase.
@ -3,0 +3,4 @@
import 'mdui';
import { setTheme } from 'mdui/functions/setTheme.js';
setTheme('dark')
Should
setTheme
be called here?@ -3,0 +3,4 @@
import 'mdui';
import { setTheme } from 'mdui/functions/setTheme.js';
setTheme('dark')
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
;
🚫 [eslint] <stylistic/semi> reported by reviewdog 🐶
Missing semicolon.
@ -1,5 +1,6 @@
import type { Icons } from '@/types/icons';
import type { ComponentProps } from 'solid-js';
import { type IntrinsicElements as MDUIElements } from 'mdui/jsx.en';
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
mdui/jsx.en
import should occur before type import of@/types/icons
@ -8,6 +8,37 @@ import is from 'electron-is';
import * as config from './config';
import mduiStyleSheet from "@assets/mdui.css?inline"
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
"@assets/mdui.css?inline"
with'@assets/mdui.css?inline';
🚫 [eslint] <stylistic/quotes> reported by reviewdog 🐶
Strings must use singlequote.
🚫 [eslint] <stylistic/semi> reported by reviewdog 🐶
Missing semicolon.
@ -10,1 +10,4 @@
import mduiStyleSheet from "@assets/mdui.css?inline"
contextBridge.exposeInMainWorld('litIssuedWarnings', new Set([
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'litIssuedWarnings',
with⏎··'litIssuedWarnings',⏎·
@ -11,0 +11,4 @@
import mduiStyleSheet from "@assets/mdui.css?inline"
contextBridge.exposeInMainWorld('litIssuedWarnings', new Set([
"Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information.",
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
"Lit·is·in·dev·mode.·Not·recommended·for·production!·See·https://lit.dev/msg/dev-mode·for·more·information."
with··'Lit·is·in·dev·mode.·Not·recommended·for·production!·See·https://lit.dev/msg/dev-mode·for·more·information.'
🚫 [eslint] <stylistic/quotes> reported by reviewdog 🐶
Strings must use singlequote.
@ -11,0 +12,4 @@
contextBridge.exposeInMainWorld('litIssuedWarnings', new Set([
"Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information.",
"Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded. See https://lit.dev/msg/polyfill-support-missing for more information."
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
"Shadow·DOM·is·being·polyfilled·via·
ShadyDOM·but·the·
polyfill-support·module·has·not·been·loaded.·See·https://lit.dev/msg/polyfill-support-missing·for·more·information."
with··'Shadow·DOM·is·being·polyfilled·via·
ShadyDOM·but·the·
polyfill-support·module·has·not·been·loaded.·See·https://lit.dev/msg/polyfill-support-missing·for·more·information.',
🚫 [eslint] <stylistic/quotes> reported by reviewdog 🐶
Strings must use singlequote.
@ -11,0 +13,4 @@
contextBridge.exposeInMainWorld('litIssuedWarnings', new Set([
"Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information.",
"Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded. See https://lit.dev/msg/polyfill-support-missing for more information."
]))
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
]))
with··]),⏎);
🚫 [eslint] <stylistic/semi> reported by reviewdog 🐶
Missing semicolon.
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
HTMLElement·&·{·queue:·{·shuffle:·()·=>·void·}·}>(
with⏎········HTMLElement·&·{·queue:·{·shuffle:·()·=>·void·}·}
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··'ytmusic-player-bar',⏎······
with>('ytmusic-player-bar'
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
HTMLElement·&·{·onRepeatButtonClick:·()·=>·void·}>(
with⏎··········HTMLElement·&·{·onRepeatButtonClick:·()·=>·void·}
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··'ytmusic-player-bar',⏎········
with>('ytmusic-player-bar'
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
HTMLElement·&·{·updateVolume:·(volume:·number)·=>·void·}>(
with⏎········HTMLElement·&·{·updateVolume:·(volume:·number)·=>·void·}
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··'ytmusic-player-bar',⏎······
with>('ytmusic-player-bar'
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
HTMLElement·&·{·onVolumeClick:·()·=>·void·}>(
with⏎········HTMLElement·&·{·onVolumeClick:·()·=>·void·}
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··'ytmusic-player-bar',⏎······
with>('ytmusic-player-bar'
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.