You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(activity-feed-v2): replace stub with real adapter (#4533)
* feat(activity-feed-v2): replace stub with real @box/activity-feed adapter
Wire up ActivityFeedV2 with real compound components from
@box/activity-feed behind the threadedRepliesV2 feature flag.
Add data transformers, FeedItemRow renderer, CSS isolation,
and tighten prop types.
* feat(activity-feed-v2): add drawing and highlight annotation badge support
* fix(activity-feed-v2): preserve original task data, fix aria labels
* fix(activity-feed-v2): debounce mentions, guard permissions, drop empty edit text
- Debounce getMentionAsync in ActivitySidebar so mention lookups don't fire
on every keystroke; reuse DEFAULT_COLLAB_DEBOUNCE and supersede in-flight
promises with empty results.
- Default Comment/Annotation permissions to {} in transformFeedItem so the
non-optional TransformedFeedItem.permissions field can't be undefined at
runtime.
- Stop passing text: '' to onAnnotationEdit (would blank the annotation
message); make text optional in the handler signature.
* fix(activity-feed-v2): guard getMentionAsync against stale responses
Use ElementsXhrError for the mention reject type (flow fix) and add a
generation counter so in-flight responses from superseded requests cant
resolve or reject the current promise with stale data.
* fix(activity-feed-v2): drop broken edit wiring, remap version click args
Remove the onEdit handler for comments and annotations: threaded-annotations
V2 has no inline edit UI yet, and the existing wiring routed into the
submit-path (updateThreadedComment / updateAnnotation) which throws when
text and status are both undefined. Drop the onAnnotationEdit prop across
FeedItemRow, ActivityFeedV2, and ActivitySidebar's V2 render block.
Rewire onVersionClick to consume the V2 callback's { id, versionNumber }
args and remap to the V1 { id, version_number } shape that downstream
onVersionHistoryClick consumers expect.
* fix(activity-feed-v2): address review feedback
- Bump peer dep minimums to match @box/activity-feed@1.17.0 requirements
(@box/blueprint-web ^14.18.0, @box/blueprint-web-assets ^4.115.4,
@box/collaboration-popover ^1.61.5, @box/readable-time ^1.40.5,
@box/user-selector ^1.75.5). Run yarn-deduplicate to collapse
@tanstack/react-virtual to a single 3.13.24.
- Cancel pending debounce and bump mention generation on ActivitySidebar
unmount, and move errorCallback inside the generation check so
superseded mention requests do not fire onError on a destroyed component.
- Drop the broken sync getAvatarUrl wrapper in mentionContext: the vendor
expects sync (id) => string but our BUIE prop is async, so the wrapper
always returned empty. Leave the optional prop undefined until a
caching layer exists.
- Rename toPermissions() param perms to permissions, and expand the UAA
acronym in file headers (public repo).
* test(sidebar-file-properties): update snapshot for blueprint-web bump
@box/blueprint-web 14.18.0 emits new CSS module class hashes; markup is
otherwise unchanged.
* test(activity-feed-v2): use getByRole and clear mocks between tests
Switch ActivityFeed list-item mocks from plain divs with data-testid to
semantic article elements with aria-label, so tests can use getByRole
instead of getByTestId per project testing conventions. Add
afterEach(jest.clearAllMocks) in both test files so mock call counts
don't leak between tests.
* fix(activity-feed-v2): gate row mutations on isDisabled, settle pending mention on unmount
- Honor isDisabled in FeedItemRow comment/annotation branches so delete,
resolve, unresolve, and reply callbacks no-op in read-only mode,
matching how the editor and task button already behave
- Resolve any pending getMentionAsync promise with [] in
componentWillUnmount so awaiters do not hang after the sidebar closes
- Narrow captured-prop test types via Partial<ThreadedAnnotationsPropsV2>
/ Partial<TaskItemProps> / Partial<VersionItemProps> so the tests drop
per-callback (as ...) => void casts
* fix(activity-feed-v2): address review feedback on a11y, avatar cache, empty posts
- Key fetchAvatarUrls cache by contact.value (string id) instead of
contact.id (Number(id) || 0 funneled non-numeric ids to 0)
- Replace misused noActivityCommentPrompt and loading messages on the
mention user selector with mentionUserSelectorRoleDescription and
mentionUserSelectorLoading so screen readers announce the control's
actual role and loading state
- Trim-and-early-return empty or whitespace-only content in
handleCommentPost and buildReplyPost to avoid the feed API's
missing-item-text error path; tighten the try block so consumer
callback throws propagate
- Scope the ul > li padding rule to the top-level feed list by wrapping
ActivityFeed.List in a display:contents div; prevents bleed into
nested reply lists
---------
Co-authored-by: Jackie Jou <jackiejou@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
0 commit comments