cybersemics / em

A beautiful, minimalistic note-taking app for personal sensemaking.
Other
282 stars 107 forks source link

pass className and cssRaw into Icons #2432

Open yangchristina opened 5 days ago

yangchristina commented 5 days ago

2170

If I've missed any shortcut icons, that would cause a regression due to passing cssRaw into SVG insideToolbarButton.tsx, so please let me know if I have (I've checked and I believe I've got all of them)

Also I believe .popup .logo is unused since isn't inside any Modal. It may have originally been inside Welcome, but not anymore, and I don't think Welcome is even being used. So I don't think this line of code in Welcome.tsx will select anything const logoEls = el.querySelectorAll('[aria-label="logo"]') as NodeListOf< SVGGraphicsElement & HTMLElement & { width: number }> but I haven't run it since I couldn't find any use of the welcome modal, so I can't be sure

raineorshine commented 5 days ago

Thanks!

The Welcome modal is the first thing the user sees when starting the app for the first time, then it is dismissed permanently by flipping a flag in localStorage. You can test the Welcome modal by clearing all site data.

yangchristina commented 5 days ago

@raineorshine Oh I see thanks! I've confirmed that there is indeed no HomeIcon,

Screenshot 2024-09-29 at 11 37 12 PM

so in this part let width = logoEls[0] && logoEls[0].width, width is actually undefined, which when properly typed makes line 43 problematic.

Screenshot 2024-09-29 at 11 39 34 PM
raineorshine commented 5 days ago

Must be some old functionality that didn't get removed properly!

yangchristina commented 4 days ago

@raineorshine I also found another regression I introduced previously which I've fixed in the previous commit ddea822, sorry I missed this I removed .modal-content, but missed where it was used as a querySelector Realistically this wouldn't have impacted anyone, since it only affects when you make your screen basically as small in height as it can go. The commit that introduced this was 6410a93, line 104 in ModalComponent.tsx

yangchristina commented 4 days ago

@raineorshine I can quickly remove the logo stuff if you'd like? It's just removing lines 48, 43, and 30 in the image above, as well as the logo selector

raineorshine commented 4 days ago

I'd appreciate that!