Select the types of activity you want to include in your feed.
Tidy combobox tray internals
Use mergeRefs from @react-aria/utils instead of a hand-rolled ref merge, drop the redundant SSR guard (effects never run on the server), and reformat the popover transition list.
···234234 // A subtle fade for the desktop popover; the tray media query below swaps this for a
235235 // slide. RAC keeps the element mounted during data-entering/data-exiting so the
236236 // transition has time to run.
237237- transition: `opacity ${vars.motion.duration.fast} ${vars.motion.easing.standard}, translate ${vars.motion.duration.fast} ${vars.motion.easing.standard}, box-shadow ${vars.motion.duration.fast} ${vars.motion.easing.standard}`,
237237+ transition: [
238238+ `opacity ${vars.motion.duration.fast} ${vars.motion.easing.standard}`,
239239+ `translate ${vars.motion.duration.fast} ${vars.motion.easing.standard}`,
240240+ `box-shadow ${vars.motion.duration.fast} ${vars.motion.easing.standard}`,
241241+ ].join(', '),
238242239243 selectors: {
240244 '&[data-entering]': {
···44 comboboxTrayViewportHeightVar,
55} from '../../recipes/combobox.css.js';
6677-/**
88- * Mirrors the browser's Visual Viewport onto CSS custom properties set on `element`, so the mobile
99- * combobox tray (see `recipes/combobox.css.ts`) can size itself against the space actually visible
1010- * above an on-screen keyboard instead of the full layout viewport. Modeled on the approach described
1111- * in Adobe Spectrum's combobox write-up (https://react-aria.adobe.com/blog/building-a-combobox).
1212- *
1313- * No-ops during SSR, when `element` is `null` (the popover isn't mounted while closed), and in
1414- * browsers without `visualViewport` support.
1515- */
77+/** Sets the visible viewport height and keyboard inset on the mobile tray. */
168export function useVisualViewportVars(element: HTMLElement | null): void {
179 useEffect(() => {
1810 if (element === null) return;
1919- if (typeof window === 'undefined' || window.visualViewport == null) return;
1111+ if (window.visualViewport == null) return;
20122113 // Reassigned into locals so TypeScript keeps them narrowed to non-null inside `update`,
2214 // a nested function declaration whose narrowing TS can't otherwise carry over.
···3325 }
34263527 update();
2828+ // VisualViewport is not an Element, so ResizeObserver cannot observe it. Scroll also reports
2929+ // changes to offsetTop that do not resize the viewport.
3630 visualViewport.addEventListener('resize', update);
3731 visualViewport.addEventListener('scroll', update);
3832