Skip to content
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

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

bmingles
Copy link
Contributor

@bmingles bmingles commented Jan 8, 2024

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

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (73e1837) 46.44% compared to head (eee4220) 46.44%.

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           
Flag Coverage Δ
unit 46.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmingles bmingles requested a review from dsmmcken January 8, 2024 17:00
Copy link
Member

@mofojed mofojed left a 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.

@bmingles
Copy link
Contributor Author

bmingles commented Jan 9, 2024

@mofojed I fixed the files config. Tested via docker compose build of deephaven-core pointed to alpha

@bmingles bmingles requested a review from mofojed January 9, 2024 16:01
Copy link
Member

@mofojed mofojed left a 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.

@bmingles bmingles merged commit a3bea73 into deephaven:main Jan 9, 2024
5 checks passed
@bmingles bmingles deleted the 1712-logos-missing-production branch January 9, 2024 16:12
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logos missing in production build
2 participants