- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.1k
refactor: echo-418: comments componet #8690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
| ✅ Deploy Preview for heartex-docs canceled.
 | 
| ✅ Deploy Preview for label-studio-storybook ready!
 To edit notification comments on pull requests, go to your Netlify project configuration. | 
| ✅ Deploy Preview for label-studio-playground ready!
 To edit notification comments on pull requests, go to your Netlify project configuration. | 
| ✅ Deploy Preview for label-studio-docs-new-theme canceled.
 | 
| Codecov Report❌ Patch coverage is  
 Additional details and impacted files@@             Coverage Diff             @@
##           develop    #8690      +/-   ##
===========================================
- Coverage    66.97%   59.93%   -7.05%     
===========================================
  Files          789      551     -238     
  Lines        60566    38993   -21573     
  Branches     10310    10312       +2     
===========================================
- Hits         40564    23370   -17194     
+ Misses       19999    15620    -4379     
  Partials         3        3              
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
4c10044    to
    82a70cc      
    Compare
  
    Migrated CommentFormBase component from Block/Elem to cn() helper.
- Replaced Block/Elem imports with cn import
- Replaced <Block name="comment-form" tag="form"> with <form className={cn("comment-form")...}>
- Replaced <Elem tag="div" name="primary-action"> with <div className={cn("comment-form").elem("primary-action")...}>
- Preserved ref, mod, onSubmit handler, and all props
- Added type assertion for form ref
- No behavior change, equivalent class strings
    Migrated CommentFormButtons component from Block/Elem to cn() helper.
- Replaced Block/Elem imports with cn import
- Replaced <Block name="comment-form-buttons"> with <div className={cn("comment-form-buttons")...}>
- Replaced <Elem name="buttons"> with <div className={cn("comment-form-buttons").elem("buttons")...}>
- Replaced <Elem name="action" tag="button"> (2x) with <button type="button" className={...}>
- Both action buttons share same elem name (intentional, generates same class)
- Preserved onClick handler, tooltip, and all props
- No behavior change, equivalent class strings
    Migrated LinkState component from Block/Elem to cn() helper.
- Replaced Block/Elem imports with cn import
- Replaced <Block name="link-state"> with <div className={cn("link-state")...}>
- Replaced <Block name="link-state-region"> with <div className={cn("link-state-region")...}>
- Replaced <Elem tag="div" name="prefix"> with <div className={cn("link-state").elem("prefix")...}>
- Replaced all Elems in link-state-region (icon, index, title, label, text, close)
- Nested Elems (label, text within title) all use link-state-region as block
- Preserved style with CSS custom properties (added type assertion)
- Preserved mouse handlers and all props
- No behavior change, equivalent class strings
    Migrated CommentsList component from Block to cn() helper.
- Replaced Block import with cn import
- Replaced <Block name="comments-list"> with <div className={cn("comments-list")...}>
- No Elems in this file (simple wrapper)
- No behavior change, equivalent class strings
    Migrated Comment/CommentForm component from Block/Elem to cn() helper.
- Replaced Block/Elem imports with cn import
- Replaced <Block name="comment-form-new" tag="form"> with <form className={cn("comment-form-new")...}>
- Replaced <Elem name="text-row"> with <div className={cn("comment-form-new").elem("text-row")...}>
- Replaced <Elem name="classifications-row"> with <div className={cn("comment-form-new").elem("classifications-row")...}>
- Replaced <Elem name="category-selector"> with <div className={cn("comment-form-new").elem("category-selector")...}>
- Replaced <Elem name="link-state"> with <div className={cn("comment-form-new").elem("link-state")...}>
- Replaced <Elem name="tooltipMessage"> with <div className={cn("comment-form-new").elem("tooltipMessage")...}>
- Preserved form ref, mods, onSubmit handler, and all props
- Added type assertion for form ref
- No behavior change, equivalent class strings
    Migrated Comment/CommentItem component from Block/Elem to cn() helper.
- Replaced Block/Elem imports with cn import
- Replaced <Block name="comment-item"> with <div className={cn("comment-item")...}>
- Replaced <Elem tag={Userpic}> with <Userpic className={cn("comment-item").elem("userpic")...}>
- Replaced <Elem tag="span" name="name"> with <span className={cn("comment-item").elem("name")...}>
- Replaced <Elem component={IconCheck}> with <IconCheck className={cn("comment-item").elem("resolved")...}>
- Replaced all nested Elems (saving, dot, content, text, confirmForm, question, controls, actions, etc.)
- TimeTracker inner component uses parent block "comment-item"
- Nested Elems within content→text→confirmForm all use same block name
- Preserved ref, mods, handlers, and all props
- Added type assertion for ref
- No behavior change, equivalent class strings
    Migrated Comments wrapper component from Block to cn() helper.
- Replaced Block import with cn import
- Replaced <Block name="comments"> with <div className={cn("comments")...}>
- No Elems in this file (simple wrapper)
- Wraps either Comment/ or OldComment/ system based on FF_PER_FIELD_COMMENTS flag
- No behavior change, equivalent class strings
    3f05a87    to
    6eb24f6      
    Compare
  
    
Bem removal in editor:
Focus on the component:
components/Comments/After merge fflag_feat_all_leap_1430_per_field_comments_100924_short this became more simpler.