Open rudokemper opened 1 year ago
Hello! I am quite new to Rails, I just wanted to ensure that I was editing code in the correct place. for the Map.jsx the dir is /rails/app/javascript/components/Map.jsx/ and for creating the place to upload the SVG icon would be /rails/views/dashboard/themes/edit.html.erb/. Thanks!
Long ago, we customized the standard Mapbox map controls home icon to be a house of the Matawai community:
!https://user-images.githubusercontent.com/31662219/193146179-f0f260d3-b682-4de7-88fe-06ae4466a2aa.png
The intent was always to allow for communities to modify this icon to make it their own, but we haven't gotten around to it until now.
Let's make it possible by allowing an admin user to upload an SVG icon via the CMS dashboard themes page (/member/theme/edit). Then, let's modify the
createHomeButton()
function inMap.jsx
to set.home-icon
background-image
to the community's own SVG icon, or fallback to the existing one in our assets.This may require some testing of different SVGs to ensure that it will work; there could be some idiosyncrasies to the SVG file structure that prevent it from rendering, in which case we could possibly add some validations.
Acceptance criteria: