Compare commits

...

4 Commits

Author SHA1 Message Date
Renaud Chaput
8c0ff6498e
Change light mode to apply CSS variables to the body (#30839)
Some checks failed
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
Historical data migration test / pre_job (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Blocked by required conditions
Historical data migration test / test (15-alpine) (push) Blocked by required conditions
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
CSS Linting / lint (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
2024-06-25 21:57:22 +00:00
Eugen Rochko
a40831b363
Fix account search results (#30803) 2024-06-25 20:37:48 +00:00
renovate[bot]
07d222665b
chore(deps): update dependency typescript to v5.5.2 (#30815)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-25 17:25:11 +00:00
Claire
2c7eed1fa1
Fix API requests after #30818 (#30837) 2024-06-25 16:53:03 +00:00
6 changed files with 31 additions and 50 deletions

View File

@ -3,7 +3,5 @@ import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships';
export const apiSubmitAccountNote = (id: string, value: string) =>
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, {
data: {
comment: value,
},
comment: value,
});

View File

@ -3,9 +3,7 @@ import type { Status, StatusVisibility } from 'mastodon/models/status';
export const apiReblog = (statusId: string, visibility: StatusVisibility) =>
apiRequestPost<{ reblog: Status }>(`v1/statuses/${statusId}/reblog`, {
data: {
visibility,
},
visibility,
});
export const apiUnreblog = (statusId: string) =>

View File

@ -6,7 +6,4 @@ export const apiGetNotificationPolicy = () =>
export const apiUpdateNotificationsPolicy = (
policy: Partial<NotificationPolicyJSON>,
) =>
apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', {
data: policy,
});
) => apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', policy);

View File

@ -56,11 +56,11 @@ $account-background-color: $white !default;
$emojis-requiring-inversion: 'chains';
.theme-mastodon-light {
body {
--dropdown-border-color: #d9e1e8;
--dropdown-background-color: #fff;
--background-border-color: #d9e1e8;
--background-color: #fff;
--background-color-tint: rgba(255, 255, 255, 90%);
--background-color-tint: rgba(255, 255, 255, 80%);
--background-filter: blur(10px);
}

View File

@ -28,9 +28,7 @@ class AccountSearchService < BaseService
},
functions: [
reputation_score_function,
followers_score_function,
time_distance_function,
],
},
},
@ -81,36 +79,12 @@ class AccountSearchService < BaseService
}
end
# This function deranks accounts that follow more people than follow them
def reputation_score_function
{
script_score: {
script: {
source: "(Math.max(doc['followers_count'].value, 0) + 0.0) / (Math.max(doc['followers_count'].value, 0) + Math.max(doc['following_count'].value, 0) + 1)",
},
},
}
end
# This function promotes accounts that have more followers
def followers_score_function
{
script_score: {
script: {
source: "(Math.max(doc['followers_count'].value, 0) / (Math.max(doc['followers_count'].value, 0) + 1))",
},
},
}
end
# This function deranks accounts that haven't posted in a long time
def time_distance_function
{
gauss: {
last_status_at: {
scale: '30d',
offset: '30d',
decay: 0.3,
source: "Math.log10((Math.max(doc['followers_count'].value, 0) + 1))",
},
},
}
@ -126,10 +100,24 @@ class AccountSearchService < BaseService
def core_query
{
multi_match: {
query: @query,
type: 'bool_prefix',
fields: %w(username^2 username.*^2 display_name display_name.*),
dis_max: {
queries: [
{
multi_match: {
query: @query,
type: 'most_fields',
fields: %w(username username.*),
},
},
{
multi_match: {
query: @query,
type: 'most_fields',
fields: %w(display_name display_name.*),
},
},
],
},
}
end
@ -142,7 +130,7 @@ class AccountSearchService < BaseService
{
multi_match: {
query: @query,
type: 'most_fields',
type: 'best_fields',
fields: %w(username^2 display_name^2 text text.*),
operator: 'and',
},

View File

@ -17151,22 +17151,22 @@ __metadata:
linkType: hard
"typescript@npm:5, typescript@npm:^5.0.4":
version: 5.4.5
resolution: "typescript@npm:5.4.5"
version: 5.5.2
resolution: "typescript@npm:5.5.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/2954022ada340fd3d6a9e2b8e534f65d57c92d5f3989a263754a78aba549f7e6529acc1921913560a4b816c46dce7df4a4d29f9f11a3dc0d4213bb76d043251e
checksum: 10c0/8ca39b27b5f9bd7f32db795045933ab5247897660627251e8254180b792a395bf061ea7231947d5d7ffa5cb4cc771970fd4ef543275f9b559f08c9325cccfce3
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A5#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin<compat/typescript>":
version: 5.4.5
resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin<compat/typescript>::version=5.4.5&hash=5adc0c"
version: 5.5.2
resolution: "typescript@patch:typescript@npm%3A5.5.2#optional!builtin<compat/typescript>::version=5.5.2&hash=379a07"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/db2ad2a16ca829f50427eeb1da155e7a45e598eec7b086d8b4e8ba44e5a235f758e606d681c66992230d3fc3b8995865e5fd0b22a2c95486d0b3200f83072ec9
checksum: 10c0/a7b7ede75dc7fc32a76d0d0af6b91f5fbd8620890d84c906f663d8783bf3de6d7bd50f0430b8bb55eac88a38934af847ff709e7156e5138b95ae94cbd5f73e5b
languageName: node
linkType: hard