Repository navigation
chore: remove legacy reply editor orphaned by threaded annotation cleanup - #839
Conversation
…anup Removing the isThreadedAnnotation flag (box#823) deleted PopupReply, which was the only consumer of the Draft.js-based reply editor. This removes the code that became unreachable as a result: - ReplyForm, ReplyField, MentionItem, withMentionDecorator, PopupList, and ItemList components, with their styles, mocks, and tests - Unused setMessage/message props from PopupLayer and PopupContainer - Creator store cursor and message state, along with setCursorAction, setMessageAction, getCreatorCursor, and getCreatorMessage - The getCollaborators selector - Popup messages and PopupBase styles used only by the removed editor
|
Duncan Hsu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
No actionable comments were generated in the recent review. WalkthroughThis pull request removes reply composition and collaborator mention-selection components, along with related styles, exports, tests, and creator cursor/message state. Popup submission now requires text and uses it directly for staged highlights, regions, and drawings. ChangesLegacy Reply UI and Creator State
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Possibly related PRs
Suggested reviewers: Merge Risk:
|
Summary
Follow-up to #823. Removing the
isThreadedAnnotationflag deletedPopupReply, which was the only consumer of the legacy Draft.js reply editor. That left the editor components, plus the props and store state that only fed them, unreachable. This PR removes them. There is no behavior change, sincePopupV2was already the only popup rendered.Changes
Deleted orphaned components
components/ReplyForm/:ReplyForm,ReplyFormContainer,ReplyButton,types.ts, styles, mocks, and testscomponents/ReplyField/:ReplyField,ReplyFieldContainer,MentionItem,withMentionDecorator, styles, and testscomponents/Popups/PopupList.tsxandPopupList.scss, plus their tests (only used byReplyField)components/ItemList/(only used byPopupList)Popup layer
popup/PopupLayer.tsx: Removed the unusedsetMessageandmessageprops.handleSubmitnow requirestext, whichPopupV2always passes.popup/PopupContainer.tsx: RemovedmessagefrommapStateToPropsandsetMessagefrommapDispatchToPropsStore
store/creator: Removed thecursorandmessagestate,setCursorAction,setMessageAction,getCreatorCursor, andgetCreatorMessagestore/users: Removed thegetCollaboratorsselector, which was only used byReplyFieldContainer.PopupV2uses the result offetchCollaboratorsActiondirectly.store/options: Removed thegetScaleselector, whose only production caller was thePopupReplyremoved in fix: remove isThreadedAnnotation feature flag #823. Thescalestate stays becauseBaseAnnotator.initstill sets it.Messages and styles
components/Popups/messages.ts: RemovedariaLabelReplyField,buttonCancel,buttonPost,fieldPlaceholder, andpopupListPrompt. The locale files will be updated by the translation pipeline.components/Popups/PopupBase.scss: Removed the.ba-ItemList,.ba-ReplyForm, and.ba-Popup-footerrulesIntentionally kept
draft-js,formik,scroll-into-view-if-needed, and thedraft-js/immutableresolution stay inpackage.json, becausebox-ui-elementsdeclares them as peer dependencies.Testing
Summary by CodeRabbit