shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

Hide print cal #759

Open ionous opened 5 months ago

ionous commented 5 months ago

in the same spirit as https://github.com/shift-org/shift-docs/pull/753, simplify the edit form by hiding the print calendar ( based on site configuration. )

carrythebanner commented 4 months ago

One wrinkle is that we currently use the tinytitle value in the grid view:

https://github.com/shift-org/shift-docs/blob/128f0b4b9238a16ef4afe76472ff88e36a7c2326/site/themes/s2b_hugo_theme/layouts/partials/cal/events.html#L68 https://github.com/shift-org/shift-docs/blob/128f0b4b9238a16ef4afe76472ff88e36a7c2326/site/themes/s2b_hugo_theme/layouts/partials/cal/fullcal.html#L57

If tinytitle isn't set we just show as much of the regular title as we can. A lot of people don't actually customize the tiny title anyway, but for the folks who do it can help to make it more readable in the grid. If we don't show the print fields, all rides will just get the truncated title. Not the worst, but a good tinytitle can make it a lot more readable.

Examples:

https://www.shift2bikes.org/calendar/event-19034

https://www.shift2bikes.org/calendar/event-19302

(For the 2nd one, that there are 4 similar rides, 1 from each district. With the auto-truncated title, they all have the same short title.)

ionous commented 4 months ago

that's a good catch. i can look at tweaking the pr to handle that.

a couple related thoughts:

carrythebanner commented 4 months ago

Yeah, agreed that we've sort of muddied up the meaning of both "print" fields. We also use printdescr (when populated) for social media rich previews:

https://github.com/shift-org/shift-docs/blob/main/site/themes/s2b_hugo_theme/static/js/cal/main.js#L68

(See also #576)