diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..17f1637a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+*.po linguist-generated
+readme-assets/** linguist-documentation
diff --git a/.github/workflows/i18n-automerge.yml b/.github/workflows/i18n-automerge.yml
index f3beff2b..45f8b9e2 100644
--- a/.github/workflows/i18n-automerge.yml
+++ b/.github/workflows/i18n-automerge.yml
@@ -62,10 +62,10 @@ jobs:
# Better subject
# "i18n updates ([LOCALES_CHANGED])"
- SUBJECT="i18n updates ($LOCALES_CHANGED)"
-
PR_NUMBER=$(echo ${{ github.event.pull_request.number }})
- gh pr merge $PR_NUMBER --author "github-actions[bot]@users.noreply.github.com" --squash --subject "$SUBJECT" || true
+ SUBJECT="i18n updates ($LOCALES_CHANGED) (#$PR_NUMBER)"
+
+ gh pr merge $PR_NUMBER --squash --subject "$SUBJECT" || true
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index 18529e68..ac6d7a58 100644
--- a/README.md
+++ b/README.md
@@ -296,6 +296,7 @@ Costs involved in running and developing this web app:
-
alidsds11 (Arabic)
+-
alternative (Korean)
-
BoFFire (Arabic, French, Kabyle)
-
Brawaru (Russian)
-
cbasje (Dutch)
@@ -329,15 +330,16 @@ Costs involved in running and developing this web app:
-
rezahosseinzadeh (Persian)
-
rwmpelstilzchen (Esperanto, Hebrew)
-
SadmL (Russian)
+-
SadmL_AI (Russian)
-
Sky_NiniKo (French)
-
Su5hicz (Czech)
-
Talos00 (Italian)
-
tferrermo (Spanish)
-
tux93 (German)
-
Urbestro (Esperanto, Spanish)
--
UsualUsername (Russian)
-
Vac31. (Lithuanian)
-
valtlai (Finnish)
+-
voyagercy (Chinese Traditional)
-
xabi_itzultzaile (Basque)
-
xen4n (Ukrainian)
-
xqueralt (Catalan)
diff --git a/package-lock.json b/package-lock.json
index 1a18e531..ec6ee9a1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -35,7 +35,7 @@
"preact": "~10.23.2",
"punycode": "~2.3.1",
"react-hotkeys-hook": "~4.5.1",
- "react-intersection-observer": "~9.13.0",
+ "react-intersection-observer": "~9.13.1",
"react-quick-pinch-zoom": "~5.1.0",
"react-router-dom": "6.6.2",
"string-length": "6.0.0",
@@ -61,7 +61,7 @@
"vite": "~5.4.3",
"vite-plugin-generate-file": "~0.2.0",
"vite-plugin-html-config": "~2.0.2",
- "vite-plugin-pwa": "~0.20.3",
+ "vite-plugin-pwa": "~0.20.5",
"vite-plugin-remove-console": "~2.2.0",
"vite-plugin-run": "~0.5.2",
"workbox-cacheable-response": "~7.1.0",
@@ -5798,13 +5798,12 @@
}
},
"node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
@@ -7861,11 +7860,10 @@
"integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q=="
},
"node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true,
- "license": "MIT"
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
},
"node_modules/mute-stream": {
"version": "0.0.8",
@@ -8320,9 +8318,9 @@
"dev": true
},
"node_modules/picocolors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
- "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew=="
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
+ "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw=="
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -9281,9 +9279,9 @@
}
},
"node_modules/react-intersection-observer": {
- "version": "9.13.0",
- "resolved": "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.13.0.tgz",
- "integrity": "sha512-y0UvBfjDiXqC8h0EWccyaj4dVBWMxgEx0t5RGNzQsvkfvZwugnKwxpu70StY4ivzYuMajavwUDjH4LJyIki9Lw==",
+ "version": "9.13.1",
+ "resolved": "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.13.1.tgz",
+ "integrity": "sha512-tSzDaTy0qwNPLJHg8XZhlyHTgGW6drFKTtvjdL+p6um12rcnp8Z5XstE+QNBJ7c64n5o0Lj4ilUleA41bmDoMw==",
"peerDependencies": {
"react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -10090,12 +10088,12 @@
"dev": true
},
"node_modules/tinyglobby": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.0.tgz",
- "integrity": "sha512-+clyYQfAnNlt5a1x7CCQ6RLuTIztDfDAl6mAANvqRUlz6sVy5znCzJOhais8G6oyUyoeeaorLopO3HptVP8niA==",
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.6.tgz",
+ "integrity": "sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==",
"dev": true,
"dependencies": {
- "fdir": "^6.2.0",
+ "fdir": "^6.3.0",
"picomatch": "^4.0.2"
},
"engines": {
@@ -10103,9 +10101,9 @@
}
},
"node_modules/tinyglobby/node_modules/fdir": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.2.0.tgz",
- "integrity": "sha512-9XaWcDl0riOX5j2kYfy0kKdg7skw3IY6kA4LFT8Tk2yF9UdrADUy8D6AJuBLtf7ISm/MksumwAHE3WVbMRyCLw==",
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz",
+ "integrity": "sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==",
"dev": true,
"peerDependencies": {
"picomatch": "^3 || ^4"
@@ -10623,12 +10621,12 @@
}
},
"node_modules/vite-plugin-pwa": {
- "version": "0.20.3",
- "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.20.3.tgz",
- "integrity": "sha512-aqCOWWSwfX4o6H+6NyEvhzFs3eENBqYFKUK4FYx5OZ3jGio73BE189bPz9+BBgjHBLozldQVSmZTHySVC2zNkg==",
+ "version": "0.20.5",
+ "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.20.5.tgz",
+ "integrity": "sha512-aweuI/6G6n4C5Inn0vwHumElU/UEpNuO+9iZzwPZGTCH87TeZ6YFMrEY6ZUBQdIHHlhTsbMDryFARcSuOdsz9Q==",
"dev": true,
"dependencies": {
- "debug": "^4.3.4",
+ "debug": "^4.3.6",
"pretty-bytes": "^6.1.1",
"tinyglobby": "^0.2.0",
"workbox-build": "^7.1.0",
@@ -10641,7 +10639,7 @@
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
- "@vite-pwa/assets-generator": "^0.2.4",
+ "@vite-pwa/assets-generator": "^0.2.6",
"vite": "^3.1.0 || ^4.0.0 || ^5.0.0",
"workbox-build": "^7.1.0",
"workbox-window": "^7.1.0"
diff --git a/package.json b/package.json
index 0160af88..0e6be217 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"preact": "~10.23.2",
"punycode": "~2.3.1",
"react-hotkeys-hook": "~4.5.1",
- "react-intersection-observer": "~9.13.0",
+ "react-intersection-observer": "~9.13.1",
"react-quick-pinch-zoom": "~5.1.0",
"react-router-dom": "6.6.2",
"string-length": "6.0.0",
@@ -69,7 +69,7 @@
"vite": "~5.4.3",
"vite-plugin-generate-file": "~0.2.0",
"vite-plugin-html-config": "~2.0.2",
- "vite-plugin-pwa": "~0.20.3",
+ "vite-plugin-pwa": "~0.20.5",
"vite-plugin-remove-console": "~2.2.0",
"vite-plugin-run": "~0.5.2",
"workbox-cacheable-response": "~7.1.0",
diff --git a/src/app.css b/src/app.css
index 7d13d40e..a3c9b6ca 100644
--- a/src/app.css
+++ b/src/app.css
@@ -367,6 +367,10 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
border-bottom: var(--hairline-width) solid var(--divider-color);
--line-dir: var(--to-forward);
}
+.timeline:not(.contextual) > li + li {
+ content-visibility: auto;
+ contain-intrinsic-size: auto 160px;
+}
.timeline.flat > li {
border-bottom: none;
}
@@ -2902,3 +2906,25 @@ ul.link-list li a .icon {
width: 10em;
}
}
+
+/* DEBUG */
+
+.debug-info {
+ font-size: smaller;
+ summary {
+ height: 1em;
+ width: 100%;
+ list-style: none;
+ display: inline-block;
+ }
+ summary::-webkit-details-marker {
+ display: none;
+ }
+
+ p,
+ ol,
+ ul {
+ margin-block-start: 0;
+ padding-block-start: 0;
+ }
+}
diff --git a/src/app.jsx b/src/app.jsx
index 4db0a8cb..e1858af5 100644
--- a/src/app.jsx
+++ b/src/app.jsx
@@ -301,9 +301,33 @@ subscribe(states, (changes) => {
}
});
+const BENCHES = new Map();
+window.__BENCH_RESULTS = new Map();
+window.__BENCHMARK = {
+ start(name) {
+ if (!import.meta.env.DEV && !import.meta.env.PHANPY_DEV) return;
+ // If already started, ignore
+ if (BENCHES.has(name)) return;
+ const start = performance.now();
+ BENCHES.set(name, start);
+ },
+ end(name) {
+ if (!import.meta.env.DEV && !import.meta.env.PHANPY_DEV) return;
+ const start = BENCHES.get(name);
+ if (start) {
+ const end = performance.now();
+ const duration = end - start;
+ __BENCH_RESULTS.set(name, duration);
+ BENCHES.delete(name);
+ }
+ },
+};
+
function App() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [uiState, setUIState] = useState('loading');
+ __BENCHMARK.start('app-init');
+ __BENCHMARK.start('time-to-home');
useLingui();
useEffect(() => {
@@ -351,6 +375,7 @@ function App() {
} else {
setUIState('error');
}
+ __BENCHMARK.end('app-init');
})();
} else {
window.__IGNORE_GET_ACCOUNT_ERROR__ = true;
@@ -393,6 +418,7 @@ function App() {
} else {
setUIState('default');
}
+ __BENCHMARK.end('app-init');
}
// Cleanup
diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx
index c036190b..f7658962 100644
--- a/src/components/account-info.jsx
+++ b/src/components/account-info.jsx
@@ -2146,7 +2146,7 @@ function EditProfileSheet({ onClose = () => {} }) {
>
)}
+ {(import.meta.env.DEV || import.meta.env.PHANPY_DEV) && (
+
+
+ Debugging
+ {__BENCH_RESULTS?.size > 0 && (
+
+ {Array.from(__BENCH_RESULTS.entries()).map(
+ ([name, duration]) => (
+ -
+ {name}: {duration}ms
+
+ ),
+ )}
+
+ )}
+
+ )}
);
diff --git a/src/utils/get-translate-target-language.jsx b/src/utils/get-translate-target-language.jsx
index 9fcc9568..5dc7e912 100644
--- a/src/utils/get-translate-target-language.jsx
+++ b/src/utils/get-translate-target-language.jsx
@@ -8,11 +8,12 @@ const locales = [
...navigator.languages,
];
-const localeTargetLanguages = localeMatch(
- locales,
- translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match`
- 'en',
-);
+const localeTargetLanguages = () =>
+ localeMatch(
+ locales,
+ translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match`
+ 'en',
+ );
function getTranslateTargetLanguage(fromSettings = false) {
if (fromSettings) {
@@ -21,7 +22,7 @@ function getTranslateTargetLanguage(fromSettings = false) {
return contentTranslationTargetLanguage;
}
}
- return localeTargetLanguages;
+ return localeTargetLanguages();
}
export default getTranslateTargetLanguage;
diff --git a/src/utils/supports.js b/src/utils/supports.js
index adfd1e35..66454224 100644
--- a/src/utils/supports.js
+++ b/src/utils/supports.js
@@ -7,6 +7,8 @@ import { getCurrentInstance } from './store-utils';
// Non-semver(?) UA string detection
const containPixelfed = /pixelfed/i;
const notContainPixelfed = /^(?!.*pixelfed).*$/i;
+const containPleroma = /pleroma/i;
+const containAkkoma = /akkoma/i;
const platformFeatures = {
'@mastodon/lists': notContainPixelfed,
'@mastodon/filters': notContainPixelfed,
@@ -20,6 +22,8 @@ const platformFeatures = {
'@pixelfed/trending': containPixelfed,
'@pixelfed/home-include-reblogs': containPixelfed,
'@pixelfed/global-feed': containPixelfed,
+ '@pleroma/local-visibility-post': containPleroma,
+ '@akkoma/local-visibility-post': containAkkoma,
};
const supportsCache = {};
diff --git a/src/utils/visibility-icons-map.js b/src/utils/visibility-icons-map.js
index 867c2dba..835f7406 100644
--- a/src/utils/visibility-icons-map.js
+++ b/src/utils/visibility-icons-map.js
@@ -3,4 +3,5 @@ export default {
unlisted: 'group',
private: 'lock',
direct: 'message',
+ local: 'building',
};