glitch-soc/mastodon

View on GitHub

Showing 4,879 of 4,879 total issues

Identical blocks of code found in 4 locations. Consider refactoring.
Open

if (status.get('in_reply_to_id', null) === null) {
replyIcon = 'reply';
replyIconComponent = ReplyIcon;
replyTitle = intl.formatMessage(messages.reply);
} else {
app/javascript/flavours/glitch/features/picture_in_picture/components/footer.jsx on lines 157..165
app/javascript/mastodon/components/status_action_bar.jsx on lines 345..353
app/javascript/mastodon/features/picture_in_picture/components/footer.jsx on lines 155..163

Similar blocks of code found in 4 locations. Consider refactoring.
Open

const leftNav = media.size > 1 && <button tabIndex={0} className='media-modal__nav media-modal__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><Icon id='chevron-left' icon={ChevronLeftIcon} /></button>;
app/javascript/flavours/glitch/features/ui/components/media_modal.jsx on lines 166..166
app/javascript/mastodon/features/ui/components/media_modal.jsx on lines 165..165
app/javascript/mastodon/features/ui/components/media_modal.jsx on lines 166..166

Similar blocks of code found in 4 locations. Consider refactoring.
Open

const leftNav = media.size > 1 && <button tabIndex={0} className='media-modal__nav media-modal__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><Icon id='chevron-left' icon={ChevronLeftIcon} /></button>;
app/javascript/flavours/glitch/features/ui/components/media_modal.jsx on lines 165..165
app/javascript/flavours/glitch/features/ui/components/media_modal.jsx on lines 166..166
app/javascript/mastodon/features/ui/components/media_modal.jsx on lines 166..166

Identical blocks of code found in 2 locations. Consider refactoring.
Open

RelationshipsSeveranceEvent.propTypes = {
type: PropTypes.oneOf([
'account_suspension',
'domain_block',
'user_domain_block',
app/javascript/flavours/glitch/features/notifications/components/relationships_severance_event.jsx on lines 37..48

Identical blocks of code found in 2 locations. Consider refactoring.
Open

<div className='detailed-status__button'><IconButton className='star-icon' animate active={status.get('favourited')} title={favouriteTitle} icon='star' iconComponent={status.get('favourited') ? StarIcon : StarBorderIcon} onClick={this.handleFavouriteClick} /></div>
app/javascript/mastodon/features/status/components/action_bar.jsx on lines 316..316

Identical blocks of code found in 2 locations. Consider refactoring.
Open

shouldUpdateScroll = (prevRouterProps, { location }) => {
// Do not change scroll when opening a modal
if (location.state?.mastodonModalKey !== prevRouterProps?.location?.state?.mastodonModalKey) {
return false;
}
Severity: Major
Found in app/javascript/flavours/glitch/features/status/index.jsx and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/status/index.jsx on lines 590..603

Similar blocks of code found in 4 locations. Consider refactoring.
Open

const rightNav = media.size > 1 && <button tabIndex={0} className='media-modal__nav media-modal__nav--right' onClick={this.handleNextClick} aria-label={intl.formatMessage(messages.next)}><Icon id='chevron-right' icon={ChevronRightIcon} /></button>;
app/javascript/flavours/glitch/features/ui/components/media_modal.jsx on lines 165..165
app/javascript/flavours/glitch/features/ui/components/media_modal.jsx on lines 166..166
app/javascript/mastodon/features/ui/components/media_modal.jsx on lines 165..165

Identical blocks of code found in 2 locations. Consider refactoring.
Open

shouldUpdateScroll = (prevRouterProps, { location }) => {
// Do not change scroll when opening a modal
if (location.state?.mastodonModalKey !== prevRouterProps?.location?.state?.mastodonModalKey) {
return false;
}
Severity: Major
Found in app/javascript/mastodon/features/status/index.jsx and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/features/status/index.jsx on lines 614..627

Identical blocks of code found in 2 locations. Consider refactoring.
Open

case disconnectTimeline.type:
return state.update(
action.payload.timeline,
initialTimeline,
map => map.set('online', false).update(action.payload.usePendingItems ? 'pendingItems' : 'items', items => items.first() ? items.unshift(TIMELINE_GAP) : items),
Severity: Major
Found in app/javascript/mastodon/reducers/timelines.js and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/reducers/timelines.js on lines 224..229

Identical blocks of code found in 2 locations. Consider refactoring.
Open

RelationshipsSeveranceEvent.propTypes = {
type: PropTypes.oneOf([
'account_suspension',
'domain_block',
'user_domain_block',
app/javascript/mastodon/features/notifications/components/relationships_severance_event.jsx on lines 37..48

Identical blocks of code found in 2 locations. Consider refactoring.
Open

<div className='detailed-status__button'><IconButton className='star-icon' animate active={status.get('favourited')} title={favouriteTitle} icon='star' iconComponent={status.get('favourited') ? StarIcon : StarBorderIcon} onClick={this.handleFavouriteClick} /></div>
app/javascript/flavours/glitch/features/status/components/action_bar.jsx on lines 255..255

Identical blocks of code found in 2 locations. Consider refactoring.
Open

case disconnectTimeline.type:
return state.update(
action.payload.timeline,
initialTimeline,
map => map.set('online', false).update(action.payload.usePendingItems ? 'pendingItems' : 'items', items => items.first() ? items.unshift(TIMELINE_GAP) : items),
Severity: Major
Found in app/javascript/flavours/glitch/reducers/timelines.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/reducers/timelines.js on lines 218..223

Similar blocks of code found in 4 locations. Consider refactoring.
Open

const rightNav = media.size > 1 && <button tabIndex={0} className='media-modal__nav media-modal__nav--right' onClick={this.handleNextClick} aria-label={intl.formatMessage(messages.next)}><Icon id='chevron-right' icon={ChevronRightIcon} /></button>;
app/javascript/flavours/glitch/features/ui/components/media_modal.jsx on lines 165..165
app/javascript/mastodon/features/ui/components/media_modal.jsx on lines 165..165
app/javascript/mastodon/features/ui/components/media_modal.jsx on lines 166..166

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Helmet>
<title>{titleFromStatus(intl, status)}</title>
<meta name='robots' content={(isLocal && isIndexable) ? 'all' : 'noindex'} />
<link rel='canonical' href={status.get('url')} />
</Helmet>
Severity: Major
Found in app/javascript/flavours/glitch/features/status/index.jsx and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/status/index.jsx on lines 719..723

Similar blocks of code found in 2 locations. Consider refactoring.
Open

handleClick = (emoji, event) => {
if (!emoji.native) {
emoji.native = emoji.colons;
}
if (!(event.ctrlKey || event.metaKey)) {
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 232..241

Similar blocks of code found in 2 locations. Consider refactoring.
Open

handleClick = (emoji, event) => {
if (!emoji.native) {
emoji.native = emoji.colons;
}
if (!(event.ctrlKey || event.metaKey)) {
app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.jsx on lines 233..242

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Helmet>
<title>{titleFromStatus(intl, status)}</title>
<meta name='robots' content={(isLocal && isIndexable) ? 'all' : 'noindex'} />
<link rel='canonical' href={status.get('url')} />
</Helmet>
Severity: Major
Found in app/javascript/mastodon/features/status/index.jsx and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/features/status/index.jsx on lines 748..752

Identical blocks of code found in 2 locations. Consider refactoring.
Open

interface SearchOption {
key: string;
label: React.ReactNode;
action: (e: React.MouseEvent | React.KeyboardEvent) => void;
forget?: (e: React.MouseEvent | React.KeyboardEvent) => void;
app/javascript/flavours/glitch/features/compose/components/search.tsx on lines 53..58

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const mountNotifications = createAppAsyncThunk(
'notificationGroups/mount',
(_, { dispatch, getState }) => {
const state = getState();
 
 
Severity: Major
Found in app/javascript/mastodon/actions/notification_groups.ts and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/actions/notification_groups.ts on lines 223..235

Identical blocks of code found in 2 locations. Consider refactoring.
Open

interface SearchOption {
key: string;
label: React.ReactNode;
action: (e: React.MouseEvent | React.KeyboardEvent) => void;
forget?: (e: React.MouseEvent | React.KeyboardEvent) => void;
app/javascript/mastodon/features/compose/components/search.tsx on lines 53..58
Severity
Category
Status
Source
Language