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 #2272

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
180f0e6
Fix inefficient query when requesting a new confirmation email from a…
ClearlyClaire Jul 2, 2023
933ba1a
Add superapp index on `oauth_applications` (#25670)
ClearlyClaire Jul 2, 2023
e6a8faa
Add users index on unconfirmed_email (#25672)
ClearlyClaire Jul 2, 2023
54cb679
Change button colors to increase hover/focus contrast and consistency…
Jul 3, 2023
69e124e
Fix regression of icon button colors in web UI (#25679)
Gargron Jul 3, 2023
383c008
Fix `/api/v2/search` not working with following query param (#25681)
danielmbrasil Jul 3, 2023
54a1052
Change labels of live feeds tabs in web UI (#25683)
Gargron Jul 3, 2023
d9a5c1a
Add at-symbol prepended to mention span title (#25684)
forsamori Jul 3, 2023
6268188
Fix local live feeds does not expand (#25694)
mgmn Jul 3, 2023
12fa24a
Fix forgotten unconfirmed_email migration file (#25702)
ClearlyClaire Jul 4, 2023
182fd93
fix read more button overlapping thread line bug (#25706)
Jul 4, 2023
4658263
Fix re-activated accounts being deleted by AccountDeletionWorker (#25…
ClearlyClaire Jul 4, 2023
eb2417c
Fix OAuth apps page crashing when listing apps with certain admin API…
ClearlyClaire Jul 4, 2023
b7910bc
Add button to see results for polls in web UI (#25726)
Gargron Jul 5, 2023
000b835
Add canonical link tags in web UI (#25715)
Gargron Jul 5, 2023
5de49e7
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Jul 5, 2023
0a52716
[Glitch] Change labels of live feeds tabs in web UI
Gargron Jul 3, 2023
ac74374
[Glitch] Add at-symbol prepended to mention span title
forsamori Jul 3, 2023
c624680
[Glitch] Fix local live feeds does not expand
mgmn Jul 3, 2023
b3f2093
[Glitch] Add canonical link tags in web UI
Gargron Jul 5, 2023
a117c95
[Glitch] Add button to see results for polls in web UI
Gargron Jul 5, 2023
4719d88
[Glitch] Change button colors to increase hover/focus contrast and co…
Jul 3, 2023
c0fa85b
[Glitch] Fix regression of icon button colors in web UI
Gargron Jul 3, 2023
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
4 changes: 2 additions & 2 deletions app/controllers/api/v2/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def search_results
params[:q],
current_account,
limit_param(RESULTS_LIMIT),
search_params.merge(resolve: truthy_param?(:resolve), exclude_unreviewed: truthy_param?(:exclude_unreviewed))
search_params.merge(resolve: truthy_param?(:resolve), exclude_unreviewed: truthy_param?(:exclude_unreviewed), following: truthy_param?(:following))
)
end

def search_params
params.permit(:type, :offset, :min_id, :max_id, :account_id)
params.permit(:type, :offset, :min_id, :max_id, :account_id, :following)
end
end
13 changes: 9 additions & 4 deletions app/javascript/flavours/glitch/components/poll.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ class Poll extends ImmutablePureComponent {
this.props.refresh();
};

handleReveal = () => {
this.setState({ revealed: true });
}

renderOption (option, optionIndex, showResults) {
const { poll, lang, disabled, intl } = this.props;
const pollVotesCount = poll.get('voters_count') || poll.get('votes_count');
Expand Down Expand Up @@ -206,14 +210,14 @@ class Poll extends ImmutablePureComponent {

render () {
const { poll, intl } = this.props;
const { expired } = this.state;
const { revealed, expired } = this.state;

if (!poll) {
return null;
}

const timeRemaining = expired ? intl.formatMessage(messages.closed) : <RelativeTimestamp timestamp={poll.get('expires_at')} futureDate />;
const showResults = poll.get('voted') || expired;
const showResults = poll.get('voted') || revealed || expired;
const disabled = this.props.disabled || Object.entries(this.state.selected).every(item => !item);

let votesCount = null;
Expand All @@ -232,9 +236,10 @@ class Poll extends ImmutablePureComponent {

<div className='poll__footer'>
{!showResults && <button className='button button-secondary' disabled={disabled || !this.context.identity.signedIn} onClick={this.handleVote}><FormattedMessage id='poll.vote' defaultMessage='Vote' /></button>}
{showResults && !this.props.disabled && <span><button className='poll__link' onClick={this.handleRefresh}><FormattedMessage id='poll.refresh' defaultMessage='Refresh' /></button> · </span>}
{!showResults && <><button className='poll__link' onClick={this.handleReveal}><FormattedMessage id='poll.reveal' defaultMessage='See results' /></button> · </>}
{showResults && !this.props.disabled && <><button className='poll__link' onClick={this.handleRefresh}><FormattedMessage id='poll.refresh' defaultMessage='Refresh' /></button> · </>}
{votesCount}
{poll.get('expires_at') && <span> · {timeRemaining}</span>}
{poll.get('expires_at') && <> · {timeRemaining}</>}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class StatusContent extends PureComponent {

if (mention) {
link.addEventListener('click', this.onMentionClick.bind(this, mention), false);
link.setAttribute('title', mention.get('acct'));
link.setAttribute('title', `@${mention.get('acct')}`);
if (rewriteMentions !== 'no') {
while (link.firstChild) link.removeChild(link.firstChild);
link.appendChild(document.createTextNode('@'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ class Header extends ImmutablePureComponent {
<Helmet>
<title>{titleFromAccount(account)}</title>
<meta name='robots' content={(isLocal && isIndexable) ? 'all' : 'noindex'} />
<link rel='canonical' href={account.get('url')} />
</Helmet>
</div>
);
Expand Down
27 changes: 14 additions & 13 deletions app/javascript/flavours/glitch/features/firehose/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Firehose = ({ feedType, multiColumn }) => {
(maxId) => {
switch(feedType) {
case 'community':
dispatch(expandCommunityTimeline({ onlyMedia }));
dispatch(expandCommunityTimeline({ maxId, onlyMedia }));
break;
case 'public':
dispatch(expandPublicTimeline({ maxId, onlyMedia, allowLocalOnly }));
Expand Down Expand Up @@ -154,12 +154,13 @@ const Firehose = ({ feedType, multiColumn }) => {
/>
</DismissableBanner>
) : (
<DismissableBanner id='public_timeline'>
<FormattedMessage
id='dismissable_banner.public_timeline'
defaultMessage='These are the most recent public posts from people on this and other servers of the decentralized network that this server knows about.'
/>
</DismissableBanner>
<DismissableBanner id='public_timeline'>
<FormattedMessage
id='dismissable_banner.public_timeline'
defaultMessage='These are the most recent public posts from people on the social web that people on {domain} follow.'
values={{ domain }}
/>
</DismissableBanner>
);

const emptyMessage = feedType === 'community' ? (
Expand All @@ -168,10 +169,10 @@ const Firehose = ({ feedType, multiColumn }) => {
defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!'
/>
) : (
<FormattedMessage
id='empty_column.public'
defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up'
/>
<FormattedMessage
id='empty_column.public'
defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up'
/>
);

return (
Expand All @@ -190,11 +191,11 @@ const Firehose = ({ feedType, multiColumn }) => {
<div className='scrollable scrollable--flex'>
<div className='account__section-headline'>
<NavLink exact to='/public/local'>
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='Local' />
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
</NavLink>

<NavLink exact to='/public/remote'>
<FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Remote' />
<FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
</NavLink>

<NavLink exact to='/public'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import Column from 'flavours/glitch/components/column';
import ColumnHeader from 'flavours/glitch/components/column_header';
import DismissableBanner from 'flavours/glitch/components/dismissable_banner';
import { domain } from 'flavours/glitch/initial_state';
import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';

Check failure on line 17 in app/javascript/flavours/glitch/features/public_timeline/index.jsx

View workflow job for this annotation

GitHub Actions / lint

`flavours/glitch/features/ui/containers/status_list_container` import should occur before import of `flavours/glitch/initial_state`

import ColumnSettingsContainer from './containers/column_settings_container';

Expand Down Expand Up @@ -147,7 +148,7 @@
</ColumnHeader>

<StatusListContainer
prepend={<DismissableBanner id='public_timeline'><FormattedMessage id='dismissable_banner.public_timeline' defaultMessage='These are the most recent public posts from people on this and other servers of the decentralized network that this server knows about.' /></DismissableBanner>}
prepend={<DismissableBanner id='public_timeline'><FormattedMessage id='dismissable_banner.public_timeline' defaultMessage='These are the most recent public posts from people on the social web that people on {domain} follow.' values={{ domain }} /></DismissableBanner>}
timelineId={`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`}
onLoadMore={this.handleLoadMore}
trackScroll={!pinned}
Expand Down
1 change: 1 addition & 0 deletions app/javascript/flavours/glitch/features/status/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ class Status extends ImmutablePureComponent {
<Helmet>
<title>{titleFromStatus(intl, status)}</title>
<meta name='robots' content={(isLocal && isIndexable) ? 'all' : 'noindex'} />
<link rel='canonical' href={status.get('url')} />
</Helmet>
</Column>
);
Expand Down
13 changes: 1 addition & 12 deletions app/javascript/flavours/glitch/styles/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ $content-width: 840px;
}

&.selected {
background: darken($ui-base-color, 2%);
border-radius: 4px 0 0;
}
}
Expand All @@ -146,13 +145,9 @@ $content-width: 840px;

.simple-navigation-active-leaf a {
color: $primary-text-color;
background-color: darken($ui-highlight-color, 2%);
background-color: $ui-highlight-color;
border-bottom: 0;
border-radius: 0;

&:hover {
background-color: $ui-highlight-color;
}
}
}

Expand Down Expand Up @@ -246,12 +241,6 @@ $content-width: 840px;
font-weight: 700;
color: $primary-text-color;
background: $ui-highlight-color;

&:hover,
&:focus,
&:active {
background: lighten($ui-highlight-color, 4%);
}
}
}
}
Expand Down
47 changes: 13 additions & 34 deletions app/javascript/flavours/glitch/styles/components/misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
}

.button {
background-color: darken($ui-highlight-color, 3%);
background-color: $ui-button-background-color;
border: 10px none;
border-radius: 4px;
box-sizing: border-box;
color: $primary-text-color;
color: $ui-button-color;
cursor: pointer;
display: inline-block;
font-family: inherit;
Expand All @@ -62,14 +62,14 @@
&:active,
&:focus,
&:hover {
background-color: $ui-highlight-color;
background-color: $ui-button-focus-background-color;
}

&--destructive {
&:active,
&:focus,
&:hover {
background-color: $error-red;
background-color: $ui-button-destructive-focus-background-color;
transition: none;
}
}
Expand All @@ -79,43 +79,22 @@
cursor: default;
}

&.button-alternative {
color: $inverted-text-color;
background: $ui-primary-color;

&:active,
&:focus,
&:hover {
background-color: lighten($ui-primary-color, 4%);
}
}

&.button-alternative-2 {
background: $ui-base-lighter-color;

&:active,
&:focus,
&:hover {
background-color: lighten($ui-base-lighter-color, 4%);
}
}

&.button-secondary {
font-size: 16px;
line-height: 36px;
height: auto;
color: $darker-text-color;
color: $ui-button-secondary-color;
text-transform: none;
background: transparent;
padding: 6px 17px;
border: 1px solid lighten($ui-base-color, 12%);
border: 1px solid $ui-button-secondary-border-color;

&:active,
&:focus,
&:hover {
background: lighten($ui-base-color, 4%);
border-color: lighten($ui-base-color, 16%);
color: lighten($darker-text-color, 4%);
border-color: $ui-button-secondary-focus-background-color;
color: $ui-button-secondary-focus-color;
background-color: $ui-button-secondary-focus-background-color;
text-decoration: none;
}

Expand All @@ -127,14 +106,14 @@
&.button-tertiary {
background: transparent;
padding: 6px 17px;
color: $highlight-text-color;
border: 1px solid $highlight-text-color;
color: $ui-button-tertiary-color;
border: 1px solid $ui-button-tertiary-border-color;

&:active,
&:focus,
&:hover {
background: $ui-highlight-color;
color: $primary-text-color;
background-color: $ui-button-tertiary-focus-background-color;
color: $ui-button-tertiary-focus-color;
border: 0;
padding: 7px 18px;
}
Expand Down
8 changes: 4 additions & 4 deletions app/javascript/flavours/glitch/styles/components/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -718,15 +718,15 @@
}

.button.button-secondary {
border-color: $inverted-text-color;
color: $inverted-text-color;
border-color: $ui-button-secondary-border-color;
color: $ui-button-secondary-color;
flex: 0 0 auto;

&:hover,
&:focus,
&:active {
border-color: lighten($inverted-text-color, 15%);
color: lighten($inverted-text-color, 15%);
border-color: $ui-button-secondary-focus-background-color;
color: $ui-button-secondary-focus-color;
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/javascript/flavours/glitch/styles/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
display: flex;
align-items: baseline;
border-radius: 4px;
background: darken($ui-highlight-color, 2%);
background: $ui-button-background-color;
color: $primary-text-color;
transition: all 100ms ease-in;
font-size: 14px;
Expand All @@ -94,7 +94,7 @@
&:active,
&:focus,
&:hover {
background-color: $ui-highlight-color;
background-color: $ui-button-focus-background-color;
transition: all 200ms ease-out;
}

Expand Down
15 changes: 6 additions & 9 deletions app/javascript/flavours/glitch/styles/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ code {
width: 100%;
border: 0;
border-radius: 4px;
background: darken($ui-highlight-color, 2%);
color: $primary-text-color;
background: $ui-button-background-color;
color: $ui-button-color;
font-size: 18px;
line-height: inherit;
height: auto;
Expand All @@ -535,23 +535,20 @@ code {
&:active,
&:focus,
&:hover {
background-color: $ui-highlight-color;
background-color: $ui-button-focus-background-color;
}

&:disabled:hover {
background-color: $ui-primary-color;
}

&.negative {
background: $error-value-color;

&:hover {
background-color: lighten($error-value-color, 5%);
}
background: $ui-button-destructive-background-color;

&:hover,
&:active,
&:focus {
background-color: darken($error-value-color, 5%);
background-color: $ui-button-destructive-focus-background-color;
}
}
}
Expand Down
Loading
Loading