> Oh, I forgot about this. But the user can now set his "Preferred Website
> Color Scheme" which should be the basis of the theme not the browser setting.
Thank you for the suggestion. I’ll refactor accordingly to ensure alignment
with the preferred color scheme setting.
> It is a very minor nitpick, but is it possible to dynamically determine
> what's the first weekday based on the user's locale and adjust the heatmap
> accordingly?
> [Intl.Locale.prototype.getWeekInfo()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo)
> could be used. It isn't currently available in Firefox but all other
> browsers have it.
>
> P.S. Added [bug
> 1937867](https://bugzilla.mozilla.org/show_bug.cgi?id=1937867) to Firefox's
> bug tracker.
I tried dynamically adjusting the start and end weekdays using
[ghDay](https://cal-heatmap.com/docs/options/subDomain#ghday) as the subdomain,
but it rounds to the first and last weeks of the month, making implementation
tricky. Accommodating this would require significant effort, which may not be
worth it for such a minor adjustment.
> What's the source(s) of all the javascript in `vendor/`? I would expect to
> see `Vendorfile` updated, or preferably if these are sourced from e.g. node
> modules, then they should be included in package.json and added using the
> assets pipeline. If any of these are source files, i.e. written just for this
> project, then they should be in app/.
To be honest I wasn’t too familiar with how our assets pipeline works,so I
just added the `cal-heatmap` library and its dependencies in `vendor/` and
added required code in `manifest.js` and `application.js` to make it load
correctly. If using `package.json` is preferred, I can update the PR
accordingly. I'm not sure if there is some additional config needed for this to
be accomplished or would updating the `package.json` file would be enough.
Thank you for pointing out the existing `popper` inclusion. I’ll remove the
duplicate entry from `application.js` and the `vendor` folder.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#issuecomment-2552523845
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5402/c2552523...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev