Repository navigation
Remove dead activity feed CSS and TypeScript (collate#9237, collate#9238) - #39670
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
- Delete AnnouncementsWidgetV1 and FeedListSeparator (only their own tests
imported them) and the interface file that only served FeedListSeparator.
- Remove the isPost, isFeedWidget and isFullSizeWidget paths: every caller
passed isPost={false} or nothing, and the widget flags were never set.
This drops renderWidgetCard and the post/reply branches in the card,
body and footer (FeedCardFooterNew's only caller never passed a reply).
- Remove helpers, REST functions and constants with no caller in
OpenMetadata or Collate. isEntityReferenceAbout stays as a module-private
helper of getEntityTypeFromAbout/getEntityFQNFromAbout, which Collate uses.
- Remove ActivityFeedProvider values nobody reads: focusReplyEditor,
updateEditorFocus, updateEntityThread, fetchActivityEvents,
fetchMyActivityFeed and fetchFollowingActivity, with the request runner
only those three fetchers used.
- Stop passing props that are never read: refetchFeed and
entityFeedTotalCount (23 callers), the panel body props neither panel
reads, the list's pass-through props and componentsVisibility, and
ActivityThreadPanel's initialView and showHeader.
- quill-emoji.css: drop the 1,302 emoji sprite-position rules and the commented-out sprite rule they depended on. The emoji plugin inserts the unicode character and its items carry no ap-* class. - feed-editor.less: drop 54 toolbar rules for pickers and tooltips the feed editor's toolbar never renders (header/font/size/colour/align pickers, image input, video and formula tooltips). - activity-feed-tab.less: drop 10 selectors no component uses, and the unused .feed-widget-container part of a shared selector. - Delete feeds-widget.less (neither class used) and .feed-widget-padding (only set when isForFeedTab, which its one caller passes as false).
94e7149 to
ba02dde
Compare
Code Review ✅ Approved 🟢 Low riskRemoving verified-unused activity-feed CSS, components, helpers, and props leaves rendered UI and supported behavior unchanged, limiting impact to cleanup. Removes about 4,200 lines of dead activity feed CSS and roughly 2,000 lines of unused activity feed TypeScript, including unused components, helpers, context values and props. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Playwright full suite on the activity feed cleanup stackPR CI skips Playwright here, so I ran the whole suite on the stack instead (
|
Describe your changes:
Fixes https://github.com/open-metadata/openmetadata-collate/issues/9237
Fixes https://github.com/open-metadata/openmetadata-collate/issues/9238
Removes dead code from the activity feed: CSS that never applies, and TypeScript that nothing uses. It is the first step of the activity feed cleanup. Both parts are pure deletion, nothing users see changes, and each is its own commit. It replaces #39665, which held the CSS part.
Dead CSS (collate#9237)
Removes about 4,200 lines of activity feed CSS that never apply to anything rendered. Nothing users see changes.
FeedEditor/quill-emoji.css: removes the 1,302 emoji sprite-position rules (.ap-*), plus the commented-out.aprule that used to load the sprite image.span.bem.bem-<name>.ap, so noap-*class ever reaches the DOM.FeedEditor/feed-editor.less: removes 54 rules for toolbar controls the feed editor never renders:TOOLBAR_ITEMScontains none of these, and this is the only Quill editor in OpenMetadata or Collate. Rules that also select live elements are kept.ActivityFeedTab/activity-feed-tab.less: removes 10 selectors that no component uses, and the unused.feed-widget-containerpart of a selector it shares with.widget-wrapper-container..feed-explore-heading,.activity-feed-reply-button,.activity-feed-card-message-right-panel,.activity-feed-reply-card-message,.activity-feed-comment-text,.activity-feed-reply-card-footer,.close-tab-icon,.reply-message,.owner-team-iconand.feed-filter-icon.feeds-widget.less: deleted, along with its import inActivityFeedTab. Neither of its classes is used..feed-widget-padding: removed. It was only applied whenisForFeedTabis true, and the one caller ofActivityFeedListV1Newpassesfalse."Unused" was checked against both this repo and openmetadata-collate, including class names built from template strings.
Not in this PR: 68 rules in
feed-editor.lessrepeatquill.snow.cssexactly. They are probably safe to remove, but they need their own visual check.Dead TypeScript (collate#9238)
Removes activity feed TypeScript that nothing uses: components no one renders, code paths no caller reaches, helpers no one calls, and props no one reads. This is 1,432 production lines plus 637 lines of tests and mocks that covered only that code. Nothing users see changes.
"Unused" was checked against both this repo and openmetadata-collate.
Components no one renders
MyData/Widgets/AnnouncementsWidgetV1/andActivityFeed/FeedListSeparator/. Only their own tests imported them.ActivityFeedList/ActivityFeedList.interface.ts, which held onlyFeedListSeparatorProp.The post and widget modes of the feed card
ActivityFeedCardNewhad three modes that no caller turns on: every caller passesisPost={false}or nothing, andisFeedWidgetandisFullSizeWidgetare only passed down, never set. This removes:renderWidgetCard;FeedCardBodyNewandFeedCardFooterNew(the footer's only caller never passedreplyorisReply);ActivityFeedListV1New's auto-select effect.Helpers no one calls
FeedUtilsPure:getReplyText,getTestCaseNameListForResultandformatTestStatusData.getEntityFieldDisplay.getFeedCardClassName.getEntityActivityByIdandgetActivityCount.TaskOperationand four unused colour constants.isEntityReferenceAboutstays, but is no longer exported.getEntityTypeFromAboutandgetEntityFQNFromAboutuse it, and Collate uses those two.ActivityFeedProvidervalues no one readsfocusReplyEditor, together withupdateEditorFocus, whose only job was to set it;updateEntityThread;fetchActivityEvents,fetchMyActivityFeedandfetchFollowingActivity, together withrunActivityRequest, the request guard that only those three used.fetchEntityActivityandfetchUserActivitynever used that guard. That is #39653, which will add it to them in its own PR.Props passed but never read
refetchFeedandentityFeedTotalCount, passed at 23 call sites.FeedPanelBodyV1props neither panel body reads:FeedContainerClassName,hidePopover,onAfterClose,onUpdateEntityDetails,handlePanelResize,isFullWidth,hideCardBorderand the two widget flags.ActivityFeedListV1Newstops taking the props it only passed down.componentsVisibilitygoes too, because the list never read it.ActivityThreadPanel.initialViewandActivityThreadPanelBody.showHeader, which no caller sets.Type of change:
High-level design:
N/A. This only deletes code, in two commits that can be reviewed separately:
chore(ui): remove activity feed CSS that never applies: 8 files, 4,238 lines removed.chore(ui): remove unused activity feed components, props and helpers: 62 files, 2,069 lines removed.Tests:
Use cases covered
How it was verified
origin/mainthat used the same data and viewport.mainthe page loads 1,299.ap-*rules, plus 109.ql-pickerrules and each of the removed selectors. With the change it loads 0, 59 (the rules fromquill.snow.cssitself) and 0 respectively. This shows the comparison really ran against both versions of the CSS.tsc: no errors in the changed files. The 38 errors left onmainare all in unrelated test files.Unit tests
components/ActivityFeed, plusrest/activityAPI,utils/FeedUtils*andCustomizeMyData.ActivityFeedProvidertests used a removed fetcher and now run against the livefetchEntityActivity, with the same assertions:getEntityActivityByIdtest;getActivityCountpart of the entity-link test.tw-auditpasses.Screenshots
UI screen recording:
Not applicable: this PR only removes code that never ran, so there is no behaviour to record. The before/after comparison is under Screenshots above.
Checklist:
Fixes <issue-number>: <short explanation>. The issue is in openmetadata-collate, so the title names it instead.Fixesabove (cross-repo).REVIEW.mdand fixed every 🔴 finding, or answered it on the line below. "Collate builds against OpenMetadatamain": every removed export, prop and context value was checked against openmetadata-collatemain, and none is used there. The two helpers Collate imports stay.docs/decisions/. Not applicable.🤖 Generated with Claude Code