about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/media_gallery.js
AgeCommit message (Collapse)Author
2023-02-20Rename JSX files with proper `.jsx` extension (#23733)Renaud Chaput
2023-01-30Upgrade ESlint to v8 (#23305)Nick Schonning
2023-01-05Add aria-hidden to 'Hide image' button in MediaGallery since the button is ↵Holden Foreman
useless to screen reader users (#22513)
2022-11-27fix gif autoplay on iOS (#21422)James Adney
2021-05-08Make media_gallery.toggle_visible less confusing to translate (#15993)Mélanie Chauvel
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2020-07-09Replace repetitive blurhash code with component (#14267)Sasha Sorokin
This commit replaces all unnecessarily repeated code for decoding and embedding blurhash canvases with separate component - <Blurhash>. Under the hood Blurhash component will use effect dependent on its props. This gives a few benefits: it will only be re-rendered whenever the hash or width/height/dummy props update, and will not render if canvas won't get to the final DOM, because then effect won't fire, which prevents weird bugs like #14257.
2020-06-24Fix audio/video/images/cards not reacting to window resizes in web UI (#14130)Eugen Rochko
* Fix audio/video/images/cards not reacting to window resizes in web UI * Update app/javascript/mastodon/features/audio/index.js Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-05-25Change wording from “Hide media” to “Hide image/images” in Web UI ↵Mélanie Chauvel
(#13834)
2020-03-08Change the tooltip "Toggle visibility" to "Hide media" in web UI (#13199)Mélanie Chauvel (ariasuni)
2020-01-18Change reported media attachments to always be hidden in admin UI (#12879)Eugen Rochko
Also: - Fix Mastodon logo not showing up in status embeds - Fix blurhash not being used in status embeds - Fix blurhash not being used in admin UI - Fix autoplay param not working correctly on status embeds
2019-10-24Add setting for whether to crop images in unexpanded toots (#12126)Faye Duxovni
2019-10-24Add noopener and/or noreferrer (#12202)BSKY
2019-09-03Fix uncached media in web UI not being clickable (#11745)Eugen Rochko
2019-09-01Add "not available" label on unknown media attachments (#11715)Eugen Rochko
2019-06-26Add option to disable blurhash previews (#11188)ThibG
* Add option to disable blurhash previews * Update option text * Change options order
2019-06-21Change audio format from ogg to mp3 for wider compatibility (#11141)Eugen Rochko
* Change audio format from ogg to mp3 for wider compatibility * Add media description as title to links of unknown media attachments
2019-05-25Add a keyboard shortcut to hide/show media (#10647)ThibG
* Move control of media visibility to parent component * Add keyboard shortcut to toggle media visibility
2019-05-03Make the "mark media as sensitive" button more obvious in web UI (#10673)Eugen Rochko
* Make the "mark media as sensitive" button more obvious in web UI * Use eye-slash icon instead of eye icon to mean "hide"
2019-05-02Change account gallery in web UI (#10667)Eugen Rochko
- 3 items per row instead of 2 - Use blurhash for previews - Animate/hover-to-play GIFs and videos - Open media modal instead of opening status - Allow opening status instead with ctrl+click and open in new tab
2019-04-27Add blurhash (#10630)Eugen Rochko
* Add blurhash * Use fallback color for spoiler when blurhash missing * Federate the blurhash and accept it as long as it's at most 5x5 * Display unknown media attachments as blurhash placeholders * Improve style of embed actions and spoiler button * Change blurhash resolution from 3x3 to 4x4 * Improve dependency definitions * Fix code style issues
2019-02-11Fix timeline jumps (#10001)ThibG
* Avoid two-step rendering of statuses as much as possible Cache width shared by Video player, MediaGallery and Cards at the ScrollableList level, pass it down through StatusList and Notifications. * Adjust scroll when new preview cards appear * Adjust scroll when statuses above the current scroll position are deleted
2019-01-07Stop gifv timeline preview explicitly when open the media gallery. (#9749)kedama
2018-09-25Add a new preference to always hide all media (#8569)ふぁぼ原
2018-09-14Upgrade Babel to version 7.0.0 (#5925)Yamagishi Kazutoshi
2018-08-24Add missing video descriptions (#8416)M Somerville
* Pass through video description as necessary. * Add title to video, matching aria-label.
2018-08-18Fix #8264 - Do not override ctrl/cmd+click. (#8265)M Somerville
This includes clicks on hashtags, mentions, display names and media in the timeline; and usernames in reply-indicator, detailed status, and the boost modal.
2018-06-25Fix Chrome issue with sizes="0px" (#7886)Eugen Rochko
"Do not dumb here. Not dumb area here."
2018-05-21Use real container width in MediaGallery srcSet (#7571)Eugen Rochko
Fix #7568
2018-03-24Show media modal on public pages (#6801)Akihiko Odaki
2018-03-11Fix focal point cropping in MediaGallery, fix focal point modal (#6740)Eugen Rochko
* Use object-position with object-fit instead of JS top/left * Fix focal point modal
2018-03-09Fix thumbnail not filling entire space sometimes (#6709)Eugen Rochko
2018-03-07Fix cover behaviour of thumbnails that are wider than taller (#6678)Eugen Rochko
2018-03-02Responsively enforce 16:9 ratio on all media thumbnails in web UI (#6590)Eugen Rochko
* Responsively enforce 16:9 ratio on all media thumbnails in web UI Also change video player behaviour to "contain" rather than "cover" videos that don't fit the ratio, unlike images and GIFs, it's expected that a video is shown fully. * Fix spacing issues and remove floor * Remove floor
2018-02-22Focal points (#6520)Eugen Rochko
* Add focus param to media API, center thumbnails on focus point * Add UI for setting a focal point * Improve focal point icon on upload item * Use focal point in upload preview * Add focalPoint property to ActivityPub * Don't show focal point button for non-image attachments
2018-02-19Fix media spoiler design (#6507)Eugen Rochko
- 4px rounded corners on media attachments - Better colors/contrast for CW/media spoiler on public pages - Fix vertical alignment of "Show more" button - Fix layout jump when unhiding standalone media
2018-02-15Fix media button type (#6478)abcang
2018-02-09Add preference to always display sensitive media (#6448)Eugen Rochko
2017-10-28Refactor initial state: reduce_motion and auto_play_gif (#5501)Nolan Lawson
2017-10-01Add image descriptions to title attribute to view on mouse hover/long-press. ↵Daggertooth
(#5137) * Add image descriptions to `title` attribute to view on mouse hover/long-press. * Too many title properties may spoil the broth.
2017-09-29Remove react-sizeme (#5143)Nolan Lawson
* Remove react-sizeme * Fix aspect ratio in "sensitive" mode
2017-09-28Add ability to specify alternative text for media attachments (#5123)Eugen Rochko
* Fix #117 - Add ability to specify alternative text for media attachments - POST /api/v1/media accepts `description` straight away - PUT /api/v1/media/:id to update `description` (only for unattached ones) - Serialized as `name` of Document object in ActivityPub - Uploads form adjusted for better performance and description input * Add tests * Change undo button blend mode to difference
2017-09-25Fix size of single media in media-gallery (#5098)Lynx Kotoura
2017-09-24Fix media spoiler of DetailedStatus (#5071)abcang
2017-09-24In detail status view, display attachment uncropped if there's only one (#5054)Eugen Rochko
* In detail status view, display attachment uncropped if there's only one * Make media spoiler the size of the media it hides, enable on static
2017-09-16Fix hasSize condition in secSet and sizes. (#4969)Naoki Kosaka
2017-07-31Improve accessibility (part 7) (#4457)Sorin Davidoi
* fix(media_modal): Keyboard navigation * fix(column_back_button): Use native button * fix(media_gallery): Keyboard navigation * fix(status_content): Make CW content focusable
2017-07-18Fixed issue that the NSFW image is not hidden on detail page (#4244)abcang
2017-07-11Redesign the landing page, mount public timeline on it (#4122)Eugen Rochko
* Redesign the landing page, mount public timeline on it * Adjust the standalone mounted component to the lacking of router * Adjust auth layout pages to new design * Fix tests * Standalone public timeline polling every 5 seconds * Remove now obsolete translations * Add responsive design for new landing page * Address reviews * Add floating clouds behind frontpage form * Use access token from public page when available * Fix mentions and hashtags links, cursor on status content in standalone mode * Add footer link to source code * Fix errors on pages that don't embed the component, use classnames * Fix tests * Change anonymous autoPlayGif default to false * When gif autoplay is disabled, hover to play * Add option to hide the timeline preview * Slightly improve alt layout * Add elephant friend to new frontpage * Display "back to mastodon" in place of "login" when logged in on frontpage * Change polling time to 3s
2017-07-08Use srcSet only when know width (#4112)Yamagishi Kazutoshi
2017-06-27Responsive images in media gallery (#3963)Sorin Davidoi
* feat(components/media_gallery): Responsive images * fix(components/media_gallery): Link to image URL