Commit Graph

16 Commits

Author SHA1 Message Date
Rosa Gutierrez 527ffc42b9 Use relative URLs where possible across all the app
Skipping API responses, where we need absolute URLs, and those that are
intended for sharing or external use:

- account/join_codes/show.html.erb - Join code URL for sharing
- boards/edit/_publication.html.erb - Publication URL for sharing
- public/* views - Public page URLs and og:url meta tags
- pwa/manifest.json.erb - PWA manifest needs absolute URLs

For this, we had to replace `url_for` used with Active Storage variants
and previews with the specific path helper (for Active Storage
representations).
2026-01-14 11:01:42 +01:00
Mike Dalessio e9cb2956ee Lightbox uses Stimulus target callbacks instead of data-action
Remove data-action from the sanitizer allowlist to disallow injection
of potentially malicious Stimulus actions in user-provided
content. The lightbox controller now uses imageTarget callbacks to
handle clicks on image links.

Also add the file name as a caption in the light box, and fix the
caption color for dark mode visibility.
2025-12-13 17:06:03 -05:00
Jason Zimdars 094c2c056b Don't try to wrap with a download link, every file already has one in the caption 2025-10-08 21:54:25 -05:00
Jason Zimdars 2ddd94cec8 Whitespace 2025-08-07 15:19:52 -05:00
Jason Zimdars d4d1134aca Link to lightbox for images in comments and card descriptions 2025-08-07 15:19:27 -05:00
Mike Dalessio 692e563d3f Call blob.preview for previewable attachments
undoing a mistake introduced in ef6198d3
2025-07-19 09:08:59 -04:00
Mike Dalessio ef6198d394 Make sure the image variants we use are preprocessed
to avoid implicitly creating a variant during a GET to a read replica,
which will raise an exception and cause the image to fail to load.

This feels pretty brittle, to be honest, and we'll need to be careful
in the future about creating and using new variants; we will probably
need to backfill the new variant for existing images because we can't
guarantee that they will be created implicitly/lazily if the GET lands
on the replica.

ref: https://fizzy.37signals.com/5986089/collections/7/cards/942
2025-07-18 15:43:31 -04:00
Jorge Manrubia cf5f0a9f3f Set ratio for videos via style
And update lexical to allow style attributes
2025-06-03 11:41:10 +02:00
Andy Smith 34a4ba6c60 Add height/width values for images and videos 2025-06-02 14:36:04 -05:00
Jorge Manrubia fa04016cbe Revert "Revert "Replace House with Lexical"" 2025-05-29 14:25:16 +02:00
Jorge Manrubia 08d8b2e5ff Revert "Replace House with Lexical" 2025-05-29 14:22:27 +02:00
Jason Zimdars fc0d0cd300 Style non-previewable attachment in editor and rendered 2025-05-27 22:21:58 -05:00
Jorge Manrubia 108f711d1f Inline missing helper 2025-05-27 12:55:09 +02:00
Jorge Manrubia 4aa1cef99d Show previeable content in the editor
Embedded PDF previewing isnt' reliable (not working in Safari with active storage). Instead
let's align the editor with Active Storage previews and support pdf previews
2025-05-27 12:30:44 +02:00
Jorge Manrubia 7b6b81444b Minimal styles for non-image attachments 2025-05-23 14:34:16 +02:00
Jorge Manrubia 10b2aad647 Replace House with lexical-powered actiontext 2025-05-23 11:41:08 +02:00