> > Separate JS Files: There's already a heatmap.js file containing > > heatmap-related functionality, included in application.js for > > precompilation. > > How is it included in `application.js` if you're including `heatmap.js` > [here](https://github.com/openstreetmap/openstreetmap-website/pull/5402/files#diff-78ff736409d758722403cce31873ba803b3fb526d37398ca21caa557b54dfd95R3)? > But `d3` and `cal-heatmap` are added to `application.js`, bringing its size > up to ~400kb from ~250kb.
I've moved the import to `heatmap.js`. Should be resolved now. > > I've updated the code to account for the "Preferred Website Color Scheme." > > Theme settings should now be working correctly. > > It's not going to work correctly because our _Auto_ option follows > `prefers-color-scheme` which can change any time. If it does, you'll get for > example this: > >  > > Looks like cal-heatmap doesn't have a proper auto scheme ["as not all > websites support dark/light > mode"](https://cal-heatmap.com/docs/options/theme). > > You'd have to then setup a listener like > [this](https://github.com/openstreetmap/openstreetmap-website/pull/4777/commits/e35141b2d1c1733d9a15a01c08b796e4edda6b4e#diff-4fe14e869cf17b068e1bea009a55b094fed13f0cad85337cf4769f32b40a01b5R11-R13) > but without using Leaflet of course and redraw the heatmap. > > Same is true for #5426 by the way. Added the logic to handle the auto prefered-color-changes. Should be resolved now as well. > CSP violations, days of week won't be visible if not resolved: > > > Content-Security-Policy: (Report-Only policy) The page’s settings would > > block an inline style (style-src-attr) from being applied > >  I'm working on resolving this CSP violations. They are from `CalendarLabel` plugin. Right now I'm trying to generate nonce for the .js file and use that to validate and transpass the CSP violation. I'm not sure if it is the right approach for this since I never had experience dealing with similar stuff before. If there is a more elegant and compact solution, please feel free to point it out. Thank you. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402#issuecomment-2589406777 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/5402/c2589406...@github.com>
_______________________________________________ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev