fix: Moved logos so they show in production build#1713
fix: Moved logos so they show in production build#1713bmingles merged 2 commits intodeephaven:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1713 +/- ##
=======================================
Coverage 46.44% 46.44%
=======================================
Files 611 611
Lines 37204 37204
Branches 9363 9363
=======================================
Hits 17279 17279
Misses 19871 19871
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
This won't work when you actually publish the package. The outputted result in dist/theme/Logo.css is:
:root{--dh-logo-dark-img: url("../../logos/community-wordmark-dark.svg");--dh-logo-light-img: url("../../logos/community-wordmark-light.svg")}.dh-logo{--dh-logo-width: 230;--dh-logo-height: 40;aspect-ratio:var(--dh-logo-width)/var(--dh-logo-height);max-height:100%;max-width:100%;height:calc(var(--dh-logo-height)*1px);background-image:var(--dh-logo-img);background-repeat:no-repeat;background-position:left center}/*# sourceMappingURL=Logo.css.map */
Which is finding the logo from that path. But the logo dir is not included in the files attributes of package.json, and won't be in the resulting package, so this will still fail after publishing.
|
@mofojed I fixed the files config. Tested via docker compose build of deephaven-core pointed to alpha |
mofojed
left a comment
There was a problem hiding this comment.
In the future, we may want to consider doing an assets folder at the top level, and then having css/scss/svg be subfolders or something.
Moved logos so they show in production build
fixes #1712
Test Plan
npm run buildnpm run previewOpen DH, logo should show up for both dark and light themes