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

feat(frontend): 設定の検索 #15505

Merged
merged 131 commits into from
Mar 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
a37a945
wip
syuilo Feb 16, 2025
534a957
wip
syuilo Feb 16, 2025
83fc29f
wip
syuilo Feb 16, 2025
c88c18f
test
syuilo Feb 16, 2025
5f4cc24
wip rollup pluginでsearchIndexの情報生成
tai-cha Feb 17, 2025
28c6b40
wip
tai-cha Feb 17, 2025
30ff85b
SPDX
tai-cha Feb 17, 2025
9f786b7
wip: markerIdを自動付与
tai-cha Feb 17, 2025
f97f43a
rollupでビルド時・devモード時に毎回uuidを生成するように
tai-cha Feb 17, 2025
3fb6450
開発サーバーでだけ必要な挙動は開発サーバーのみで
tai-cha Feb 17, 2025
98b25dc
条件が逆
tai-cha Feb 17, 2025
392670d
wip: childrenの生成
tai-cha Feb 17, 2025
f45bf08
update comment
tai-cha Feb 17, 2025
798439d
update comment
tai-cha Feb 17, 2025
dc94727
rename auto generated file
tai-cha Feb 17, 2025
1e80ee5
hashをパスと行数から決定
tai-cha Feb 21, 2025
1cab38c
Merge branch 'develop' into settings-search
syuilo Feb 22, 2025
ee2a859
Update privacy.vue
syuilo Feb 22, 2025
1de4dfd
Update privacy.vue
syuilo Feb 22, 2025
fc32946
wip
syuilo Feb 22, 2025
7a504b0
Update general.vue
syuilo Feb 22, 2025
41c2560
Update general.vue
syuilo Feb 22, 2025
692b076
Merge branch 'settings-search' into settings-search-index
syuilo Feb 22, 2025
5b23857
wip
syuilo Feb 22, 2025
0f86049
wip
syuilo Feb 22, 2025
fa65b41
Update SearchMarker.vue
syuilo Feb 22, 2025
4192d8b
wip
syuilo Feb 22, 2025
afc481d
Update profile.vue
syuilo Feb 22, 2025
35160f6
Update mute-block.vue
syuilo Feb 22, 2025
bf02152
Update mute-block.vue
syuilo Feb 22, 2025
d25b23b
Update general.vue
syuilo Feb 23, 2025
6d4d2c5
Update general.vue
syuilo Feb 23, 2025
f8282e8
childrenがduplicate key errorを吐く問題をいったん解決
tai-cha Mar 2, 2025
c34087b
マーカーの形を成形
tai-cha Mar 2, 2025
8753c3c
loggerを置きかえ
tai-cha Mar 2, 2025
ca80f4e
とりあえず省略記法に対応
tai-cha Mar 2, 2025
c54299e
Refactor and Format codes
tai-cha Mar 2, 2025
3cf751e
Merge branch 'develop' into pr/15512
syuilo Mar 2, 2025
83dbae8
Merge branch 'develop' into settings-search
syuilo Mar 2, 2025
30def92
Merge branch 'settings-search' into settings-search-index
syuilo Mar 2, 2025
f6c3d27
wip
syuilo Mar 2, 2025
12edf04
Update settings-search-index.ts
syuilo Mar 2, 2025
622558a
wip
syuilo Mar 2, 2025
69e216c
wip
syuilo Mar 2, 2025
54ab3ef
とりあえず不確定要因の仮置きidを削除
tai-cha Mar 2, 2025
4da4350
hashの生成を正規化(絶対パスになっていたのを緩和)
tai-cha Mar 2, 2025
e72f4fd
pathの入力を省略可能に
tai-cha Mar 2, 2025
608cd77
adminでもパス生成できるように
tai-cha Mar 2, 2025
3f80cbd
Update settings-search-index.ts
syuilo Mar 2, 2025
20a3961
Update privacy.vue
syuilo Mar 3, 2025
0760f84
wip
syuilo Mar 3, 2025
6084f23
build searchIndex
tai-cha Mar 3, 2025
bb812ed
wip
syuilo Mar 3, 2025
80f9cea
build
tai-cha Mar 3, 2025
4e1ca36
Update general.vue
syuilo Mar 3, 2025
a898bda
Merge branch 'settings-search-index' of https://github.com/tai-cha/mi…
syuilo Mar 3, 2025
902b1aa
build
tai-cha Mar 3, 2025
fd73c36
Update sounds.vue
syuilo Mar 3, 2025
ad330ed
Merge branch 'settings-search-index' of https://github.com/tai-cha/mi…
syuilo Mar 3, 2025
addfe8c
build
syuilo Mar 3, 2025
13528a2
build
tai-cha Mar 3, 2025
006670a
Update sounds.vue
syuilo Mar 3, 2025
14a6a71
🎨
syuilo Mar 3, 2025
e7a0a56
🎨
syuilo Mar 3, 2025
c72c92c
Update privacy.vue
syuilo Mar 3, 2025
c1a5b3f
Update privacy.vue
syuilo Mar 3, 2025
8bed0ad
Update security.vue
syuilo Mar 3, 2025
89cc6a0
create-search-indexを多少改善
tai-cha Mar 3, 2025
47d8550
build
tai-cha Mar 3, 2025
68230ec
Update 2fa.vue
syuilo Mar 3, 2025
41bffd3
wip
syuilo Mar 3, 2025
5973fed
必ずtransformCodeCacheを利用するように, キャッシュの明確な受け渡しを定義
tai-cha Mar 3, 2025
e17d745
キャッシュはdevServerでなくても更新
tai-cha Mar 3, 2025
e23febe
Revert "wip"
syuilo Mar 3, 2025
f819a6d
inlining
syuilo Mar 3, 2025
bea4f27
wip
syuilo Mar 3, 2025
cfb2d52
Update theme.vue
syuilo Mar 3, 2025
edec3d9
🎨
syuilo Mar 3, 2025
7211b00
wip normalize
tai-cha Mar 3, 2025
2925aab
Merge branch 'settings-search-index' of https://github.com/tai-cha/mi…
tai-cha Mar 3, 2025
8c59f7e
Update theme.vue
syuilo Mar 3, 2025
8c26c72
Merge branch 'settings-search-index' of https://github.com/tai-cha/mi…
syuilo Mar 3, 2025
ed9e7c0
キャッシュのパス変換
tai-cha Mar 3, 2025
de45237
build
tai-cha Mar 3, 2025
8a38992
wip
syuilo Mar 3, 2025
33acd9d
wip
syuilo Mar 3, 2025
d728519
Update SearchMarker.vue
syuilo Mar 3, 2025
5c50576
i18n.ts['key'] の形式が取り出せない問題のFix
tai-cha Mar 3, 2025
99dbf43
Merge branch 'settings-search-index' of https://github.com/tai-cha/mi…
tai-cha Mar 3, 2025
9e9b886
build
tai-cha Mar 3, 2025
6bf06ca
仮でpath入れ
tai-cha Mar 3, 2025
7a32023
必ず絶対パスが使われるように
tai-cha Mar 3, 2025
fb432c6
wip
syuilo Mar 3, 2025
ff24c3a
🎨
syuilo Mar 3, 2025
41fcccd
storybookビルド時はcreateSearchIndexをしない
tai-cha Mar 3, 2025
336f65c
inliningの構造化
tai-cha Mar 3, 2025
9298058
format code
tai-cha Mar 3, 2025
9924bea
Update index.vue
syuilo Mar 3, 2025
6376d7e
wip
syuilo Mar 3, 2025
a29398c
wip
syuilo Mar 3, 2025
e357904
🎨
syuilo Mar 3, 2025
cd3d921
wip
syuilo Mar 3, 2025
e4fcb4c
wip
syuilo Mar 3, 2025
9a91b69
Merge pull request #15512 from tai-cha/settings-search-index
syuilo Mar 3, 2025
6e18d6b
wip
syuilo Mar 3, 2025
8cf55fd
Merge branch 'develop' into settings-search
syuilo Mar 3, 2025
34ef697
wip
syuilo Mar 3, 2025
598c7c3
wip
syuilo Mar 3, 2025
a9c69a0
wip
syuilo Mar 4, 2025
f86f30e
wip
syuilo Mar 4, 2025
fdc317a
wip
syuilo Mar 4, 2025
7dabf20
clean up
syuilo Mar 4, 2025
fd8cae6
Update navbar.vue
syuilo Mar 4, 2025
671e1b7
enhance: 検索で上下矢印を使用することで検索結果を移動できるように
kakkokari-gtyih Mar 5, 2025
13aa10c
Merge pull request #15601 from kakkokari-gtyih/enh-settings-search-ke…
syuilo Mar 5, 2025
0fc6b73
refactor
kakkokari-gtyih Mar 5, 2025
a9794e6
fix(frontend): PageWindowでSearchMarkerが動作するように
kakkokari-gtyih Mar 5, 2025
41d4b34
enhance(frontend): SearchMarkerの点滅を一定時間で止める
kakkokari-gtyih Mar 5, 2025
f0b52d6
lint fix
kakkokari-gtyih Mar 5, 2025
a08adc1
fix: 子要素監視が抜けていたのを修正
kakkokari-gtyih Mar 5, 2025
4c650f1
Merge pull request #15602 from kakkokari-gtyih/fix-settings-search-pa…
syuilo Mar 5, 2025
e2dd906
Merge branch 'settings-search' into enh-settings-search-highlight-time
kakkokari-gtyih Mar 5, 2025
81051cf
アニメーションの回数はCSSで制御するように
kakkokari-gtyih Mar 5, 2025
14ddc82
Merge pull request #15603 from kakkokari-gtyih/enh-settings-search-hi…
syuilo Mar 5, 2025
2d03981
refactor
kakkokari-gtyih Mar 5, 2025
f6e237e
enhance(frontend): 検索インデックス作成時のログを削減
kakkokari-gtyih Mar 5, 2025
7327b3a
revert
kakkokari-gtyih Mar 5, 2025
d888021
fix
kakkokari-gtyih Mar 5, 2025
9f9eb5a
fix
kakkokari-gtyih Mar 5, 2025
575a67e
Merge pull request #15604 from kakkokari-gtyih/enh-settings-search-re…
syuilo Mar 5, 2025
ae53a40
Merge branch 'develop' into settings-search
syuilo Mar 6, 2025
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
wip
syuilo committed Feb 16, 2025

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
commit 534a95761b1a2a83c3ccb431646f8b7744838357
25 changes: 3 additions & 22 deletions packages/frontend/src/components/MkSuperMenu.vue
Original file line number Diff line number Diff line change
@@ -76,41 +76,22 @@ import { ref, watch } from 'vue';
import MkInput from '@/components/MkInput.vue';
import { i18n } from '@/i18n.js';

defineProps<{
const props = defineProps<{
def: SuperMenuDef[];
grid?: boolean;
searchIndex: { id: string; path: string; locationLabel: string[]; keywords: string[]; icon?: string; }[];
}>();

const search = ref('');
const searchResult = ref<any[]>([]);

const INDEX = [{
id: '727cc9e8-ad67-474a-9241-b5a9a6475e47',
locationLabel: [i18n.ts.profile, i18n.ts._profile.name],
icon: 'ti ti-user',
keywords: ['name'],
path: '/settings/profile',
}, {
id: '1a06c7f9-e85e-46cb-bf5f-b3efa8e71b93',
locationLabel: [i18n.ts.profile, i18n.ts._profile.description],
icon: 'ti ti-user',
keywords: ['bio'],
path: '/settings/profile',
}, {
id: 'acbfe8cb-c3c9-4d90-8c62-713025814b2e',
locationLabel: [i18n.ts.privacy, i18n.ts.makeFollowManuallyApprove],
icon: 'ti ti-lock-open',
keywords: ['follow', 'lock', i18n.ts.lockedAccountInfo],
path: '/settings/privacy',
}];

watch(search, (value) => {
if (value === '') {
searchResult.value = [];
return;
}

searchResult.value = INDEX.filter((item) => {
searchResult.value = props.searchIndex.filter((item) => {
// TODO: 日本語でひらがなカタカナの区別をしない
return item.locationLabel.some((x) => x.toLowerCase().includes(value.toLowerCase())) || item.keywords.some((x) => x.toLowerCase().includes(value.toLowerCase()));
});
7 changes: 4 additions & 3 deletions packages/frontend/src/pages/settings/index.vue
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-if="!narrow || currentPage?.route.name == null" class="nav">
<div class="baaadecd">
<MkInfo v-if="emailNotConfigured" warn class="info">{{ i18n.ts.emailNotConfiguredWarning }} <MkA to="/settings/email" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
<MkSuperMenu :def="menuDef" :grid="narrow"></MkSuperMenu>
<MkSuperMenu :def="menuDef" :grid="narrow" :searchIndex="SETTING_INDEX"></MkSuperMenu>
</div>
</div>
<div v-if="!(narrow && currentPage?.route.name == null)" class="main">
@@ -29,6 +29,8 @@ SPDX-License-Identifier: AGPL-3.0-only

<script setup lang="ts">
import { computed, onActivated, onMounted, onUnmounted, ref, shallowRef, watch } from 'vue';
import type { PageMetadata } from '@/scripts/page-metadata.js';
import type { SuperMenuDef } from '@/components/MkSuperMenu.vue';
import { i18n } from '@/i18n.js';
import MkInfo from '@/components/MkInfo.vue';
import MkSuperMenu from '@/components/MkSuperMenu.vue';
@@ -38,8 +40,7 @@ import { instance } from '@/instance.js';
import { definePageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js';
import * as os from '@/os.js';
import { useRouter } from '@/router/supplier.js';
import type { PageMetadata } from '@/scripts/page-metadata.js';
import type { SuperMenuDef } from '@/components/MkSuperMenu.vue';
import { SETTING_INDEX } from '@/scripts/settings-index.js';

const indexInfo = {
title: i18n.ts.settings,
26 changes: 26 additions & 0 deletions packages/frontend/src/scripts/settings-index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { i18n } from '@/i18n.js';

export const SETTING_INDEX = [{
id: '727cc9e8-ad67-474a-9241-b5a9a6475e47',
locationLabel: [i18n.ts.profile, i18n.ts._profile.name],
icon: 'ti ti-user',
keywords: ['name'],
path: '/settings/profile',
}, {
id: '1a06c7f9-e85e-46cb-bf5f-b3efa8e71b93',
locationLabel: [i18n.ts.profile, i18n.ts._profile.description],
icon: 'ti ti-user',
keywords: ['bio'],
path: '/settings/profile',
}, {
id: 'acbfe8cb-c3c9-4d90-8c62-713025814b2e',
locationLabel: [i18n.ts.privacy, i18n.ts.makeFollowManuallyApprove],
icon: 'ti ti-lock-open',
keywords: ['follow', 'lock', i18n.ts.lockedAccountInfo],
path: '/settings/privacy',
}];

Unchanged files with check annotations Beta

const timeDelta = i === 0 ? log.time : log.time - logs[i - 1].time;
switch (log.operation) {
case 'put':

Check warning on line 25 in packages/misskey-reversi/src/serializer.ts

GitHub Actions / lint (misskey-reversi)

Unnecessary conditional, comparison is always true, since `"put" === "put"` is true
_logs.push([timeDelta, log.player ? 1 : 0, 0, log.pos]);
break;
//case 'surrender':
for (const log of logs) {
switch (log.operation) {
case 'put':

Check warning on line 88 in packages/misskey-reversi/src/serializer.ts

GitHub Actions / lint (misskey-reversi)

Unnecessary conditional, comparison is always true, since `"put" === "put"` is true
game.putStone(log.pos);
break;
//case 'surrender':