perf/UX audit round 2, fix eggplant reaction button
Some checks failed
pl-api CI / Test for pl-api formatting (22.x) (push) Has been cancelled
pl-fe CI / Test and upload artifacts (22.x) (push) Has been cancelled
pl-fe CI / deploy (push) Has been cancelled
pl-hooks CI / Test for a successful build (22.x) (push) Has been cancelled

Runtime: memoize selectors in report modal, event discussion,
followed tag filter, and upload form to avoid unnecessary allocations.

Bundle: lazy-load crypto icons (500+ SVGs), remove datepicker CSS from
main entry (already in lazy wrapper), drop unused Inter 200/300 weights.

Stability: add null guards in compose upload and conversation components,
add keyboard handler to reply mentions button, surface local translation
unavailability instead of swallowing errors.

Fix eggplant button: preferences toggle was still writing to the old
showWrenchButton setting key, so the eggplant reaction button could
never be enabled.
This commit is contained in:
2026-02-14 17:06:15 +00:00
parent 389f060080
commit 63bee46b53
11 changed files with 65 additions and 33 deletions

View File

@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import { eventDiscussionCompose } from '@/actions/compose';
@ -32,7 +32,8 @@ const EventDiscussionPage: React.FC = () => {
const me = useAppSelector((state) => state.me);
const descendantsIds = useAppSelector(state => getDescendantsIds(state, statusId).filter(id => id !== statusId));
const allDescendantsIds = useAppSelector(state => getDescendantsIds(state, statusId));
const descendantsIds = useMemo(() => allDescendantsIds.filter(id => id !== statusId), [allDescendantsIds, statusId]);
const [isLoaded, setIsLoaded] = useState<boolean>(!!status);