Skip to content

Conversation

@luarmr
Copy link
Contributor

@luarmr luarmr commented Oct 22, 2025

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.

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 0d6ef25
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/690102fee547a70008e6a24e
😎 Deploy Preview https://deploy-preview-8690--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 0d6ef25
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/690102fe43e69400098ad3dc
😎 Deploy Preview https://deploy-preview-8690--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 0d6ef25
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/690102fe54357c000805329f
😎 Deploy Preview https://deploy-preview-8690--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 0d6ef25
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/690102fea5dc54000810037f
😎 Deploy Preview https://deploy-preview-8690--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.12%. Comparing base (01295f7) to head (0d6ef25).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...itor/src/components/Comments/Comment/LinkState.tsx 0.00% 5 Missing ⚠️
...or/src/components/Comments/Comment/CommentForm.tsx 0.00% 4 Missing ⚠️
...or/src/components/Comments/Comment/CommentItem.tsx 0.00% 4 Missing ⚠️
...components/Comments/Comment/CommentFormButtons.tsx 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (01295f7) and HEAD (0d6ef25). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (01295f7) HEAD (0d6ef25)
pytests 1 0
lsf-e2e 1 0
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #8690       +/-   ##
============================================
- Coverage    67.03%   51.12%   -15.91%     
============================================
  Files          790      551      -239     
  Lines        60680    38998    -21682     
  Branches     10311    10313        +2     
============================================
- Hits         40677    19939    -20738     
+ Misses       20000    19056      -944     
  Partials         3        3               
Flag Coverage Δ
lsf-e2e ?
lsf-integration 50.66% <0.00%> (-0.01%) ⬇️
lsf-unit 8.34% <0.00%> (-0.01%) ⬇️
pytests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@luarmr luarmr force-pushed the fb-echo-418/comments-componet branch from 4c10044 to 82a70cc Compare October 24, 2025 21:27
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
@luarmr luarmr force-pushed the fb-echo-418/comments-componet branch from 3f05a87 to 6eb24f6 Compare October 24, 2025 23:25
@hlomzik hlomzik changed the title refactor: echo-418: comments componet refactor: echo-418: Comments component Oct 28, 2025
@hlomzik hlomzik changed the title refactor: echo-418: Comments component refactor: ECHO-418: Comments component Oct 28, 2025
{onLinkTo && !region && (
<Tooltip title="Link to...">
<Elem name="action" tag="button" mod={{ highlight: linking }} onClick={onLinkTo}>
<button
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny that we missed these buttons when we were refactoring Button component. cc @nick-skriabin

Copy link
Collaborator

@hlomzik hlomzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is good apart from this small comment about Userpic param

@luarmr
Copy link
Contributor Author

luarmr commented Oct 28, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/ui/src/assets/icons/clipboard-check.svg

@robot-ci-heartex robot-ci-heartex merged commit 7cda132 into develop Oct 28, 2025
44 of 46 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-echo-418/comments-componet branch October 28, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants