release notes: the 5.1.0 popup, and dataforest cloud in Settings > About

The release popup now shows 5.1.0: place search, shared place details
and faster routing as three cards side by side, each with its own
drawing. The support band is set as a card like the promise above it
(optional supportLabelKey; a release without it keeps the plain line),
and the two support buttons get the same glass look in their colours.

Settings > About gets a full-width panel for dataforest cloud, who
sponsor the servers behind place search, address search and routing.
Both logos ship in client/public/brands, so opening Settings reaches no
third party. Wherever a line names dataforest cloud it links to
https://cloud.dataforest.net/?mtm_campaign=trek, the link dataforest
gave us; the README moves to it too.

All 28 locales carry the new copy, and the old 5.0 card keys are gone.
This commit is contained in:
Maurice
2026-10-31 11:04:19 +01:00
parent f4e524f3c3
commit def8b8a24d
71 changed files with 1636 additions and 692 deletions
@@ -0,0 +1,23 @@
<svg width="310" height="48" viewBox="0 0 310 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39.9361 44.5592H37.3496V40.5946H38.7949C39.6016 40.5946 40.1393 40.0905 40.1393 38.9477V32.7663C40.1393 30.1462 41.3157 28.7345 43.4989 28.0302C41.3157 27.3243 40.1393 25.9142 40.1393 23.2941V17.1127C40.1393 15.9699 39.6016 15.4673 38.7949 15.4673H37.3496V11.5027H39.9361C42.8252 11.5027 44.8403 13.2825 44.8403 16.1059V22.5898C44.8403 24.8738 46.2184 26.0166 48.5696 26.0166V30.0484C46.2184 30.0484 44.8403 31.1912 44.8403 33.4752V39.9591C44.8403 42.7809 42.8252 44.5607 39.9361 44.5607V44.5592Z" fill="white"/>
<path d="M0 30.0453V26.0135C2.35125 26.0135 3.72931 24.8708 3.72931 22.5867V16.1028C3.72931 13.281 5.74445 11.4996 8.63347 11.4996H11.22V15.4642H9.77472C8.96806 15.4642 8.43028 15.9684 8.43028 17.1096V23.291C8.43028 25.9112 7.25389 27.3228 5.07069 28.0271C7.25389 28.733 8.43028 30.1431 8.43028 32.7633V38.9446C8.43028 40.0874 8.96806 40.5916 9.77472 40.5916H11.22V44.5562H8.63347C5.74445 44.5562 3.72931 42.7763 3.72931 39.9545V33.4706C3.72931 31.1866 2.35125 30.0438 0 30.0438V30.0453Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.2855 0.076416L32.7769 8.5678L28.8169 12.5263L24.284 7.99336L19.7511 12.5263L15.7926 8.5678L24.284 0.076416H24.2855Z" fill="#02C382"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.2855 11.7119L34.4055 21.8319L30.4471 25.7904L24.2855 19.6289L18.124 25.7904L14.1655 21.8319L24.2855 11.7119Z" fill="#02C382"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.2856 23.3475L36.0342 35.0961L32.0757 39.0561L24.2871 31.2675L16.4985 39.0561L12.54 35.0961L24.2887 23.3475H24.2856Z" fill="#02C382"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.4867 47.8958V37.3129H27.086V47.8958H21.4867Z" fill="white"/>
<path d="M216.808 36.4329H211.635V23.9357H208.444V19.635H211.635V14.4283H216.808V19.635H220V23.9357H216.808V36.4329Z" fill="white"/>
<path d="M192.671 31.1239H197.575C197.643 32.3003 198.516 33.0046 200.095 33.0046C201.673 33.0046 202.446 32.4332 202.446 31.5593C202.446 31.0552 202.177 30.5174 200.933 30.2485L197.843 29.5763C194.752 28.904 193.241 27.5611 193.241 24.6049C193.241 21.1108 196.231 19.0957 200.263 19.0957C204.294 19.0957 206.881 21.3797 206.881 24.7729H201.977C201.977 23.6302 201.271 22.8586 200.029 22.8586C198.853 22.8586 198.115 23.4636 198.115 24.3711C198.115 25.1442 198.753 25.5811 199.928 25.85L203.052 26.5222C205.807 27.1272 207.319 28.4029 207.319 31.0918C207.319 34.6867 204.262 36.8699 199.894 36.8699C195.527 36.8699 192.671 34.5186 192.671 31.1254V31.1239Z" fill="white"/>
<path d="M182.351 36.8699C177.279 36.8699 173.65 33.1742 173.65 28.0011C173.65 22.8281 177.178 19.0988 182.25 19.0988C187.322 19.0988 190.816 22.5592 190.816 28.0347V29.3456L178.622 29.4128C178.924 31.6296 180.168 32.6715 182.452 32.6715C184.4 32.6715 185.778 31.9657 186.147 30.7572H190.884C190.279 34.4865 186.953 36.8714 182.351 36.8714V36.8699ZM182.284 23.2971C180.235 23.2971 179.092 24.2046 178.689 26.2197H185.677C185.677 24.4383 184.366 23.2971 182.284 23.2971Z" fill="white"/>
<path d="M172.433 19.6351V24.5056H170.787C167.831 24.5056 166.051 25.8164 166.051 29.1424V36.433H160.878V19.6687H165.749L166.017 22.1544C166.723 20.5074 168.201 19.3998 170.453 19.3998C171.058 19.3998 171.728 19.467 172.434 19.6351H172.433Z" fill="white"/>
<path d="M139.367 28.0011C139.367 22.6936 143.264 19.1323 148.639 19.1323C154.014 19.1323 157.878 22.6936 157.878 28.0011C157.878 33.3086 153.98 36.8362 148.639 36.8362C143.298 36.8362 139.367 33.3086 139.367 28.0011ZM144.574 27.9675C144.574 30.5204 146.219 32.2009 148.639 32.2009C151.059 32.2009 152.671 30.5219 152.671 27.9675C152.671 25.413 151.025 23.7676 148.639 23.7676C146.253 23.7676 144.574 25.4466 144.574 27.9675Z" fill="white"/>
<path d="M126.917 19.635H129.235V18.2906C129.235 13.2856 131.855 11.1008 136.122 11.1008C136.828 11.1008 137.634 11.1681 138.44 11.3025V15.7376H136.994C134.878 15.7376 134.408 16.8468 134.408 18.2906V19.635H138.44V23.9357H134.408V36.4329H129.235V23.9357H126.917V19.635Z" fill="white"/>
<path d="M114.606 36.8699C111.045 36.8699 108.828 34.7875 108.828 31.4951C108.828 28.4045 111.011 26.4901 115.043 26.1876L119.746 25.8179V25.549C119.746 23.9021 118.737 23.0297 116.89 23.0297C114.707 23.0297 113.531 23.87 113.531 25.381H109.23C109.23 21.5844 112.354 19.0988 117.158 19.0988C121.961 19.0988 124.783 21.8197 124.783 26.6246V36.4344H120.215L119.879 34.2176C119.341 35.7622 117.124 36.8714 114.605 36.8714L114.606 36.8699ZM116.42 33.0397C118.401 33.0397 119.779 32.065 119.779 30.1507V29.2432L117.159 29.4785C114.909 29.6801 114.102 30.1843 114.102 31.2583C114.102 32.4683 114.842 33.0382 116.42 33.0382V33.0397Z" fill="white"/>
<path d="M104.017 36.4329H98.8441V23.9357H95.6526V19.635H98.8441V14.4283H104.017V19.635H107.209V23.9357H104.017V36.4329Z" fill="white"/>
<path d="M83.5052 36.8699C79.944 36.8699 77.7272 34.7875 77.7272 31.4951C77.7272 28.4045 79.9104 26.4901 83.9422 26.1876L88.6462 25.8179V25.549C88.6462 23.9021 87.6379 23.0297 85.7908 23.0297C83.6076 23.0297 82.4312 23.87 82.4312 25.381H78.1305C78.1305 21.5844 81.2548 19.0988 86.0581 19.0988C90.8615 19.0988 93.6833 21.8197 93.6833 26.6246V36.4344H89.1137L88.7776 34.2176C88.2398 35.7622 86.023 36.8714 83.5037 36.8714L83.5052 36.8699ZM85.3187 33.0397C87.3002 33.0397 88.6783 32.065 88.6783 30.1507V29.2432L86.0581 29.4785C83.8077 29.6801 83.0011 30.1843 83.0011 31.2583C83.0011 32.4683 83.7405 33.0382 85.3187 33.0382V33.0397Z" fill="white"/>
<path d="M63.9986 36.8699C59.1617 36.8699 56.0374 33.4431 56.0374 28.1356C56.0374 22.8281 59.2289 19.0988 64.3347 19.0988C66.4171 19.0988 68.4001 19.9391 69.3733 21.1812V11.1024H74.5464V36.433H69.6758L69.4069 34.2834C68.4994 35.828 66.4171 36.8699 63.9986 36.8699ZM65.2407 32.1323C67.6592 32.1323 69.3397 30.4533 69.3397 27.9324C69.3397 25.4116 67.6607 23.7326 65.2407 23.7326C62.8207 23.7326 61.2425 25.4452 61.2425 27.9324C61.2425 30.4196 62.7871 32.1323 65.2407 32.1323Z" fill="white"/>
<path d="M228.377 28.3024C228.377 26.6 228.702 25.1104 229.351 23.8336C230.023 22.5344 230.942 21.5264 232.107 20.8096C233.294 20.0704 234.671 19.7008 236.239 19.7008C238.121 19.7008 239.7 20.2048 240.977 21.2128C242.276 22.2208 243.083 23.5648 243.396 25.2448H241.078C240.764 24.1248 240.171 23.2624 239.297 22.6576C238.423 22.0528 237.415 21.7504 236.273 21.7504C235.198 21.7504 234.235 22.0192 233.383 22.5568C232.532 23.0944 231.86 23.856 231.367 24.8416C230.897 25.8048 230.662 26.9472 230.662 28.2688C230.662 29.568 230.886 30.6992 231.334 31.6624C231.782 32.6256 232.409 33.376 233.215 33.9136C234.044 34.4512 235.007 34.72 236.105 34.72C237.337 34.72 238.401 34.4176 239.297 33.8128C240.193 33.1856 240.798 32.3456 241.111 31.2928H243.463C243.217 32.3904 242.747 33.3536 242.052 34.1824C241.358 35.0112 240.495 35.6608 239.465 36.1312C238.457 36.5792 237.337 36.8032 236.105 36.8032C234.559 36.8032 233.204 36.456 232.039 35.7616C230.897 35.0448 230.001 34.048 229.351 32.7712C228.702 31.4944 228.377 30.0048 228.377 28.3024Z" fill="white"/>
<path d="M249.395 36.4H247.076V11.9056H249.395V36.4Z" fill="white"/>
<path d="M253.183 28.2688C253.183 26.5888 253.542 25.1104 254.258 23.8336C254.975 22.5568 255.961 21.5488 257.215 20.8096C258.47 20.0704 259.881 19.7008 261.449 19.7008C263.039 19.7008 264.45 20.0704 265.682 20.8096C266.937 21.5488 267.922 22.5568 268.639 23.8336C269.356 25.1104 269.714 26.5888 269.714 28.2688C269.714 29.904 269.356 31.3712 268.639 32.6704C267.922 33.9472 266.937 34.9552 265.682 35.6944C264.45 36.4336 263.039 36.8032 261.449 36.8032C259.881 36.8032 258.47 36.4336 257.215 35.6944C255.961 34.9552 254.975 33.9472 254.258 32.6704C253.542 31.3712 253.183 29.904 253.183 28.2688ZM255.535 28.2352C255.535 29.512 255.782 30.6432 256.274 31.6288C256.79 32.592 257.484 33.3536 258.358 33.9136C259.254 34.4512 260.284 34.72 261.449 34.72C262.614 34.72 263.633 34.4512 264.506 33.9136C265.402 33.3536 266.097 32.592 266.59 31.6288C267.105 30.6432 267.362 29.512 267.362 28.2352C267.362 26.9808 267.105 25.872 266.59 24.9088C266.097 23.9456 265.402 23.184 264.506 22.624C263.633 22.064 262.614 21.784 261.449 21.784C260.284 21.784 259.254 22.064 258.358 22.624C257.484 23.184 256.79 23.9456 256.274 24.9088C255.782 25.872 255.535 26.9808 255.535 28.2352Z" fill="white"/>
<path d="M284.453 20.1376H286.771V36.4H284.755L284.453 33.6448C284.005 34.5856 283.254 35.3472 282.202 35.9296C281.171 36.512 280.018 36.8032 278.741 36.8032C276.837 36.8032 275.37 36.1984 274.339 34.9888C273.331 33.7792 272.827 32.1888 272.827 30.2176V20.104H275.179V29.4784C275.179 31.4048 275.571 32.76 276.355 33.544C277.162 34.328 278.203 34.72 279.48 34.72C281.048 34.72 282.269 34.216 283.142 33.208C284.016 32.1776 284.453 30.6992 284.453 28.7728V20.1376Z" fill="white"/>
<path d="M297.656 36.8032C296.088 36.8032 294.744 36.4336 293.624 35.6944C292.504 34.9552 291.642 33.9472 291.037 32.6704C290.432 31.3712 290.13 29.9152 290.13 28.3024C290.13 26.6672 290.432 25.2 291.037 23.9008C291.642 22.6016 292.504 21.5824 293.624 20.8432C294.767 20.0816 296.144 19.7008 297.757 19.7008C299.101 19.7008 300.288 19.992 301.319 20.5744C302.372 21.1568 303.178 22.0416 303.738 23.2288V11.9056H306.056V36.4H304.04L303.805 33.0736C303.223 34.328 302.394 35.2688 301.319 35.896C300.244 36.5008 299.023 36.8032 297.656 36.8032ZM298.06 34.6864C299.269 34.6864 300.288 34.4176 301.117 33.88C301.946 33.32 302.584 32.5584 303.032 31.5952C303.48 30.6096 303.704 29.4896 303.704 28.2352C303.704 26.9808 303.48 25.872 303.032 24.9088C302.584 23.9456 301.946 23.184 301.117 22.624C300.288 22.064 299.269 21.784 298.06 21.784C296.895 21.784 295.887 22.064 295.036 22.624C294.207 23.184 293.568 23.9456 293.12 24.9088C292.695 25.872 292.482 26.9808 292.482 28.2352C292.482 29.4896 292.695 30.6096 293.12 31.5952C293.568 32.5584 294.207 33.32 295.036 33.88C295.887 34.4176 296.895 34.6864 298.06 34.6864Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

+23
View File
@@ -0,0 +1,23 @@
<svg width="258" height="40" viewBox="0 0 258 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M33.28 37.1326H31.1245V33.8288H32.3289C33.0011 33.8288 33.4493 33.4087 33.4493 32.4564V27.3052C33.4493 25.1218 34.4296 23.9454 36.2489 23.3584C34.4296 22.7703 33.4493 21.5951 33.4493 19.4117V14.2605C33.4493 13.3082 33.0011 12.8894 32.3289 12.8894H31.1245V9.58553H33.28C35.6875 9.58553 37.3668 11.0688 37.3668 13.4215V18.8248C37.3668 20.7281 38.5151 21.6804 40.4745 21.6804V25.0403C38.5151 25.0403 37.3668 25.9926 37.3668 27.896V33.2992C37.3668 35.6507 35.6875 37.1339 33.28 37.1339V37.1326Z" fill="#1E302D"/>
<path d="M0 25.0377V21.6779C1.95937 21.6779 3.10775 20.7256 3.10775 18.8222V13.419C3.10775 11.0675 4.78704 9.58298 7.19456 9.58298H9.35V12.8868H8.1456C7.47338 12.8868 7.02523 13.3069 7.02523 14.258V19.4091C7.02523 21.5926 6.04491 22.769 4.22558 23.3559C6.04491 23.9441 7.02523 25.1192 7.02523 27.3027V32.4538C7.02523 33.4061 7.47338 33.8263 8.1456 33.8263H9.35V37.1301H7.19456C4.78704 37.1301 3.10775 35.6469 3.10775 33.2954V27.8921C3.10775 25.9888 1.95937 25.0365 0 25.0365V25.0377Z" fill="#1E302D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.2381 0.063694L27.3142 7.13985L24.0142 10.4386L20.2368 6.66115L16.4594 10.4386L13.1606 7.13985L20.2368 0.063694H20.2381Z" fill="#02C382"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.238 9.75996L28.6714 18.1933L25.3726 21.492L20.238 16.3574L15.1034 21.492L11.8047 18.1933L20.238 9.75996Z" fill="#02C382"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.2382 19.4563L30.0287 29.2468L26.7299 32.5468L20.2394 26.0562L13.7489 32.5468L10.4502 29.2468L20.2407 19.4563H20.2382Z" fill="#02C382"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.9058 39.9132V31.0941H22.5718V39.9132H17.9058Z" fill="#1E302D"/>
<path d="M180.674 30.3608H176.363V19.9464H173.703V16.3625H176.363V12.0236H180.674V16.3625H183.333V19.9464H180.674V30.3608Z" fill="#1E302D"/>
<path d="M160.559 25.9366H164.646C164.702 26.9169 165.43 27.5038 166.745 27.5038C168.06 27.5038 168.705 27.0277 168.705 26.2994C168.705 25.8793 168.481 25.4311 167.444 25.2071L164.869 24.6469C162.293 24.0867 161.034 22.9676 161.034 20.5041C161.034 17.5924 163.526 15.9131 166.885 15.9131C170.245 15.9131 172.401 17.8164 172.401 20.6441H168.314C168.314 19.6918 167.726 19.0488 166.691 19.0488C165.71 19.0488 165.095 19.553 165.095 20.3093C165.095 20.9535 165.627 21.3176 166.607 21.5417L169.21 22.1019C171.506 22.606 172.766 23.6691 172.766 25.9098C172.766 28.9056 170.218 30.7249 166.579 30.7249C162.939 30.7249 160.559 28.7655 160.559 25.9378V25.9366Z" fill="#1E302D"/>
<path d="M151.959 30.7249C147.732 30.7249 144.708 27.6451 144.708 23.3343C144.708 19.0234 147.648 15.9156 151.875 15.9156C156.102 15.9156 159.014 18.7993 159.014 23.3623V24.4546L148.851 24.5107C149.103 26.358 150.14 27.2263 152.043 27.2263C153.666 27.2263 154.815 26.6381 155.123 25.631H159.07C158.565 28.7388 155.794 30.7262 151.959 30.7262V30.7249ZM151.903 19.4142C150.196 19.4142 149.243 20.1705 148.907 21.8498H154.731C154.731 20.3653 153.638 19.4142 151.903 19.4142Z" fill="#1E302D"/>
<path d="M143.694 16.3625V20.4213H142.323C139.859 20.4213 138.376 21.5137 138.376 24.2853V30.3608H134.065V16.3905H138.124L138.348 18.4619C138.936 17.0895 140.167 16.1664 142.044 16.1664C142.548 16.1664 143.107 16.2225 143.695 16.3625H143.694Z" fill="#1E302D"/>
<path d="M116.139 23.3343C116.139 18.9113 119.387 15.9436 123.866 15.9436C128.345 15.9436 131.565 18.9113 131.565 23.3343C131.565 27.7572 128.317 30.6969 123.866 30.6969C119.415 30.6969 116.139 27.7572 116.139 23.3343ZM120.478 23.3062C120.478 25.4337 121.849 26.8341 123.866 26.8341C125.883 26.8341 127.226 25.435 127.226 23.3062C127.226 21.1775 125.855 19.8064 123.866 19.8064C121.877 19.8064 120.478 21.2056 120.478 23.3062Z" fill="#1E302D"/>
<path d="M105.764 16.3625H107.696V15.2421C107.696 11.0713 109.879 9.2507 113.435 9.2507C114.023 9.2507 114.695 9.30672 115.366 9.41875V13.1147H114.162C112.399 13.1147 112.006 14.039 112.006 15.2421V16.3625H115.366V19.9464H112.006V30.3608H107.696V19.9464H105.764V16.3625Z" fill="#1E302D"/>
<path d="M95.505 30.7249C92.5373 30.7249 90.6899 28.9896 90.6899 26.246C90.6899 23.6704 92.5093 22.0751 95.8691 21.823L99.7879 21.5149V21.2909C99.7879 19.9184 98.9476 19.1914 97.4083 19.1914C95.589 19.1914 94.6087 19.8917 94.6087 21.1508H91.0248C91.0248 17.987 93.6284 15.9156 97.6311 15.9156C101.634 15.9156 103.985 18.1831 103.985 22.1872V30.362H100.179L99.8986 28.5147C99.4505 29.8019 97.6031 30.7262 95.5037 30.7262L95.505 30.7249ZM97.0162 27.5331C98.6675 27.5331 99.8159 26.7208 99.8159 25.1256V24.3693L97.6324 24.5654C95.7571 24.7335 95.0848 25.1536 95.0848 26.0486C95.0848 27.0569 95.7011 27.5318 97.0162 27.5318V27.5331Z" fill="#1E302D"/>
<path d="M86.6809 30.3608H82.37V19.9464H79.7104V16.3625H82.37V12.0236H86.6809V16.3625H89.3405V19.9464H86.6809V30.3608Z" fill="#1E302D"/>
<path d="M69.5875 30.7249C66.6198 30.7249 64.7725 28.9896 64.7725 26.246C64.7725 23.6704 66.5918 22.0751 69.9516 21.823L73.8716 21.5149V21.2909C73.8716 19.9184 73.0314 19.1914 71.4921 19.1914C69.6728 19.1914 68.6925 19.8917 68.6925 21.1508H65.1086C65.1086 17.987 67.7122 15.9156 71.7149 15.9156C75.7177 15.9156 78.0692 18.1831 78.0692 22.1872V30.362H74.2612L73.9811 28.5147C73.533 29.8019 71.6857 30.7262 69.5862 30.7262L69.5875 30.7249ZM71.0987 27.5331C72.75 27.5331 73.8984 26.7208 73.8984 25.1256V24.3693L71.7149 24.5654C69.8396 24.7335 69.1674 25.1536 69.1674 26.0486C69.1674 27.0569 69.7836 27.5318 71.0987 27.5318V27.5331Z" fill="#1E302D"/>
<path d="M53.3321 30.7249C49.3013 30.7249 46.6978 27.8692 46.6978 23.4463C46.6978 19.0234 49.3574 15.9156 53.6122 15.9156C55.3475 15.9156 57.0001 16.6159 57.8111 17.6509V9.25197H62.1219V30.3608H58.0631L57.8391 28.5695C57.0828 29.8566 55.3475 30.7249 53.3321 30.7249ZM54.3672 26.7769C56.3826 26.7769 57.7831 25.3777 57.7831 23.277C57.7831 21.1763 56.3839 19.7771 54.3672 19.7771C52.3505 19.7771 51.0354 21.2043 51.0354 23.277C51.0354 25.3497 52.3225 26.7769 54.3672 26.7769Z" fill="#1E302D"/>
<path d="M190.314 23.5854C190.314 22.1667 190.585 20.9254 191.126 19.8614C191.686 18.7787 192.451 17.9387 193.422 17.3414C194.411 16.7254 195.559 16.4174 196.866 16.4174C198.434 16.4174 199.75 16.8374 200.814 17.6774C201.897 18.5174 202.569 19.6374 202.83 21.0374H200.898C200.637 20.104 200.142 19.3854 199.414 18.8814C198.686 18.3774 197.846 18.1254 196.894 18.1254C195.998 18.1254 195.195 18.3494 194.486 18.7974C193.777 19.2454 193.217 19.88 192.806 20.7014C192.414 21.504 192.218 22.456 192.218 23.5574C192.218 24.64 192.405 25.5827 192.778 26.3854C193.151 27.188 193.674 27.8134 194.346 28.2614C195.037 28.7094 195.839 28.9334 196.754 28.9334C197.781 28.9334 198.667 28.6814 199.414 28.1774C200.161 27.6547 200.665 26.9547 200.926 26.0774H202.886C202.681 26.992 202.289 27.7947 201.71 28.4854C201.131 29.176 200.413 29.7174 199.554 30.1094C198.714 30.4827 197.781 30.6694 196.754 30.6694C195.466 30.6694 194.337 30.38 193.366 29.8014C192.414 29.204 191.667 28.3734 191.126 27.3094C190.585 26.2454 190.314 25.004 190.314 23.5854Z" fill="#1E302D"/>
<path d="M207.829 30.3334H205.897V9.92135H207.829V30.3334Z" fill="#1E302D"/>
<path d="M210.986 23.5574C210.986 22.1574 211.285 20.9254 211.882 19.8614C212.479 18.7974 213.301 17.9574 214.346 17.3414C215.391 16.7254 216.567 16.4174 217.874 16.4174C219.199 16.4174 220.375 16.7254 221.402 17.3414C222.447 17.9574 223.269 18.7974 223.866 19.8614C224.463 20.9254 224.762 22.1574 224.762 23.5574C224.762 24.92 224.463 26.1427 223.866 27.2254C223.269 28.2894 222.447 29.1294 221.402 29.7454C220.375 30.3614 219.199 30.6694 217.874 30.6694C216.567 30.6694 215.391 30.3614 214.346 29.7454C213.301 29.1294 212.479 28.2894 211.882 27.2254C211.285 26.1427 210.986 24.92 210.986 23.5574ZM212.946 23.5294C212.946 24.5934 213.151 25.536 213.562 26.3574C213.991 27.16 214.57 27.7947 215.298 28.2614C216.045 28.7094 216.903 28.9334 217.874 28.9334C218.845 28.9334 219.694 28.7094 220.422 28.2614C221.169 27.7947 221.747 27.16 222.158 26.3574C222.587 25.536 222.802 24.5934 222.802 23.5294C222.802 22.484 222.587 21.56 222.158 20.7574C221.747 19.9547 221.169 19.32 220.422 18.8534C219.694 18.3867 218.845 18.1534 217.874 18.1534C216.903 18.1534 216.045 18.3867 215.298 18.8534C214.57 19.32 213.991 19.9547 213.562 20.7574C213.151 21.56 212.946 22.484 212.946 23.5294Z" fill="#1E302D"/>
<path d="M237.044 16.7814H238.976V30.3334H237.296L237.044 28.0374C236.67 28.8214 236.045 29.456 235.168 29.9414C234.309 30.4267 233.348 30.6694 232.284 30.6694C230.697 30.6694 229.474 30.1654 228.616 29.1574C227.776 28.1494 227.356 26.824 227.356 25.1814V16.7534H229.316V24.5654C229.316 26.1707 229.642 27.3 230.296 27.9534C230.968 28.6067 231.836 28.9334 232.9 28.9334C234.206 28.9334 235.224 28.5134 235.952 27.6734C236.68 26.8147 237.044 25.5827 237.044 23.9774V16.7814Z" fill="#1E302D"/>
<path d="M248.047 30.6694C246.74 30.6694 245.62 30.3614 244.687 29.7454C243.754 29.1294 243.035 28.2894 242.531 27.2254C242.027 26.1427 241.775 24.9294 241.775 23.5854C241.775 22.2227 242.027 21 242.531 19.9174C243.035 18.8347 243.754 17.9854 244.687 17.3694C245.639 16.7347 246.787 16.4174 248.131 16.4174C249.251 16.4174 250.24 16.66 251.099 17.1454C251.976 17.6307 252.648 18.368 253.115 19.3574V9.92135H255.047V30.3334H253.367L253.171 27.5614C252.686 28.6067 251.995 29.3907 251.099 29.9134C250.203 30.4174 249.186 30.6694 248.047 30.6694ZM248.383 28.9054C249.391 28.9054 250.24 28.6814 250.931 28.2334C251.622 27.7667 252.154 27.132 252.527 26.3294C252.9 25.508 253.087 24.5747 253.087 23.5294C253.087 22.484 252.9 21.56 252.527 20.7574C252.154 19.9547 251.622 19.32 250.931 18.8534C250.24 18.3867 249.391 18.1534 248.383 18.1534C247.412 18.1534 246.572 18.3867 245.863 18.8534C245.172 19.32 244.64 19.9547 244.267 20.7574C243.912 21.56 243.735 22.484 243.735 23.5294C243.735 24.5747 243.912 25.508 244.267 26.3294C244.64 27.132 245.172 27.7667 245.863 28.2334C246.572 28.6814 247.412 28.9054 248.383 28.9054Z" fill="#1E302D"/>
</svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

-4
View File
@@ -899,7 +899,6 @@
"src/components/Roadtrip/useVehicleRange.test.ts",
"src/components/Roadtrip/useVehicleRange.ts",
"src/components/Roadtrip/vehicleRange.ts",
"src/components/Settings/AboutTab.tsx",
"src/components/Settings/AccountTab.test.tsx",
"src/components/Settings/AccountTab.tsx",
"src/components/Settings/AirTrailConnectionSection.test.tsx",
@@ -991,9 +990,6 @@
"src/components/Studio/useBookPresence.ts",
"src/components/Studio/useBookStore.ts",
"src/components/Studio/useSpreadInteraction.ts",
"src/components/SystemNotices/ReleaseNoticeModal.test.tsx",
"src/components/SystemNotices/ReleaseNoticeModal.tsx",
"src/components/SystemNotices/ReleaseNoticeVisuals.tsx",
"src/components/SystemNotices/SystemNoticeBanner.extra.test.tsx",
"src/components/SystemNotices/SystemNoticeBanner.test.tsx",
"src/components/SystemNotices/SystemNoticeBanner.tsx",
+1 -1
View File
@@ -35,7 +35,7 @@
"components/Roadtrip/dayColors.ts": 8,
"components/Roadtrip/nightBookend.ts": 1,
"components/Roadtrip/stopKinds.ts": 1,
"components/Settings/AboutTab.tsx": 3,
"components/Settings/AboutTab.tsx": 5,
"components/Settings/AccountTab.tsx": 2,
"components/Settings/AppearanceSettingsTab.tsx": 1,
"components/Settings/PasskeysSection.tsx": 1,
@@ -60,7 +60,8 @@ describe('AboutTab', () => {
it('FE-COMP-ABOUT-009: all external links have rel="noopener noreferrer"', () => {
render(<AboutTab appVersion="2.9.10" />);
const links = document.querySelectorAll('a');
expect(links).toHaveLength(6);
// Six tiles, and the sponsor panel: its logo, its button and the name in its title and body.
expect(links).toHaveLength(10);
links.forEach((link) => {
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
});
@@ -130,4 +131,24 @@ describe('AboutTab', () => {
expect(link.style.borderColor).toBe('');
expect(link.style.boxShadow).toBe('');
});
it('FE-COMP-ABOUT-018: the sponsor panel links dataforest cloud wherever it is named, with both logos bundled', () => {
render(<AboutTab appVersion="1.0.0" />);
const links = document.querySelectorAll('a[href="https://cloud.dataforest.net/?mtm_campaign=trek"]');
// The logo tile, the call to action, and the brand name in the title and in the body.
expect(links).toHaveLength(4);
for (const link of links) {
expect(link).toHaveAttribute('target', '_blank');
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
}
const logos = [...document.querySelectorAll('img')].map((img) => img.getAttribute('src'));
expect(logos).toEqual(
expect.arrayContaining(['/brands/dataforest-cloud.svg', '/brands/dataforest-cloud-dark.svg'])
);
// Served by TREK itself: opening Settings must not reach a third party.
expect(logos.every((src) => src?.startsWith('/'))).toBe(true);
expect(screen.getByText('Place search')).toBeInTheDocument();
expect(screen.getByText('Address search')).toBeInTheDocument();
expect(screen.getByText('Routing')).toBeInTheDocument();
});
});
+150 -11
View File
@@ -1,16 +1,30 @@
import { BookOpen, Bug, Coffee, ExternalLink, Github, Heart, Info, Lightbulb } from 'lucide-react';
import {
ArrowUpRight,
BookOpen,
Bug,
Coffee,
ExternalLink,
Github,
Heart,
Info,
Lightbulb,
MapPin,
Route,
Search,
} from 'lucide-react';
import React, { type CSSProperties, type ReactNode } from 'react';
import { useTranslation } from '../../i18n';
import { useAuthStore } from '../../store/authStore';
import { fs } from '../shared/DialogShell';
import Section from './Section';
import { StatusPill } from './settingsKit';
import { fs } from '../shared/DialogShell';
import { useAuthStore } from '../../store/authStore';
interface Props {
appVersion: string;
}
const DISCORD_PATH = 'M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z';
const DISCORD_PATH =
'M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z';
// The services' own colours: each tile takes its brand on hover and in its icon square.
const BRAND = {
@@ -27,7 +41,8 @@ const SIGNAL = {
} as const;
/** Tile chrome that reads the tile's colour from `--tile`: the border and a faint ring on hover. */
const TILE_HOVER = 'hover:border-[color:var(--tile)] hover:shadow-[0_0_0_1px_color-mix(in_srgb,var(--tile)_14%,transparent)]';
const TILE_HOVER =
'hover:border-[color:var(--tile)] hover:shadow-[0_0_0_1px_color-mix(in_srgb,var(--tile)_14%,transparent)]';
/** The icon square in the tile's colour. */
const TILE_ICON = 'bg-[color-mix(in_srgb,var(--tile)_12%,transparent)] text-[color:var(--tile)]';
@@ -36,7 +51,13 @@ const TILE_ICON = 'bg-[color-mix(in_srgb,var(--tile)_12%,transparent)] text-[col
* external-link mark on the right. The border picks up the tile's colour while
* the pointer is on it.
*/
function LinkTile({ href, color, icon, title, hint }: {
function LinkTile({
href,
color,
icon,
title,
hint,
}: {
href: string;
/** A brand colour or a theme token, handed to the classes as `--tile`. */
color?: string;
@@ -53,19 +74,133 @@ function LinkTile({ href, color, icon, title, hint }: {
style={color ? ({ '--tile': color } as CSSProperties) : undefined}
>
{icon && (
<span className={`grid h-10 w-10 flex-none place-items-center rounded-[12px] ${color ? TILE_ICON : 'bg-surface-tertiary text-content-secondary'}`}>
<span
className={`grid h-10 w-10 flex-none place-items-center rounded-[12px] ${color ? TILE_ICON : 'bg-surface-tertiary text-content-secondary'}`}
>
{icon}
</span>
)}
<div className="min-w-0 flex-1">
<div className="truncate font-semibold text-content" style={fs(13, 'body')}>{title}</div>
<div className="truncate text-content-faint" style={fs(11.5)}>{hint}</div>
<div className="truncate font-semibold text-content" style={fs(13, 'body')}>
{title}
</div>
<div className="truncate text-content-faint" style={fs(11.5)}>
{hint}
</div>
</div>
<ExternalLink size={14} className="flex-none text-content-faint" />
</a>
);
}
const DATAFOREST_HREF = 'https://cloud.dataforest.net/?mtm_campaign=trek';
const DATAFOREST_NAME = 'dataforest cloud';
const DATAFOREST = '#02C382'; // theme-lint-disable: brand colour (dataforest cloud)
/** The sponsor's name, linked wherever a line names it: it is a brand and reads the same in every language. */
function withDataforestLink(text: string): ReactNode {
const parts = text.split(DATAFOREST_NAME);
if (parts.length === 1) return text;
return parts.flatMap((part, i) =>
i === 0
? [part]
: [
<a
key={i}
href={DATAFOREST_HREF}
target="_blank"
rel="noopener noreferrer"
className="text-[color:var(--df)] no-underline hover:underline"
>
{DATAFOREST_NAME}
</a>,
part,
]
);
}
/**
* The sponsor of TREK's own servers, across the whole section: what runs there
* and a way to visit them. The logo ships with TREK, so opening Settings sends
* nothing to a third party.
*/
function DataforestBanner() {
const { t } = useTranslation();
const services = [
{ icon: <MapPin size={12} />, label: t('settings.about.sponsor.search') },
{ icon: <Search size={12} />, label: t('settings.about.sponsor.address') },
{ icon: <Route size={12} />, label: t('settings.about.sponsor.routing') },
];
return (
<div
className="relative overflow-hidden rounded-[18px] border border-[color:color-mix(in_srgb,var(--df)_28%,var(--border-primary))] bg-surface-card shadow-sm"
style={{ '--df': DATAFOREST } as CSSProperties}
>
{/* The glow and the faint grid: a server room seen from far away, in the sponsor's green. */}
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 bg-[radial-gradient(70%_120%_at_0%_0%,color-mix(in_srgb,var(--df)_16%,transparent)_0%,transparent_60%),radial-gradient(50%_90%_at_100%_100%,color-mix(in_srgb,var(--df)_10%,transparent)_0%,transparent_70%)]"
/>
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 opacity-[0.35] [background-image:radial-gradient(color-mix(in_srgb,var(--df)_35%,transparent)_1px,transparent_1px)] [background-size:16px_16px] [mask-image:linear-gradient(90deg,transparent_0%,#000_55%,#000_100%)]"
/>
<div className="relative flex flex-col gap-5 p-5 md:flex-row md:items-center">
{/* The sponsor's own logo, one for each theme, served from TREK itself. */}
<a
href={DATAFOREST_HREF}
target="_blank"
rel="noopener noreferrer"
aria-label={DATAFOREST_NAME}
className="flex h-[76px] w-full flex-none items-center justify-center rounded-[16px] bg-[color-mix(in_srgb,var(--df)_7%,var(--bg-card))] px-5 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--df)_26%,transparent)] transition-shadow duration-200 hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--df)_55%,transparent)] md:w-[220px]"
>
<img src="/brands/dataforest-cloud.svg" alt="" className="h-7 w-auto dark:hidden" />
<img src="/brands/dataforest-cloud-dark.svg" alt="" className="hidden h-7 w-auto dark:block" />
</a>
<div className="min-w-0 flex-1">
<div className="font-bold uppercase tracking-[.12em] text-[color:var(--df)]" style={fs(10.5)}>
{t('settings.about.sponsor.eyebrow')}
</div>
<div className="mt-1 font-semibold text-content" style={fs(16, 'subtitle')}>
{withDataforestLink(t('settings.about.sponsor.title'))}
</div>
<p className="m-0 mt-1 leading-relaxed text-content-secondary" style={fs(12.5, 'body')}>
{withDataforestLink(t('settings.about.sponsor.body'))}
</p>
<div className="mt-3 flex flex-wrap gap-2">
{services.map((s) => (
<span
key={s.label}
className="inline-flex items-center gap-1.5 rounded-full border border-edge bg-surface-secondary px-2.5 py-1 font-medium text-content-secondary"
style={fs(11.5)}
>
<span className="text-[color:var(--df)]">{s.icon}</span>
{s.label}
</span>
))}
</div>
</div>
<a
href={DATAFOREST_HREF}
target="_blank"
rel="noopener noreferrer"
className="group inline-flex flex-none items-center gap-2 self-start rounded-full bg-[color:var(--df)] px-4 py-2.5 font-semibold text-[#04150e] no-underline shadow-[0_8px_20px_-10px_var(--df)] transition-[filter,transform] duration-200 hover:-translate-y-px hover:brightness-105 md:self-center" // theme-lint-disable: ink on the sponsor's green
style={fs(13, 'body')}
>
{t('settings.about.sponsor.cta')}
<ArrowUpRight
size={15}
className="transition-transform duration-200 group-hover:-translate-y-px group-hover:translate-x-px"
/>
</a>
</div>
</div>
);
}
export default function AboutTab({ appVersion }: Props): React.ReactElement {
const { t } = useTranslation();
const managed = useAuthStore((s) => s.managed);
@@ -124,11 +259,11 @@ export default function AboutTab({ appVersion }: Props): React.ReactElement {
<LinkTile
href="https://discord.gg/NhZBDSd4qW"
color={BRAND.discord}
icon={(
icon={
<svg width="19" height="19" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d={DISCORD_PATH} />
</svg>
)}
}
title="Discord"
hint="Join the community"
/>
@@ -156,6 +291,10 @@ export default function AboutTab({ appVersion }: Props): React.ReactElement {
</div>
)}
{/* TREK's own servers, and who sponsors them. It asks nothing of the reader, so
a hosted instance shows it too. */}
<DataforestBanner />
{/* What replaces the grids above. AGPL §13 asks for the source to be
offered prominently to whoever uses the software over a network, and a
customer of a hosted instance is exactly that reader. The support and
@@ -1,9 +1,9 @@
// FE-RN-001 to FE-RN-016
import { describe, it, expect, vi } from 'vitest'
import { render, screen } from '../../../tests/helpers/render'
import userEvent from '@testing-library/user-event'
import { ReleaseNoticeModal } from './ReleaseNoticeModal'
import type { SystemNoticeDTO } from '../../store/systemNoticeStore'
// FE-RN-001 to FE-RN-020
import userEvent from '@testing-library/user-event';
import { describe, expect, it, vi } from 'vitest';
import { render, screen } from '../../../tests/helpers/render';
import type { SystemNoticeDTO } from '../../store/systemNoticeStore';
import { ReleaseNoticeModal } from './ReleaseNoticeModal';
/** A notice shaped like the release-notes registry entry, with the pieces a test needs to vary. */
function releaseNotice(overrides: Partial<SystemNoticeDTO> = {}): SystemNoticeDTO {
@@ -42,182 +42,239 @@ function releaseNotice(overrides: Partial<SystemNoticeDTO> = {}): SystemNoticeDT
supportTextKey: 'rel.support',
},
...overrides,
} as SystemNoticeDTO
} as SystemNoticeDTO;
}
function renderModal(notice = releaseNotice(), handlers: Partial<{
onDismiss: () => void; onCTA: () => void; onSecondaryCTA: () => void
}> = {}) {
const onDismiss = handlers.onDismiss ?? vi.fn()
const onCTA = handlers.onCTA ?? vi.fn()
const onSecondaryCTA = handlers.onSecondaryCTA ?? vi.fn()
function renderModal(
notice = releaseNotice(),
handlers: Partial<{
onDismiss: () => void;
onCTA: () => void;
onSecondaryCTA: () => void;
}> = {}
) {
const onDismiss = handlers.onDismiss ?? vi.fn();
const onCTA = handlers.onCTA ?? vi.fn();
const onSecondaryCTA = handlers.onSecondaryCTA ?? vi.fn();
const view = render(
<ReleaseNoticeModal
notice={notice}
visible
onDismiss={onDismiss}
onCTA={onCTA}
onSecondaryCTA={onSecondaryCTA}
/>
)
return { ...view, onDismiss, onCTA, onSecondaryCTA }
<ReleaseNoticeModal notice={notice} visible onDismiss={onDismiss} onCTA={onCTA} onSecondaryCTA={onSecondaryCTA} />
);
return { ...view, onDismiss, onCTA, onSecondaryCTA };
}
describe('ReleaseNoticeModal', () => {
it('FE-RN-001: renders nothing for a notice without a release block', () => {
const { container } = renderModal(releaseNotice({ release: undefined }))
expect(container.querySelector('.rn-overlay')).toBeNull()
})
const { container } = renderModal(releaseNotice({ release: undefined }));
expect(container.querySelector('.rn-overlay')).toBeNull();
});
it('FE-RN-002: shows the version as a plain figure, not a translation key', () => {
renderModal()
expect(screen.getByText('4.3.0')).toBeInTheDocument()
})
renderModal();
expect(screen.getByText('4.3.0')).toBeInTheDocument();
});
it('FE-RN-003: renders one card per feature, each with its drawing', () => {
renderModal()
expect(screen.getByText('rel.f1.title')).toBeInTheDocument()
expect(document.querySelectorAll('.rn-feature')).toHaveLength(3)
expect(document.querySelector('.rn-vis-tours')).not.toBeNull()
expect(document.querySelector('.rn-vis-studio')).not.toBeNull()
expect(document.querySelector('.rn-vis-assist')).not.toBeNull()
})
renderModal();
expect(screen.getByText('rel.f1.title')).toBeInTheDocument();
expect(document.querySelectorAll('.rn-feature')).toHaveLength(3);
expect(document.querySelector('.rn-vis-tours')).not.toBeNull();
expect(document.querySelector('.rn-vis-studio')).not.toBeNull();
expect(document.querySelector('.rn-vis-assist')).not.toBeNull();
});
it('FE-RN-004: splits the note body on the blank line into separate paragraphs', () => {
const n = releaseNotice()
const n = releaseNotice();
// The translation stub echoes the key, so drive the split through a real value.
n.release!.note.bodyKey = 'first paragraph\n\nsecond paragraph'
renderModal(n)
expect(screen.getByText('first paragraph')).toBeInTheDocument()
expect(screen.getByText('second paragraph')).toBeInTheDocument()
})
n.release!.note.bodyKey = 'first paragraph\n\nsecond paragraph';
renderModal(n);
expect(screen.getByText('first paragraph')).toBeInTheDocument();
expect(screen.getByText('second paragraph')).toBeInTheDocument();
});
it('FE-RN-005: omits the foot when the release has neither a footnote nor notes', () => {
renderModal()
expect(document.querySelector('.rn-release-foot')).toBeNull()
})
renderModal();
expect(document.querySelector('.rn-release-foot')).toBeNull();
});
it('FE-RN-006: shows the footnote and the notes link when both are present', () => {
const n = releaseNotice()
n.release!.footnoteKey = 'rel.footnote'
n.release!.notes = { labelKey: 'rel.notes', href: 'https://example.test/notes' }
renderModal(n)
expect(screen.getByText('rel.footnote')).toBeInTheDocument()
const link = screen.getByRole('link', { name: /rel\.notes/ })
expect(link).toHaveAttribute('href', 'https://example.test/notes')
expect(link).toHaveAttribute('target', '_blank')
expect(link).toHaveAttribute('rel', 'noopener noreferrer')
})
const n = releaseNotice();
n.release!.footnoteKey = 'rel.footnote';
n.release!.notes = { labelKey: 'rel.notes', href: 'https://example.test/notes' };
renderModal(n);
expect(screen.getByText('rel.footnote')).toBeInTheDocument();
const link = screen.getByRole('link', { name: /rel\.notes/ });
expect(link).toHaveAttribute('href', 'https://example.test/notes');
expect(link).toHaveAttribute('target', '_blank');
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
});
it('FE-RN-007: dismisses from the close button and from the backdrop', async () => {
const user = userEvent.setup()
const onDismiss = vi.fn()
renderModal(releaseNotice(), { onDismiss })
const user = userEvent.setup();
const onDismiss = vi.fn();
renderModal(releaseNotice(), { onDismiss });
await user.click(screen.getByRole('button', { name: 'Close' }))
expect(onDismiss).toHaveBeenCalledTimes(1)
await user.click(screen.getByRole('button', { name: 'Close' }));
expect(onDismiss).toHaveBeenCalledTimes(1);
await user.click(document.querySelector('.rn-overlay')!)
expect(onDismiss).toHaveBeenCalledTimes(2)
})
await user.click(document.querySelector('.rn-overlay')!);
expect(onDismiss).toHaveBeenCalledTimes(2);
});
it('FE-RN-008: a click inside the panel does not dismiss', async () => {
const user = userEvent.setup()
const onDismiss = vi.fn()
renderModal(releaseNotice(), { onDismiss })
await user.click(screen.getByText('rel.note.title'))
expect(onDismiss).not.toHaveBeenCalled()
})
const user = userEvent.setup();
const onDismiss = vi.fn();
renderModal(releaseNotice(), { onDismiss });
await user.click(screen.getByText('rel.note.title'));
expect(onDismiss).not.toHaveBeenCalled();
});
it('FE-RN-009: a non-dismissible notice has no close button and an inert backdrop', async () => {
const user = userEvent.setup()
const onDismiss = vi.fn()
renderModal(releaseNotice({ dismissible: false }), { onDismiss })
expect(screen.queryByRole('button', { name: 'Close' })).toBeNull()
await user.click(document.querySelector('.rn-overlay')!)
expect(onDismiss).not.toHaveBeenCalled()
})
const user = userEvent.setup();
const onDismiss = vi.fn();
renderModal(releaseNotice({ dismissible: false }), { onDismiss });
expect(screen.queryByRole('button', { name: 'Close' })).toBeNull();
await user.click(document.querySelector('.rn-overlay')!);
expect(onDismiss).not.toHaveBeenCalled();
});
it('FE-RN-010: wires each support button to its own handler', async () => {
const user = userEvent.setup()
const onCTA = vi.fn()
const onSecondaryCTA = vi.fn()
renderModal(releaseNotice(), { onCTA, onSecondaryCTA })
const user = userEvent.setup();
const onCTA = vi.fn();
const onSecondaryCTA = vi.fn();
renderModal(releaseNotice(), { onCTA, onSecondaryCTA });
await user.click(screen.getByRole('button', { name: /rel\.bmc/ }))
expect(onCTA).toHaveBeenCalledTimes(1)
expect(onSecondaryCTA).not.toHaveBeenCalled()
await user.click(screen.getByRole('button', { name: /rel\.bmc/ }));
expect(onCTA).toHaveBeenCalledTimes(1);
expect(onSecondaryCTA).not.toHaveBeenCalled();
await user.click(screen.getByRole('button', { name: /rel\.kofi/ }))
expect(onSecondaryCTA).toHaveBeenCalledTimes(1)
})
await user.click(screen.getByRole('button', { name: /rel\.kofi/ }));
expect(onSecondaryCTA).toHaveBeenCalledTimes(1);
});
it('FE-RN-011: labels the dialog with the headline and describes it with the intro', () => {
renderModal()
const dialog = screen.getByRole('dialog')
expect(dialog).toHaveAttribute('aria-modal', 'true')
expect(dialog).toHaveAttribute('aria-labelledby', 'notice-title-release-notes')
expect(dialog).toHaveAttribute('aria-describedby', 'notice-body-release-notes')
expect(document.getElementById('notice-title-release-notes')).toHaveTextContent('rel.headline')
expect(document.getElementById('notice-body-release-notes')).toHaveTextContent('rel.intro')
})
renderModal();
const dialog = screen.getByRole('dialog');
expect(dialog).toHaveAttribute('aria-modal', 'true');
expect(dialog).toHaveAttribute('aria-labelledby', 'notice-title-release-notes');
expect(dialog).toHaveAttribute('aria-describedby', 'notice-body-release-notes');
expect(document.getElementById('notice-title-release-notes')).toHaveTextContent('rel.headline');
expect(document.getElementById('notice-body-release-notes')).toHaveTextContent('rel.intro');
});
it('FE-RN-012: sets the promise and the support text with a bold lead', () => {
renderModal()
expect(screen.getByText('rel.promise.lead').tagName).toBe('B')
expect(screen.getByText('rel.support.lead').tagName).toBe('B')
expect(screen.getByText('rel.promise.text')).toBeInTheDocument()
})
renderModal();
expect(screen.getByText('rel.promise.lead').tagName).toBe('B');
expect(screen.getByText('rel.support.lead').tagName).toBe('B');
expect(screen.getByText('rel.promise.text')).toBeInTheDocument();
});
it('FE-RN-013: the features aside is optional', () => {
renderModal()
expect(document.querySelector('.rn-features-aside')).toBeNull()
renderModal();
expect(document.querySelector('.rn-features-aside')).toBeNull();
const n = releaseNotice()
n.release!.featuresAsideKey = 'rel.features.aside'
renderModal(n)
expect(screen.getByText('rel.features.aside')).toBeInTheDocument()
})
const n = releaseNotice();
n.release!.featuresAsideKey = 'rel.features.aside';
renderModal(n);
expect(screen.getByText('rel.features.aside')).toBeInTheDocument();
});
it('FE-RN-014: a card whose drawing this client does not know falls back to its icon', () => {
const n = releaseNotice()
const n = releaseNotice();
n.release!.features = [
{ iconName: 'Route', visual: 'from-a-newer-server', titleKey: 'rel.x.title', bodyKey: 'rel.x.body' },
{ iconName: 'NoSuchIcon', titleKey: 'rel.y.title', bodyKey: 'rel.y.body' },
]
renderModal(n)
expect(document.querySelectorAll('.rn-vis-icon')).toHaveLength(2)
expect(document.querySelectorAll('.rn-vis-icon svg')).toHaveLength(2)
})
];
renderModal(n);
expect(document.querySelectorAll('.rn-vis-icon')).toHaveLength(2);
expect(document.querySelectorAll('.rn-vis-icon svg')).toHaveLength(2);
});
it('FE-RN-015: a wide card spans the row with its drawing beside the text, the others stay upright', () => {
const n = releaseNotice()
const n = releaseNotice();
n.release!.features = [
...n.release!.features,
{ iconName: 'LifeBuoy', visual: 'help', layout: 'wide', titleKey: 'rel.f4.title', bodyKey: 'rel.f4.body' },
]
renderModal(n)
const cards = document.querySelectorAll('.rn-feature')
expect(cards).toHaveLength(4)
expect(cards[3].classList.contains('rn-feature-wide')).toBe(true)
expect([...cards].slice(0, 3).some(c => c.classList.contains('rn-feature-wide'))).toBe(false)
];
renderModal(n);
const cards = document.querySelectorAll('.rn-feature');
expect(cards).toHaveLength(4);
expect(cards[3].classList.contains('rn-feature-wide')).toBe(true);
expect([...cards].slice(0, 3).some((c) => c.classList.contains('rn-feature-wide'))).toBe(false);
// The help drawing: the help button and two rows of greetings, each written twice to loop.
const wide = cards[3]
expect(wide.querySelector('.rn-vis-help-q')).not.toBeNull()
expect(wide.querySelectorAll('.rn-vis-hello-row')).toHaveLength(2)
expect(wide.querySelectorAll('.rn-vis-hello').length % 2).toBe(0)
const wide = cards[3];
expect(wide.querySelector('.rn-vis-help-q')).not.toBeNull();
expect(wide.querySelectorAll('.rn-vis-hello-row')).toHaveLength(2);
expect(wide.querySelectorAll('.rn-vis-hello').length % 2).toBe(0);
// The tours card lists the kinds of tour along its foot.
expect(cards[0].querySelectorAll('.rn-vis-tours-kind')).toHaveLength(5)
})
expect(cards[0].querySelectorAll('.rn-vis-tours-kind')).toHaveLength(5);
});
it('FE-RN-016: the close button belongs to the panel, not the note', () => {
// Below 1080px the panel scrolls and the note is its second screen, so the
// stylesheet sticks the button to the panel's own top edge. That only works
// while it is a child of .rn-panel; put it back in the note and it scrolls a
// whole release half out of reach with every CSS assertion still green.
renderModal(releaseNotice())
const close = screen.getByRole('button', { name: 'Close' })
expect(close.parentElement?.classList.contains('rn-panel')).toBe(true)
expect(close.closest('.rn-note')).toBeNull()
})
})
renderModal(releaseNotice());
const close = screen.getByRole('button', { name: 'Close' });
expect(close.parentElement?.classList.contains('rn-panel')).toBe(true);
expect(close.closest('.rn-note')).toBeNull();
});
it('FE-RN-017: links the sponsor wherever a line names it, and leaves other lines plain', () => {
const n = releaseNotice();
// The translation stub echoes the key, so the lines carry the brand name as their value.
n.release!.introKey = 'Our servers, sponsored by dataforest cloud, and more.';
n.release!.supportTextKey = 'Thanks to dataforest cloud today.';
renderModal(n);
const links = screen.getAllByRole('link', { name: 'dataforest cloud' });
expect(links).toHaveLength(2);
for (const link of links) {
expect(link).toHaveAttribute('href', 'https://cloud.dataforest.net/?mtm_campaign=trek');
expect(link).toHaveAttribute('target', '_blank');
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
}
expect(document.getElementById('notice-body-release-notes')).toHaveTextContent(
'Our servers, sponsored by dataforest cloud, and more.'
);
expect(screen.getByText('rel.promise.text').querySelector('a')).toBeNull();
});
it('FE-RN-018: with a support label the ask is set as a card like the promise', () => {
const n = releaseNotice();
n.release!.supportLabelKey = 'rel.support.label';
renderModal(n);
const card = document.querySelector('.rn-support .rn-support-card');
expect(card).not.toBeNull();
expect(card!.classList.contains('rn-promise')).toBe(true);
expect(card!.querySelector('.rn-promise-label')).toHaveTextContent('rel.support.label');
expect(screen.getByText('rel.support.lead').tagName).toBe('B');
expect(document.querySelector('.rn-support-text')).toBeNull();
});
it('FE-RN-019: without a support label the ask stays a plain line', () => {
renderModal();
expect(document.querySelector('.rn-support-card')).toBeNull();
expect(document.querySelector('.rn-support-text')).toHaveTextContent('rel.support.lead');
});
it('FE-RN-020: draws the search, sharing and routing cards', () => {
const n = releaseNotice();
n.release!.features = [
{ iconName: 'Search', visual: 'search', titleKey: 'rel.s.title', bodyKey: 'rel.s.body' },
{ iconName: 'Share2', visual: 'share', titleKey: 'rel.sh.title', bodyKey: 'rel.sh.body' },
{ iconName: 'Route', visual: 'routing', titleKey: 'rel.r.title', bodyKey: 'rel.r.body' },
];
renderModal(n);
expect(document.querySelectorAll('.rn-vis-icon')).toHaveLength(0);
// The right place on top: the first result is the highlighted one.
const rows = document.querySelectorAll('.rn-vis-search-row');
expect(rows).toHaveLength(3);
expect(rows[0].classList.contains('rn-vis-search-row-top')).toBe(true);
// One place's details going out to three other TREKs.
expect(document.querySelectorAll('.rn-vis-share-field')).toHaveLength(4);
expect(document.querySelectorAll('.rn-vis-share-node')).toHaveLength(3);
// A day's five stops on one drawn route.
expect(document.querySelectorAll('.rn-vis-route-stop')).toHaveLength(5);
expect(document.querySelector('.rn-vis-route-line')).not.toBeNull();
});
});
@@ -1,5 +1,5 @@
import { ArrowRight, Heart, Infinity as InfinityIcon, ShieldCheck, X } from 'lucide-react';
import React from 'react';
import { ArrowRight, Heart, Infinity as InfinityIcon, X } from 'lucide-react';
import { useTranslation } from '../../i18n/TranslationContext.js';
import type { SystemNoticeDTO } from '../../store/systemNoticeStore.js';
import { ReleaseFeatureVisual } from './ReleaseNoticeVisuals.js';
@@ -16,8 +16,18 @@ interface Props {
/** Lucide's coffee cup, drawn here so its three steam strokes can drift up in waves. */
function SteamingCoffee() {
return (
<svg className="rn-coffee" width={18} height={18} viewBox="0 0 24 24" fill="none" stroke="currentColor"
strokeWidth={2.1} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<svg
className="rn-coffee"
width={18}
height={18}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth={2.1}
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<path d="M17 8h1a4 4 0 1 1 0 8h-1" />
<path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z" />
<path className="rn-steam" d="M6 5.5c-1.2-.9 1.2-1.7 0-2.6s1.2-1.7 0-2.6 1.2-1.7 0-2.6" />
@@ -27,9 +37,31 @@ function SteamingCoffee() {
);
}
const SPONSOR = 'dataforest cloud';
const SPONSOR_HREF = 'https://cloud.dataforest.net/?mtm_campaign=trek';
/** The sponsor's name is a brand and reads the same in every language, so wherever a line names it, it links. */
function withSponsorLink(text: string): React.ReactNode {
const parts = text.split(SPONSOR);
if (parts.length === 1) return text;
return parts.flatMap((part, i) =>
i === 0
? [part]
: [
<a key={i} className="rn-sponsor" href={SPONSOR_HREF} target="_blank" rel="noopener noreferrer">
{SPONSOR}
</a>,
part,
]
);
}
/** Splits a translated block into paragraphs the way the notice bodies are written. */
function paragraphs(text: string): string[] {
return text.split('\n\n').map(p => p.trim()).filter(Boolean);
return text
.split('\n\n')
.map((p) => p.trim())
.filter(Boolean);
}
/**
@@ -55,15 +87,15 @@ export function ReleaseNoticeModal({ notice, visible, onDismiss, onCTA, onSecond
className="rn-overlay"
role="presentation"
style={{ opacity: visible ? 1 : 0, transition: 'opacity 260ms ease' }}
onClick={notice.dismissible ? e => { if (e.target === e.currentTarget) onDismiss() } : undefined}
onClick={
notice.dismissible
? (e) => {
if (e.target === e.currentTarget) onDismiss();
}
: undefined
}
>
<div
role="dialog"
aria-modal="true"
aria-labelledby={titleId}
aria-describedby={bodyId}
className="rn-panel"
>
<div role="dialog" aria-modal="true" aria-labelledby={titleId} aria-describedby={bodyId} className="rn-panel">
{/* A child of the panel, not the note: stacked, the panel scrolls and the
note is its second screen, so the button sticks to the panel's edge. */}
{notice.dismissible && (
@@ -86,19 +118,21 @@ export function ReleaseNoticeModal({ notice, visible, onDismiss, onCTA, onSecond
<div className="rn-version">{release.version}</div>
<h2 id={titleId} className="rn-headline">{t(release.headlineKey)}</h2>
<p id={bodyId} className="rn-intro">{t(release.introKey)}</p>
<h2 id={titleId} className="rn-headline">
{t(release.headlineKey)}
</h2>
<p id={bodyId} className="rn-intro">
{withSponsorLink(t(release.introKey))}
</p>
<div className="rn-features-head">
<span className="rn-features-label">{t(release.featuresLabelKey)}</span>
<span className="rn-features-rule" aria-hidden="true" />
{release.featuresAsideKey && (
<span className="rn-features-aside">{t(release.featuresAsideKey)}</span>
)}
{release.featuresAsideKey && <span className="rn-features-aside">{t(release.featuresAsideKey)}</span>}
</div>
<div className="rn-features">
{release.features.map(f => (
{release.features.map((f) => (
<div key={f.titleKey} className={f.layout === 'wide' ? 'rn-feature rn-feature-wide' : 'rn-feature'}>
<div className="rn-feature-shine" aria-hidden="true" />
<div className="rn-feature-visual" aria-hidden="true">
@@ -116,12 +150,7 @@ export function ReleaseNoticeModal({ notice, visible, onDismiss, onCTA, onSecond
<div className="rn-release-foot">
<div className="rn-footnote">{release.footnoteKey ? t(release.footnoteKey) : null}</div>
{release.notes && (
<a
className="rn-notes"
href={release.notes.href}
target="_blank"
rel="noopener noreferrer"
>
<a className="rn-notes" href={release.notes.href} target="_blank" rel="noopener noreferrer">
{t(release.notes.labelKey)}
<span className="rn-notes-arrow">
<ArrowRight size={16} strokeWidth={2.4} aria-hidden="true" />
@@ -139,7 +168,9 @@ export function ReleaseNoticeModal({ notice, visible, onDismiss, onCTA, onSecond
<div className="rn-note-eyebrow">{t(release.note.eyebrowKey)}</div>
<h3 className="rn-note-title">{t(release.note.titleKey)}</h3>
{paragraphs(t(release.note.bodyKey)).map((p, i) => <p key={i}>{p}</p>)}
{paragraphs(t(release.note.bodyKey)).map((p, i) => (
<p key={i}>{p}</p>
))}
<div className="rn-promise">
<div className="rn-promise-label">
@@ -147,23 +178,39 @@ export function ReleaseNoticeModal({ notice, visible, onDismiss, onCTA, onSecond
{t(release.note.promiseLabelKey)}
</div>
<div className="rn-promise-text">
<b>{t(release.note.promiseLeadKey)}</b>{' '}
<span>{t(release.note.promiseTextKey)}</span>
<b>{t(release.note.promiseLeadKey)}</b> <span>{t(release.note.promiseTextKey)}</span>
</div>
</div>
{paragraphs(t(release.note.bodyAfterKey)).map((p, i) => <p key={i}>{p}</p>)}
{paragraphs(t(release.note.bodyAfterKey)).map((p, i) => (
<p key={i}>{p}</p>
))}
<div className="rn-closing">{t(release.note.closingKey)}</div>
</div>
<div className="rn-support">
<div className="rn-support-text">
<b>{t(release.supportLeadKey)}</b> {t(release.supportTextKey)}
</div>
{release.supportLabelKey ? (
// Set like the promise above it, so the ask reads as the same kind of statement.
<div className="rn-promise rn-support-card">
<div className="rn-promise-label">
<ShieldCheck size={14} strokeWidth={2.1} aria-hidden="true" />
{t(release.supportLabelKey)}
</div>
<div className="rn-promise-text">
<b>{withSponsorLink(t(release.supportLeadKey))}</b>{' '}
<span>{withSponsorLink(t(release.supportTextKey))}</span>
</div>
</div>
) : (
<div className="rn-support-text">
<b>{withSponsorLink(t(release.supportLeadKey))}</b> {withSponsorLink(t(release.supportTextKey))}
</div>
)}
<div className="rn-support-buttons">
{notice.cta && (
<button type="button"
<button
type="button"
id={`notice-cta-${notice.id}`}
className="rn-support-btn rn-support-bmc"
onClick={onCTA}
@@ -173,7 +220,8 @@ export function ReleaseNoticeModal({ notice, visible, onDismiss, onCTA, onSecond
</button>
)}
{notice.secondaryCta && (
<button type="button"
<button
type="button"
id={`notice-cta2-${notice.id}`}
className="rn-support-btn rn-support-kofi"
onClick={onSecondaryCTA}
@@ -1,6 +1,25 @@
import React from 'react';
import * as LucideIcons from 'lucide-react';
import { Bike, Check, Footprints, Landmark, Plane, Sailboat, Snowflake, Sparkles, Star, TrendingUp } from 'lucide-react';
import {
Bike,
Check,
Clock,
Coffee,
Footprints,
Globe,
Image as ImageIcon,
Landmark,
MapPin,
Phone,
Plane,
Sailboat,
Search,
Snowflake,
Sparkles,
Star,
TrendingUp,
Zap,
} from 'lucide-react';
import React from 'react';
import './releaseNoticeVisuals.css';
/*
@@ -127,8 +146,35 @@ function AssistantVisual() {
// ── Help on every screen, in 27 languages: hello in each of them, drifting by ──
const HELLO_A = ['Hallo', 'Bonjour', 'Hola', 'Ciao', 'Olá', 'Hej', 'Ahoj', 'Cześć', 'Szia', 'Tere', 'Salam', 'Bon dia', 'Halo'];
const HELLO_B = ['Привіт', 'Привет', 'Γεια σου', 'مرحبا', 'こんにちは', '안녕하세요', '你好', '哈囉', 'สวัสดี', 'Xin chào', 'Merhaba', 'Dobrý deň'];
const HELLO_A = [
'Hallo',
'Bonjour',
'Hola',
'Ciao',
'Olá',
'Hej',
'Ahoj',
'Cześć',
'Szia',
'Tere',
'Salam',
'Bon dia',
'Halo',
];
const HELLO_B = [
'Привіт',
'Привет',
'Γεια σου',
'مرحبا',
'こんにちは',
'안녕하세요',
'你好',
'哈囉',
'สวัสดี',
'Xin chào',
'Merhaba',
'Dobrý deň',
];
function HelloRow({ words, reverse }: { words: string[]; reverse?: boolean }) {
// Written twice, so the row can slide by half its width and start over without a seam.
@@ -156,19 +202,133 @@ function HelpVisual() {
);
}
// ── Place search: a query typed into the search field, the right place on top ──
const RESULTS: Array<{ name: string; Kind: React.ElementType; tone: string }> = [
{ name: 'Kölner Dom', Kind: Landmark, tone: 'sight' },
{ name: 'CGN', Kind: Plane, tone: 'air' },
{ name: 'Café Reichard', Kind: Coffee, tone: 'food' },
];
function SearchVisual() {
return (
<div className="rn-vis rn-vis-search">
<div className="rn-vis-search-field">
<Search size={10} strokeWidth={2.6} />
<span className="rn-vis-search-query">Kölner Dom</span>
<span className="rn-vis-search-caret" />
</div>
<div className="rn-vis-search-list">
{RESULTS.map(({ name, Kind, tone }, i) => (
<div
key={name}
className={i === 0 ? 'rn-vis-search-row rn-vis-search-row-top' : 'rn-vis-search-row'}
style={{ animationDelay: `${1.3 + i * 0.16}s` }}
>
<span className={`rn-vis-search-pin rn-vis-search-pin-${tone}`}>
<Kind size={8} strokeWidth={2.6} />
</span>
<span className="rn-vis-search-name">{name}</span>
</div>
))}
</div>
</div>
);
}
// ── Place details, shared: one place's details travelling out to other TREKs ──
const DETAILS = [Globe, Clock, Phone, ImageIcon];
function ShareVisual() {
return (
<div className="rn-vis rn-vis-share">
<svg className="rn-vis-share-links" viewBox="0 0 200 112" preserveAspectRatio="none" aria-hidden="true">
<path d="M82 56 C 110 56, 120 24, 156 22" />
<path d="M82 56 C 112 56, 126 56, 160 56" />
<path d="M82 56 C 110 56, 120 88, 156 90" />
</svg>
<div className="rn-vis-share-card">
<span className="rn-vis-share-pin">
<MapPin size={11} strokeWidth={2.4} />
</span>
<div className="rn-vis-share-fields">
{DETAILS.map((Detail, i) => (
<span key={i} className="rn-vis-share-field" style={{ animationDelay: `${0.5 + i * 0.18}s` }}>
<Detail size={8} strokeWidth={2.4} />
<i />
</span>
))}
</div>
</div>
{['top', 'mid', 'bottom'].map((at, i) => (
<span
key={at}
className={`rn-vis-share-node rn-vis-share-node-${at}`}
style={{ animationDelay: `${1.5 + i * 0.2}s` }}
>
<img src="/icons/icon-white.svg" alt="" />
</span>
))}
</div>
);
}
// ── Routing: a day's stops joined in one go ──
const DAY_ROUTE = 'M16 92 C 34 78, 42 84, 56 70 S 76 40, 96 48 S 120 78, 138 62 S 160 26, 184 22';
const DAY_STOPS: Array<[number, number]> = [
[16, 92],
[56, 70],
[96, 48],
[138, 62],
[184, 22],
];
function RoutingVisual() {
return (
<div className="rn-vis rn-vis-route">
<svg className="rn-vis-route-map" viewBox="0 0 200 112" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<path
className="rn-vis-route-street"
d="M0 30 L200 44 M0 76 L200 64 M40 0 L64 112 M118 0 L104 112 M168 0 L176 112"
/>
<path className="rn-vis-route-water" d="M0 104 C 50 96, 90 112, 140 102 S 190 98, 200 100 V112 H0 Z" />
<path className="rn-vis-route-line" d={DAY_ROUTE} pathLength={1} />
{DAY_STOPS.map(([cx, cy], i) => (
<circle
key={i}
className="rn-vis-route-stop"
cx={cx}
cy={cy}
r="4.2"
style={{ animationDelay: `${0.3 + i * 0.22}s` }}
/>
))}
</svg>
<span className="rn-vis-route-badge">
<Zap size={9} strokeWidth={2.6} />
20
</span>
</div>
);
}
const VISUALS: Record<string, () => React.ReactElement> = {
tours: ToursVisual,
studio: StudioVisual,
assistant: AssistantVisual,
help: HelpVisual,
search: SearchVisual,
share: ShareVisual,
routing: RoutingVisual,
};
/** The card's picture, or its icon when the release names no drawing this client knows. */
export function ReleaseFeatureVisual({ visual, iconName }: { visual?: string; iconName: string }) {
const Drawing = visual ? VISUALS[visual] : undefined;
if (Drawing) return <Drawing />;
const Icon: React.ElementType =
((LucideIcons as Record<string, unknown>)[iconName] as React.ElementType) ?? Sparkles;
const Icon: React.ElementType = ((LucideIcons as Record<string, unknown>)[iconName] as React.ElementType) ?? Sparkles;
return (
<div className="rn-vis rn-vis-icon">
<Icon size={30} strokeWidth={1.6} aria-hidden="true" />
@@ -258,7 +258,7 @@
/* Keeps the foot clear of the cards when the column has no height to spare. */
margin-bottom: 18px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 14px;
}
@@ -528,6 +528,8 @@
background: var(--bg-hover);
}
.rn-support .rn-support-card { margin-top: 0; }
.rn-support-text {
font-size: 15.5px;
line-height: 1.62;
@@ -555,13 +557,42 @@
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
box-shadow: 0 2px 6px oklch(0 0 0 / 0.1);
cursor: pointer;
border: 0;
transition: filter 0.15s ease;
/* Glass like the promise card, tinted with each platform's colour (set below). */
position: relative;
isolation: isolate;
overflow: hidden;
background: linear-gradient(160deg,
color-mix(in oklch, var(--rn-btn) 96%, white) 0%,
color-mix(in oklch, var(--rn-btn) 82%, transparent) 100%);
border: 1px solid color-mix(in oklch, var(--rn-btn) 70%, white);
backdrop-filter: blur(16px) saturate(1.3);
-webkit-backdrop-filter: blur(16px) saturate(1.3);
box-shadow:
inset 0 1px 0 oklch(1 0 0 / 0.45),
0 12px 26px -14px color-mix(in oklch, var(--rn-btn) 80%, black);
transition: filter 0.15s ease, transform 0.15s ease;
}
.rn-support-btn:hover { filter: brightness(0.96); }
/* The light along the top edge and the sheen in the corner, as on the promise card. */
.rn-support-btn::before {
content: '';
position: absolute;
top: 0;
inset-inline: 0;
height: 1px;
background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.75), transparent);
}
.rn-support-btn::after {
content: '';
position: absolute;
inset: 0;
z-index: -1;
background: radial-gradient(120% 140% at 0% 0%, oklch(1 0 0 / 0.32) 0%, transparent 55%);
pointer-events: none;
}
.rn-support-btn:hover { filter: brightness(1.04) saturate(1.05); transform: translateY(-1px); }
/* The steam lifts off the cup in turn, and the heart beats. */
.rn-coffee { overflow: visible; }
@@ -593,11 +624,24 @@
[data-reduce-motion='true'] .rn-heart { animation: none; }
/* Brand colours: Buy Me a Coffee and Ko-fi own these. */
.rn-support-bmc { background: #ffdd00; color: #101013; } /* theme-lint-disable */
.rn-support-kofi { background: #ff5e5b; color: #ffffff; } /* theme-lint-disable */
.rn-support-bmc { --rn-btn: #ffdd00; color: #101013; } /* theme-lint-disable */
.rn-support-kofi { --rn-btn: #ff5e5b; color: #ffffff; } /* theme-lint-disable */
/* Narrow viewports: keep the proportions, drop the outer padding. */
@media (max-width: 900px) {
.rn-overlay { padding: 0; }
.rn-panel { border-radius: 0; border: 0; max-height: 100%; }
}
/* The sponsor's name, linked wherever a line names it; it takes the colour of the line it sits in. */
.rn-sponsor {
color: inherit;
font-weight: 600;
text-decoration: underline;
text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
text-underline-offset: 3px;
transition: text-decoration-color 160ms ease;
}
.rn-sponsor:hover {
text-decoration-color: currentColor;
}
@@ -536,6 +536,264 @@
white-space: nowrap;
}
/* Place search: the query typed into the field, the right place on top. */
.rn-vis-search {
display: flex;
flex-direction: column;
gap: 6px;
padding: 10px 11px;
background:
radial-gradient(110% 80% at 100% 0%, oklch(0.62 0.15 200 / 0.32) 0%, transparent 62%),
linear-gradient(165deg, #172025 0%, #11171b 100%);
}
.rn-vis-search-field {
display: flex;
align-items: center;
gap: 5px;
padding: 4px 8px;
border-radius: 99px;
background: #f5f5f7;
color: #101013;
font-size: 9.5px;
font-weight: 600;
box-shadow: 0 4px 12px oklch(0 0 0 / 0.4);
}
.rn-vis-search-query {
display: inline-block;
overflow: hidden;
white-space: nowrap;
max-width: 0;
animation: rn-type 0.9s steps(10, end) 0.3s both;
}
.rn-vis-search-caret {
width: 1.5px;
height: 10px;
background: #0ea5e9;
animation: rn-caret 0.9s step-end infinite;
}
.rn-vis-search-list {
display: flex;
flex-direction: column;
gap: 3px;
}
.rn-vis-search-row {
display: flex;
align-items: center;
gap: 6px;
padding: 3px 7px;
border-radius: 7px;
font-size: 9.5px;
line-height: 1.3;
animation: rn-rise 0.34s ease both;
}
.rn-vis-search-row-top {
background: oklch(1 0 0 / 0.1);
border: 1px solid oklch(1 0 0 / 0.16);
font-weight: 700;
}
.rn-vis-search-pin {
flex: none;
display: grid;
place-items: center;
width: 14px;
height: 14px;
border-radius: 50%;
color: #ffffff;
}
.rn-vis-search-pin-sight {
background: #f59e0b;
}
.rn-vis-search-pin-air {
background: #3b82f6;
}
.rn-vis-search-pin-food {
background: #ef4444;
}
.rn-vis-search-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Place details, shared: one place's card, its details travelling out to other TREKs. */
.rn-vis-share {
background:
radial-gradient(90% 90% at 25% 50%, oklch(0.66 0.16 160 / 0.3) 0%, transparent 65%),
linear-gradient(165deg, #16211c 0%, #101814 100%);
}
.rn-vis-share-links {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.rn-vis-share-links path {
fill: none;
stroke: oklch(0.8 0.14 160 / 0.6);
stroke-width: 1.4;
stroke-dasharray: 3 4;
animation: rn-flow 1.4s linear infinite;
}
.rn-vis-share-card {
position: absolute;
top: 50%;
inset-inline-start: 12px;
display: flex;
gap: 6px;
padding: 6px;
border-radius: 9px;
background: #f5f5f7;
color: #101013;
transform: translateY(-50%);
box-shadow: 0 6px 16px oklch(0 0 0 / 0.45);
}
.rn-vis-share-pin {
display: grid;
place-items: center;
width: 20px;
height: 20px;
border-radius: 6px;
background: #10b981;
color: #ffffff;
}
.rn-vis-share-fields {
display: flex;
flex-direction: column;
gap: 3px;
}
.rn-vis-share-field {
display: flex;
align-items: center;
gap: 4px;
color: #059669;
animation: rn-rise 0.3s ease both;
}
.rn-vis-share-field i {
width: 22px;
height: 3px;
border-radius: 2px;
background: oklch(0.4 0.02 160 / 0.35);
}
.rn-vis-share-node {
position: absolute;
inset-inline-end: 12px;
display: grid;
place-items: center;
width: 22px;
height: 22px;
border-radius: 7px;
background: #101013;
border: 1px solid oklch(1 0 0 / 0.22);
box-shadow: 0 3px 10px oklch(0 0 0 / 0.45);
animation: rn-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rn-vis-share-node img {
width: 12px;
height: 12px;
}
.rn-vis-share-node-top {
top: 10%;
}
.rn-vis-share-node-mid {
top: 50%;
margin-top: -11px;
inset-inline-end: 8px;
}
.rn-vis-share-node-bottom {
bottom: 10%;
}
/* Routing: a day's stops joined in one go. */
.rn-vis-route {
background: linear-gradient(165deg, #1b1d22 0%, #131418 100%);
}
.rn-vis-route-map {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.rn-vis-route-street {
fill: none;
stroke: oklch(1 0 0 / 0.08);
stroke-width: 3;
}
.rn-vis-route-water {
fill: oklch(0.55 0.1 240 / 0.28);
}
.rn-vis-route-line {
fill: none;
stroke: #3b82f6;
stroke-width: 3;
stroke-linecap: round;
stroke-dasharray: 1;
stroke-dashoffset: 1;
filter: drop-shadow(0 0 4px oklch(0.62 0.19 255 / 0.7));
animation: rn-draw 1.3s cubic-bezier(0.6, 0, 0.3, 1) 0.3s forwards;
}
.rn-vis-route-stop {
fill: #f5f5f7;
stroke: #131418;
stroke-width: 2;
transform-box: fill-box;
transform-origin: center;
animation: rn-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rn-vis-route-badge {
position: absolute;
top: 8px;
inset-inline-start: 9px;
display: flex;
align-items: center;
gap: 3px;
padding: 2px 7px;
border-radius: 99px;
background: #facc15;
color: #1a1400;
font-size: 9.5px;
font-weight: 800;
font-variant-numeric: tabular-nums;
animation: rn-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s both;
}
@keyframes rn-type {
to {
max-width: 80px;
}
}
@keyframes rn-caret {
50% {
opacity: 0;
}
}
@keyframes rn-flow {
to {
stroke-dashoffset: -14;
}
}
@media (prefers-reduced-motion: reduce) {
.rn-vis-tours-trail,
.rn-vis-tours-flag,
@@ -544,9 +802,24 @@
.rn-vis-assist-typing i,
.rn-vis-assist-row,
.rn-vis-assist-apply,
.rn-vis-hello-row {
.rn-vis-hello-row,
.rn-vis-search-query,
.rn-vis-search-caret,
.rn-vis-search-row,
.rn-vis-share-links path,
.rn-vis-share-field,
.rn-vis-share-node,
.rn-vis-route-line,
.rn-vis-route-stop,
.rn-vis-route-badge {
animation: none;
}
.rn-vis-search-query {
max-width: 80px;
}
.rn-vis-route-line {
stroke-dashoffset: 0;
}
.rn-vis-tours-trail {
stroke-dashoffset: 0;
}
@@ -565,10 +838,27 @@
[data-reduce-motion='true'] .rn-vis-assist-typing i,
[data-reduce-motion='true'] .rn-vis-assist-row,
[data-reduce-motion='true'] .rn-vis-assist-apply,
[data-reduce-motion='true'] .rn-vis-hello-row {
[data-reduce-motion='true'] .rn-vis-hello-row,
[data-reduce-motion='true'] .rn-vis-search-query,
[data-reduce-motion='true'] .rn-vis-search-caret,
[data-reduce-motion='true'] .rn-vis-search-row,
[data-reduce-motion='true'] .rn-vis-share-links path,
[data-reduce-motion='true'] .rn-vis-share-field,
[data-reduce-motion='true'] .rn-vis-share-node,
[data-reduce-motion='true'] .rn-vis-route-line,
[data-reduce-motion='true'] .rn-vis-route-stop,
[data-reduce-motion='true'] .rn-vis-route-badge {
animation: none;
}
[data-reduce-motion='true'] .rn-vis-search-query {
max-width: 80px;
}
[data-reduce-motion='true'] .rn-vis-route-line {
stroke-dashoffset: 0;
}
[data-reduce-motion='true'] .rn-vis-tours-trail {
stroke-dashoffset: 0;
}