-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Moved logos so they show in production build #1713
fix: Moved logos so they show in production build #1713
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 build
npm run preview
Open DH, logo should show up for both dark and light themes