Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes up to 9d664f87a04b6a5157ddbe60ee33b5b7a960198e #2860

Merged
merged 32 commits into from
Sep 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
28c4eca
Change responsive break points on navigation panel in web UI (#32034)
Gargron Sep 25, 2024
3426ea2
Add preview of followers removed in domain block modal in web UI (#32…
Gargron Sep 25, 2024
db33255
Rename "Data export" menu item (#32099)
c960657 Sep 25, 2024
886baa5
Fix typo causing incorrect error being raised in blurhash processing …
ClearlyClaire Sep 26, 2024
278a075
New Crowdin Translations (automated) (#32103)
github-actions[bot] Sep 26, 2024
db57fe8
Remove `page_json` var from ap/replies spec (#32000)
mjankowski Sep 26, 2024
00aaf77
Use same styling for statuses in email as on web (#32073)
c960657 Sep 26, 2024
89df27a
Change design of media tab on profiles in web UI (#31967)
Gargron Sep 26, 2024
7a62d57
Add fallback to domain block confirmation modal (#32105)
ClearlyClaire Sep 26, 2024
a04433f
Add ability to view alt text by clicking the ALT badge in web UI (#32…
Gargron Sep 26, 2024
89c39e7
Fix scrollbar width (#32091)
ClearlyClaire Sep 26, 2024
106b22b
Use 1 column layout for form `ul` on narrow widths (#32112)
mjankowski Sep 26, 2024
ee2d966
Update dependency blurhash to v0.1.8 (#32114)
renovate[bot] Sep 26, 2024
513f187
Add “A Mastodon update is available.” message on admin dashboard for …
ClearlyClaire Sep 26, 2024
c9b0699
New Crowdin Translations (automated) (#32121)
github-actions[bot] Sep 27, 2024
675ec1a
Only show recently used tags hint when they are present (#32120)
mjankowski Sep 27, 2024
04dd3a9
Wrap webhook event label with `samp` tag (#32115)
mjankowski Sep 27, 2024
e02e88b
Use previously extracted model constants in form `maxlength` attribut…
mjankowski Sep 27, 2024
cdd7526
Remove completed TODO note in tags request spec (#32108)
mjankowski Sep 27, 2024
11a12e5
Change media reordering design in the compose form in web UI (#32093)
Gargron Sep 27, 2024
24d3ce7
Add `no-toolbar` state for "nothing here" batch table views (#32128)
mjankowski Sep 27, 2024
9d664f8
Mailer layout fixes (#32132)
c960657 Sep 27, 2024
7ef25ae
Merge commit '9d664f87a04b6a5157ddbe60ee33b5b7a960198e' into glitch-s…
ClearlyClaire Sep 29, 2024
7b290ce
[Glitch] Add preview of followers removed in domain block modal in we…
Gargron Sep 25, 2024
8439084
[Glitch] Add fallback to domain block confirmation modal
ClearlyClaire Sep 26, 2024
77d2f7e
[Glitch] Fix scrollbar width
ClearlyClaire Sep 26, 2024
3fa34bd
[Glitch] Use 1 column layout for form `ul` on narrow widths
mjankowski Sep 26, 2024
b8c23f9
[Glitch] Add `no-toolbar` state for "nothing here" batch table views
mjankowski Sep 27, 2024
157ecf2
[Glitch] Change responsive break points on navigation panel in web UI
Gargron Sep 25, 2024
9b5f073
[Glitch] Change design of media tab on profiles in web UI
Gargron Sep 26, 2024
9e10fd5
[Glitch] Add ability to view alt text by clicking the ALT badge in we…
Gargron Sep 26, 2024
e80971e
[Glitch] Change media reordering design in the compose form in web UI
Gargron Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Glitch] Change design of media tab on profiles in web UI
Port 89df27a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
  • Loading branch information
Gargron authored and ClearlyClaire committed Sep 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9b5f073cb31e4fe45944a5b535304ee7fdf57a13
13 changes: 10 additions & 3 deletions app/javascript/flavours/glitch/components/media_gallery.jsx
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';

import { Blurhash } from 'flavours/glitch/components/blurhash';
import { formatTime } from 'flavours/glitch/features/video';

import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state';

@@ -58,7 +59,7 @@ class Item extends PureComponent {

hoverToPlay () {
const { attachment } = this.props;
return !this.getAutoPlay() && attachment.get('type') === 'gifv';
return !this.getAutoPlay() && ['gifv', 'video'].includes(attachment.get('type'));
}

handleClick = (e) => {
@@ -152,10 +153,15 @@ class Item extends PureComponent {
/>
</a>
);
} else if (attachment.get('type') === 'gifv') {
} else if (['gifv', 'video'].includes(attachment.get('type'))) {
const autoPlay = this.getAutoPlay();
const duration = attachment.getIn(['meta', 'original', 'duration']);

badges.push(<span key='gif' className='media-gallery__gifv__label'>GIF</span>);
if (attachment.get('type') === 'gifv') {
badges.push(<span key='gif' className='media-gallery__gifv__label'>GIF</span>);
} else {
badges.push(<span key='video' className='media-gallery__gifv__label'>{formatTime(Math.floor(duration))}</span>);
}

thumbnail = (
<div className={classNames('media-gallery__gifv', { autoplay: autoPlay })}>
@@ -169,6 +175,7 @@ class Item extends PureComponent {
onClick={this.handleClick}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
onLoadedData={this.handleImageLoad}
autoPlay={autoPlay}
playsInline
loop
42 changes: 21 additions & 21 deletions app/javascript/flavours/glitch/components/status.jsx
Original file line number Diff line number Diff line change
@@ -648,6 +648,27 @@ class Status extends ImmutablePureComponent {
media={status.get('media_attachments')}
/>,
);
} else if (['image', 'gifv'].includes(status.getIn(['media_attachments', 0, 'type'])) || status.get('media_attachments').size > 1) {
media.push(
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery}>
{Component => (
<Component
media={attachments}
lang={language}
sensitive={status.get('sensitive')}
letterbox={settings.getIn(['media', 'letterbox'])}
fullwidth={!rootId && settings.getIn(['media', 'fullwidth'])}
hidden={isCollapsed || !isExpanded}
onOpenMedia={this.handleOpenMedia}
cacheWidth={this.props.cacheMediaWidth}
defaultWidth={this.props.cachedMediaWidth}
visible={this.state.showMedia}
onToggleVisibility={this.handleToggleMediaVisibility}
/>
)}
</Bundle>,
);
mediaIcons.push('picture-o');
} else if (attachments.getIn([0, 'type']) === 'audio') {
const attachment = status.getIn(['media_attachments', 0]);
const description = attachment.getIn(['translation', 'description']) || attachment.get('description');
@@ -703,27 +724,6 @@ class Status extends ImmutablePureComponent {
</Bundle>,
);
mediaIcons.push('video-camera');
} else { // Media type is 'image' or 'gifv'
media.push(
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery}>
{Component => (
<Component
media={attachments}
lang={language}
sensitive={status.get('sensitive')}
letterbox={settings.getIn(['media', 'letterbox'])}
fullwidth={!rootId && settings.getIn(['media', 'fullwidth'])}
hidden={isCollapsed || !isExpanded}
onOpenMedia={this.handleOpenMedia}
cacheWidth={this.props.cacheMediaWidth}
defaultWidth={this.props.cachedMediaWidth}
visible={this.state.showMedia}
onToggleVisibility={this.handleToggleMediaVisibility}
/>
)}
</Bundle>,
);
mediaIcons.push('picture-o');
}

if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) {

This file was deleted.

Loading