Repository: open-condo-software/condo
Pull request #6020: fix (condo): DOMA-11417 Fix disable condition, set section function, onDataLoaded and styles
Author: login: Alexander-Turkin
Created: 2025-04-07T16:09:49Z | Merged: 2025-04-08T05:41:32Z

DOMA-11391 fix disable condition
DOMA-11392 fix set section function
DOMA-11413 fix onDataLoaded function

fix selector styles
add TODO for InputStepRecipientCounter

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
  - Removed character count tracking for news title and body inputs to simplify content entry.
  - Adjusted conditions for displaying the news sharing counter and refined logic for section and unit selections to enhance responsiveness.

- **Style**
  - Reorganized the layout to ensure the news title is consistently presented above the template selection section, improving overall form clarity.
  - Added a new CSS class for the recipient counter to enhance styling.

- **New Features**
  - Enhanced form input handling and display logic for improved user experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/apps/condo/domains/news/components/NewsForm/BaseNewsForm.tsx b/apps/condo/domains/news/components/NewsForm/BaseNewsForm.tsx
index ecea179c08b..d85cb9ca991 100644
--- a/apps/condo/domains/news/components/NewsForm/BaseNewsForm.tsx
+++ b/apps/condo/domains/news/components/NewsForm/BaseNewsForm.tsx
@@ -41,12 +41,10 @@ import { IGenerateHooksResult } from '@open-condo/codegen/generate.hooks'
 import { useIntl } from '@open-condo/next/intl'
 import { ActionBar as UIActionBar, Alert, Button, Radio, RadioGroup, Space, Steps, Typography, Modal } from '@open-condo/ui'
 
-import Input from '@condo/domains/common/components/antd/Input'
 import { FormWithAction } from '@condo/domains/common/components/containers/FormList'
 import { LabelWithInfo } from '@condo/domains/common/components/LabelWithInfo'
 import { useLayoutContext } from '@condo/domains/common/components/LayoutContext'
 import DatePicker from '@condo/domains/common/components/Pickers/DatePicker'
-import { useInputWithCounter } from '@condo/domains/common/hooks/useInputWithCounter'
 import { useValidations } from '@condo/domains/common/hooks/useValidations'
 import { NewsCardGrid } from '@condo/domains/news/components/NewsForm/NewsCardGrid'
 import SelectSharingAppControl from '@condo/domains/news/components/NewsForm/SelectSharingAppControl'
@@ -518,16 +516,6 @@ export const BaseNewsForm: React.FC<BaseNewsFormProps> = ({
         })
     }, [])
 
-    const Title = useInputWithCounter(Input.TextArea, 150)
-    const Body = useInputWithCounter(Input.TextArea, 800)
-
-    useEffect(() => {
-        const initialTitle = get(initialValues, 'title', '')
-        const initialBody = get(initialValues, 'body', '')
-        Title.setTextLength(initialTitle.length)
-        Body.setTextLength(initialBody.length)
-    }, [])
-
     const { requiredValidator } = useValidations()
     const dateRule: Rule = useMemo(() => getIsDateInFutureRule(PastTimeErrorMessage), [PastTimeErrorMessage])
     const finishWorkRule: Rule = useMemo(() => getFinishWorkRule(ValidBeforeErrorMessage), [ValidBeforeErrorMessage])
diff --git a/apps/condo/domains/news/components/NewsForm/InputStep/InputStepForm.tsx b/apps/condo/domains/news/components/NewsForm/InputStep/InputStepForm.tsx
index 388a5cc892d..1b9f93cbd4a 100644
--- a/apps/condo/domains/news/components/NewsForm/InputStep/InputStepForm.tsx
+++ b/apps/condo/domains/news/components/NewsForm/InputStep/InputStepForm.tsx
@@ -160,37 +160,38 @@ export const InputStepForm: React.FC<InputStepFormProps> = ({
                 ) : (
                     <Col span={formFieldsColSpan}>
                         <Row gutter={[0, 60]}>
-                            <Row gutter={[0, 32]}>
-
-                                <Col span={24}>
-                                    <Typography.Title level={2}>
-                                        {MakeTextLabel}
-                                    </Typography.Title>
-                                </Col>
-
-                                {templates && (
+                            <Col span={24}>
+                                <Row gutter={[0, 32]}>
                                     <Col span={24}>
-                                        <FormItem
-                                            name='template'
-                                        >
-                                            {selectedType === NEWS_TYPE_COMMON && (
-                                                <TemplatesSelect
-                                                    onChange={handleTemplateChange(form)}
-                                                    items={commonTemplatesTabsProps}
-                                                    hasCategories
-                                                />
-                                            )}
-                                            {selectedType === NEWS_TYPE_EMERGENCY && (
-                                                <TemplatesSelect
-                                                    onChange={handleTemplateChange(form)}
-                                                    items={emergencyTemplatesTabsProps}
-                                                    hasCategories
-                                                />
-                                            )}
-                                        </FormItem>
+                                        <Typography.Title level={2}>
+                                            {MakeTextLabel}
+                                        </Typography.Title>
                                     </Col>
-                                )}
-                            </Row>
+
+                                    {templates && (
+                                        <Col span={24}>
+                                            <FormItem
+                                                name='template'
+                                            >
+                                                {selectedType === NEWS_TYPE_COMMON && (
+                                                    <TemplatesSelect
+                                                        onChange={handleTemplateChange(form)}
+                                                        items={commonTemplatesTabsProps}
+                                                        hasCategories
+                                                    />
+                                                )}
+                                                {selectedType === NEWS_TYPE_EMERGENCY && (
+                                                    <TemplatesSelect
+                                                        onChange={handleTemplateChange(form)}
+                                                        items={emergencyTemplatesTabsProps}
+                                                        hasCategories
+                                                    />
+                                                )}
+                                            </FormItem>
+                                        </Col>
+                                    )}
+                                </Row>
+                            </Col>
 
                             <Col span={24}>
                                 <Row gutter={[0, 5]}>
diff --git a/apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx b/apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx
index 7773bf17d9d..91aa876b9d6 100644
--- a/apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx
+++ b/apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx
@@ -1,5 +1,5 @@
 import { B2BAppNewsSharingConfig } from '@app/condo/schema'
-import { Col, Row } from 'antd'
+import { Col } from 'antd'
 import React, { useMemo } from 'react'
 
 import { useLayoutContext } from '@condo/domains/common/components/LayoutContext'
@@ -21,28 +21,27 @@ export const InputStepRecipientCounter: React.FC<InputStepRecipientCounterProps>
     newsItemScopesNoInstance,
 }) => {
     const { breakpoints } = useLayoutContext()
-    const isCustomRecipientCounter = !!newsSharingConfig?.getRecipientsCountersUrl && isSharingStep
 
     const isMediumWindow = !breakpoints.DESKTOP_SMALL
     const formFieldsColSpan = isMediumWindow ? 24 : 14
     const formInfoColSpan = 24 - formFieldsColSpan
 
-    const newsSharingRecipientCounter = useMemo(() => <>{newsSharingConfig?.getRecipientsCountersUrl && (
-        <MemoizedNewsSharingRecipientCounter
-            contextId={sharingAppId}
-            newsItemScopes={newsItemScopesNoInstance}
-        />
+    const newsSharingRecipientCounter = useMemo(() => <>{isSharingStep && (
+        // TODO: (DOMA-11416) create RecipientCounter for no custom CountersUrl
+        newsSharingConfig?.getRecipientsCountersUrl ? (
+            <MemoizedNewsSharingRecipientCounter
+                contextId={sharingAppId}
+                newsItemScopes={newsItemScopesNoInstance}
+            /> ) : null
     )}</>, [newsSharingConfig, sharingAppId, newsItemScopesNoInstance])
 
     return (
-        <Col span={formInfoColSpan}>
-            <Row>
-                {isCustomRecipientCounter ? newsSharingRecipientCounter : (
-                    <HiddenBlock hide={newsItemScopesNoInstance.length <= 0}>
-                        <MemoizedRecipientCounter newsItemScopes={newsItemScopesNoInstance}/>
-                    </HiddenBlock>
-                )}
-            </Row>
+        <Col span={formInfoColSpan} className='recipient-counter'>
+            {isSharingStep ? newsSharingRecipientCounter : (
+                <HiddenBlock hide={newsItemScopesNoInstance.length <= 0}>
+                    <MemoizedRecipientCounter newsItemScopes={newsItemScopesNoInstance}/>
+                </HiddenBlock>
+            )}
         </Col>
     )
 }
\ No newline at end of file
diff --git a/apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx b/apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx
index 3895851d401..943ca6fffc6 100644
--- a/apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx
+++ b/apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx
@@ -30,6 +30,10 @@ import { SharingAppValuesType } from '.'
 
 const SMALL_VERTICAL_GUTTER: [Gutter, Gutter] = [0, 24]
 
+export type Properties = {
+    properties: Array<string>
+}
+
 interface InputStepSelectorProps {
     newsSharingConfig: B2BAppNewsSharingConfig
     isSharingStep: boolean
@@ -46,7 +50,7 @@ interface InputStepSelectorProps {
     }
     newsItemForOneProperty: boolean
     initialValues?: Partial<INewsItem> & { hasAllProperties?: boolean, hasAllCustom?: boolean }
-    initialFormValues: Record<string, unknown>
+    initialFormValues: Record<string, unknown> & Properties
 }
 
 export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
@@ -151,7 +155,7 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
     }
 
     const handleAllPropertiesLoading = useCallback((form: FormInstance) => (data) => {
-        if (!initialFormValues?.property || !initialFormValues?.properties || !initialFormValues?.hasAllProperties) return
+        if (initialFormValues?.property || initialFormValues?.properties?.length || initialFormValues?.hasAllProperties) return
         if (!newsItemForOneProperty) return
         if (data.length !== 1) return
         if (propertyIsAutoFilled.current) return
@@ -186,11 +190,11 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
 
     const handleChangeSectionNameInput = useCallback((property) => {
         return (sections, options) => {
-            if (!sections) {
-                const sectionKeys = options.map(option => option.key)
-                setScope(prev=>({ ...prev, selectedSectionKeys: sectionKeys }))
-            } else {
+            if (!sections || sections.length === 0) {
                 setScope(prev=>({ ...prev, selectedSectionKeys: [] }))
+            } else {
+                const sectionKeys = sections.map(section => section.key || section)
+                setScope(prev=>({ ...prev, selectedSectionKeys: sectionKeys }))
             }
         }
     }, [])
@@ -263,7 +267,7 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
                                     <Col span={11}>
                                         <Form.Item
                                             name='unitNames'
-                                            label={selectedPropertiesLoading || !scope.selectedSectionKeys
+                                            label={selectedPropertiesLoading || !!scope.selectedSectionKeys?.length || !scope.selectedSectionKeys
                                                 ? (
                                                     <LabelWithInfo
                                                         title={UnitsMessage}
@@ -276,21 +280,21 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
                                                 multiple={true}
                                                 property={selectedProperties[0]}
                                                 loading={selectedPropertiesLoading}
-                                                disabled={selectedPropertiesLoading || !scope.selectedSectionKeys}
+                                                disabled={selectedPropertiesLoading || !!scope.selectedSectionKeys?.length || !scope.selectedSectionKeys}
                                                 onChange={handleChangeUnitNameInput}/>
                                         </Form.Item>
                                     </Col>
                                     <Col span={11} offset={2}>
                                         <Form.Item
                                             name='sectionIds'
-                                            label={selectedPropertiesLoading || !scope.selectedUnitNameKeys
+                                            label={selectedPropertiesLoading || !!scope.selectedUnitNameKeys?.length || !scope.selectedSectionKeys
                                                 ? (<LabelWithInfo
                                                     title={SectionsMessage}
                                                     message={SectionsLabel}/>)
                                                 : SectionsLabel}
                                         >
                                             <SectionNameInput
-                                                disabled={selectedPropertiesLoading || !scope.selectedUnitNameKeys}
+                                                disabled={selectedPropertiesLoading || !!scope.selectedUnitNameKeys?.length || !scope.selectedSectionKeys}
                                                 property={selectedProperties[0]}
                                                 onChange={handleChangeSectionNameInput(selectedProperties[0])}
                                                 mode='multiple'
@@ -301,15 +305,17 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
                             )}
                         </>
                     ) : (
-                        <GraphQlSearchInputWithCheckAll
-                            CheckAllMessage={CheckAllLabel}
-                            checkAllFieldName='hasAllCustom'
-                            selectProps={customSelectProps}
-                            checkAllInitialValue={initialValues?.hasAllCustom}
-                            onCheckBoxChange={customCheckboxChange()}
-                            form={form}
-                            selectFormItemProps={customSelectFormItemProps}
-                        />
+                        <Col span={24}>
+                            <GraphQlSearchInputWithCheckAll
+                                CheckAllMessage={CheckAllLabel}
+                                checkAllFieldName='hasAllCustom'
+                                selectProps={customSelectProps}
+                                checkAllInitialValue={initialValues?.hasAllCustom}
+                                onCheckBoxChange={customCheckboxChange()}
+                                form={form}
+                                selectFormItemProps={customSelectFormItemProps}
+                            />
+                        </Col>
                     )}
                 </Row>
             ) : (
diff --git a/apps/condo/domains/news/components/NewsForm/InputStep/index.tsx b/apps/condo/domains/news/components/NewsForm/InputStep/index.tsx
index c2b1a978956..245d4933a0f 100644
--- a/apps/condo/domains/news/components/NewsForm/InputStep/index.tsx
+++ b/apps/condo/domains/news/components/NewsForm/InputStep/index.tsx
@@ -24,7 +24,7 @@ import { searchOrganizationProperty } from '@condo/domains/scope/utils/clientSch
 import { InputStepForm } from './InputStepForm'
 import { InputStepPreview } from './InputStepPreview'
 import { InputStepRecipientCounter } from './InputStepRecipientCounter'
-import { InputStepSelector } from './InputStepSelector'
+import { InputStepSelector, Properties } from './InputStepSelector'
 
 const BIG_VERTICAL_GUTTER: [Gutter, Gutter] = [0, 60]
 const BIG_HORIZONTAL_GUTTER: [Gutter, Gutter] = [50, 0]
@@ -86,7 +86,7 @@ type InputStepProps = NewsItemSharingFormProps & BaseNewsFormProps & {
         objs: Array<IProperty>
     }
     initialPropertyIds: Array<string>
-    initialFormValues: Record<string, unknown>
+    initialFormValues: Record<string, unknown> & Properties
 }
 
 export const FormContainer: React.FC = ({ children }) => {
diff --git a/apps/condo/domains/news/components/NewsForm/InputStep/styles.css b/apps/condo/domains/news/components/NewsForm/InputStep/styles.css
index c9a9319f816..c036b2f4c91 100644
--- a/apps/condo/domains/news/components/NewsForm/InputStep/styles.css
+++ b/apps/condo/domains/news/components/NewsForm/InputStep/styles.css
@@ -3,3 +3,7 @@
   min-height: 500px;
   margin-left: -10px;
 }
+
+.recipient-counter {
+  justify-items: end;
+}
\ No newline at end of file


Reviews:
user: login: copilot-pull-request-reviewer[bot]
body: 

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


<details>
<summary>Comments suppressed due to low confidence (3)</summary>

**apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx:266**
* The updated condition for rendering the label may disable the label when scope.selectedSectionKeys has a length; please confirm that this logic accurately represents the desired user experience.
```
label={selectedPropertiesLoading || !!scope.selectedSectionKeys?.length || !scope.selectedSectionKeys ? (
```
**apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx:30**
* There is an inconsistency between using isCustomRecipientCounter in the memo and isSharingStep when rendering the counter; please ensure both conditions are aligned to reflect the intended UI behavior.
```
const newsSharingRecipientCounter = useMemo(() => <>{isCustomRecipientCounter && (
```
**apps/condo/domains/news/components/NewsForm/BaseNewsForm.tsx:518**
* [nitpick] The removal of the useInputWithCounter hook for Title and Body may affect user feedback regarding input length; please double-check that the simplified content entry still meets the design requirements.
```
const Title = useInputWithCounter(Input.TextArea, 150)
```
</details>


state: COMMENTED
author_association: NONE
submitted_at: 2025-04-07T16:17:09Z
user: login: toplenboren
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-07T16:20:17Z
user: login: Alexander-Turkin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T17:39:35Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>♻️ Duplicate comments (1)</summary><blockquote>

<details>
<summary>apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx (1)</summary><blockquote>

`41-41`: **Simplified conditional rendering logic**

The change from using a derived boolean (previously likely `isCustomRecipientCounter`) to directly checking `isSharingStep` makes the code more straightforward and maintainable.

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx (2)</summary><blockquote>

`29-35`: **Update useMemo dependency array for completeness**

The `isSharingStep` flag is used inside the useMemo hook but isn't included in the dependency array at line 36. This could lead to stale renders if `isSharingStep` changes but the memoized value doesn't update.

```diff
-    )}</>, [newsSharingConfig, sharingAppId, newsItemScopesNoInstance])
+    )}</>, [newsSharingConfig, sharingAppId, newsItemScopesNoInstance, isSharingStep])
```

---

`29-36`: **Consider separate function for clarity**

The conditional logic inside useMemo is slightly complex with nested conditions. Consider extracting this into a separate function for better readability and maintainability.

```diff
+   const renderNewsCounterContent = () => {
+     if (!isSharingStep) return null
+     
+     // TODO: (DOMA-11416) create RecipientCounter for no custom CountersUrl
+     if (!newsSharingConfig?.getRecipientsCountersUrl) return null
+     
+     return (
+       <MemoizedNewsSharingRecipientCounter
+         contextId={sharingAppId}
+         newsItemScopes={newsItemScopesNoInstance}
+       />
+     )
+   }
+
-   const newsSharingRecipientCounter = useMemo(() => <>{isSharingStep && (
-       // TODO: (DOMA-11416) create RecipientCounter for no custom CountersUrl
-       newsSharingConfig?.getRecipientsCountersUrl ? (
-           <MemoizedNewsSharingRecipientCounter
-               contextId={sharingAppId}
-               newsItemScopes={newsItemScopesNoInstance}
-           /> ) : null
-   )}</>, [newsSharingConfig, sharingAppId, newsItemScopesNoInstance])
+   const newsSharingRecipientCounter = useMemo(() => 
+     <>{renderNewsCounterContent()}</>, 
+     [newsSharingConfig, sharingAppId, newsItemScopesNoInstance, isSharingStep]
+   )
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between cbcad8bb982b71defc62b952b1374f5f30d5a6e4 and 972dcf13e5d2c5a9611ebb13637362e774182ec4.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (5)</summary>

* GitHub Check: Build open-source part (ubuntu-22.04, 16.x, 3.13)
* GitHub Check: Build open-source part (windows-latest, 16.x, 3.13)
* GitHub Check: Check dependencies integrity (16.x)
* GitHub Check: Semgrep vulnerabilities check
* GitHub Check: Lint source code (16.x)

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx (1)</summary>

`30-30`: **Good TODO note for future implementation**

The TODO comment for creating a RecipientCounter for cases without custom CountersUrl is clear and references a specific ticket number, which makes it easy to track in the future.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T17:44:59Z
user: login: tolmachev21
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T05:35:19Z
user: login: Alexander-Turkin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T05:41:18Z

Review comments:
diff_hunk: @@ -151,7 +151,7 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
     }
 
     const handleAllPropertiesLoading = useCallback((form: FormInstance) => (data) => {
-        if (!initialFormValues?.property || !initialFormValues?.properties || !initialFormValues?.hasAllProperties) return
+        if (initialFormValues?.property || initialFormValues?.properties?.length || initialFormValues?.hasAllProperties) return
path: apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx
user: login: Copilot
body: The revised condition in handleAllPropertiesLoading inverts the original check; please verify that returning early when any of these properties are truthy is the intended behavior.
created_at: 2025-04-07T16:17:08Z
author_association: NONE
diff_hunk: @@ -27,17 +27,19 @@ export const InputStepRecipientCounter: React.FC<InputStepRecipientCounterProps>
     const formFieldsColSpan = isMediumWindow ? 24 : 14
     const formInfoColSpan = 24 - formFieldsColSpan
 
-    const newsSharingRecipientCounter = useMemo(() => <>{newsSharingConfig?.getRecipientsCountersUrl && (
-        <MemoizedNewsSharingRecipientCounter
-            contextId={sharingAppId}
-            newsItemScopes={newsItemScopesNoInstance}
-        />
+    const newsSharingRecipientCounter = useMemo(() => <>{isCustomRecipientCounter && (
+        // TODO: (DOMA-11416) create RecipientCounter for no custom CountersUrl
+        newsSharingConfig?.getRecipientsCountersUrl ? (
path: apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx
user: login: toplenboren
body: You have isCustomRecipientCounter, have you not?
created_at: 2025-04-07T16:17:20Z
author_association: MEMBER
diff_hunk: @@ -301,15 +301,17 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
                             )}
                         </>
                     ) : (
-                        <GraphQlSearchInputWithCheckAll
-                            CheckAllMessage={CheckAllLabel}
-                            checkAllFieldName='hasAllCustom'
-                            selectProps={customSelectProps}
-                            checkAllInitialValue={initialValues?.hasAllCustom}
-                            onCheckBoxChange={customCheckboxChange()}
-                            form={form}
-                            selectFormItemProps={customSelectFormItemProps}
-                        />
+                        <Col span={24}>
path: apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx
user: login: toplenboren
body: why do u need a new col here?
created_at: 2025-04-07T16:20:07Z
author_association: MEMBER
diff_hunk: @@ -301,15 +301,17 @@ export const InputStepSelector: React.FC<InputStepSelectorProps> = ({
                             )}
                         </>
                     ) : (
-                        <GraphQlSearchInputWithCheckAll
-                            CheckAllMessage={CheckAllLabel}
-                            checkAllFieldName='hasAllCustom'
-                            selectProps={customSelectProps}
-                            checkAllInitialValue={initialValues?.hasAllCustom}
-                            onCheckBoxChange={customCheckboxChange()}
-                            form={form}
-                            selectFormItemProps={customSelectFormItemProps}
-                        />
+                        <Col span={24}>
path: apps/condo/domains/news/components/NewsForm/InputStep/InputStepSelector.tsx
user: login: Alexander-Turkin
body: so that GraphQlSearchInputWithCheckAll is stretched to entire block
created_at: 2025-04-07T17:39:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -21,28 +21,27 @@ export const InputStepRecipientCounter: React.FC<InputStepRecipientCounterProps>
     newsItemScopesNoInstance,
 }) => {
     const { breakpoints } = useLayoutContext()
-    const isCustomRecipientCounter = !!newsSharingConfig?.getRecipientsCountersUrl && isSharingStep
 
     const isMediumWindow = !breakpoints.DESKTOP_SMALL
     const formFieldsColSpan = isMediumWindow ? 24 : 14
     const formInfoColSpan = 24 - formFieldsColSpan
 
-    const newsSharingRecipientCounter = useMemo(() => <>{newsSharingConfig?.getRecipientsCountersUrl && (
-        <MemoizedNewsSharingRecipientCounter
-            contextId={sharingAppId}
-            newsItemScopes={newsItemScopesNoInstance}
-        />
+    const newsSharingRecipientCounter = useMemo(() => <>{isSharingStep && (
+        // TODO: (DOMA-11416) create RecipientCounter for no custom CountersUrl
+        newsSharingConfig?.getRecipientsCountersUrl ? (
+            <MemoizedNewsSharingRecipientCounter
+                contextId={sharingAppId}
+                newsItemScopes={newsItemScopesNoInstance}
+            /> ) : null
     )}</>, [newsSharingConfig, sharingAppId, newsItemScopesNoInstance])
 
     return (
-        <Col span={formInfoColSpan}>
-            <Row>
-                {isCustomRecipientCounter ? newsSharingRecipientCounter : (
-                    <HiddenBlock hide={newsItemScopesNoInstance.length <= 0}>
-                        <MemoizedRecipientCounter newsItemScopes={newsItemScopesNoInstance}/>
-                    </HiddenBlock>
-                )}
-            </Row>
+        <Col span={formInfoColSpan} className='recipient-counter'>
path: apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx
user: login: tolmachev21
body: Maybe use inline css? For example: 
<Col style={{ justify-items: "end" }}>

But I don't now, how be better
created_at: 2025-04-08T05:34:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -21,28 +21,27 @@ export const InputStepRecipientCounter: React.FC<InputStepRecipientCounterProps>
     newsItemScopesNoInstance,
 }) => {
     const { breakpoints } = useLayoutContext()
-    const isCustomRecipientCounter = !!newsSharingConfig?.getRecipientsCountersUrl && isSharingStep
 
     const isMediumWindow = !breakpoints.DESKTOP_SMALL
     const formFieldsColSpan = isMediumWindow ? 24 : 14
     const formInfoColSpan = 24 - formFieldsColSpan
 
-    const newsSharingRecipientCounter = useMemo(() => <>{newsSharingConfig?.getRecipientsCountersUrl && (
-        <MemoizedNewsSharingRecipientCounter
-            contextId={sharingAppId}
-            newsItemScopes={newsItemScopesNoInstance}
-        />
+    const newsSharingRecipientCounter = useMemo(() => <>{isSharingStep && (
+        // TODO: (DOMA-11416) create RecipientCounter for no custom CountersUrl
+        newsSharingConfig?.getRecipientsCountersUrl ? (
+            <MemoizedNewsSharingRecipientCounter
+                contextId={sharingAppId}
+                newsItemScopes={newsItemScopesNoInstance}
+            /> ) : null
     )}</>, [newsSharingConfig, sharingAppId, newsItemScopesNoInstance])
 
     return (
-        <Col span={formInfoColSpan}>
-            <Row>
-                {isCustomRecipientCounter ? newsSharingRecipientCounter : (
-                    <HiddenBlock hide={newsItemScopesNoInstance.length <= 0}>
-                        <MemoizedRecipientCounter newsItemScopes={newsItemScopesNoInstance}/>
-                    </HiddenBlock>
-                )}
-            </Row>
+        <Col span={formInfoColSpan} className='recipient-counter'>
path: apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx
user: login: Alexander-Turkin
body: Inline css is bad( I did not find option how do through antd so I had do this
created_at: 2025-04-08T05:41:18Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-04-07T16:09:56Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes update several components in the news form domain. In **BaseNewsForm.tsx**, character count management for the title and body fields has been removed by deleting associated constants and the useEffect hook. **InputStepForm.tsx** now always renders the title above the template selection by reorganizing its JSX structure. In **InputStepRecipientCounter.tsx**, the rendering condition for the recipient counter has been altered to rely on the `isSharingStep` flag, with an inline comment for future work. Meanwhile, **InputStepSelector.tsx** includes updated conditional checks for managing section keys, label display, and input disablement.

## Changes

| File(s)                                    | Change Summary                                                                                                                                                          |
|--------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| .../NewsForm/BaseNewsForm.tsx              | Removed character count management by deleting the `Title` & `Body` constants and the associated useEffect logic.                                                       |
| .../NewsForm/InputStepForm.tsx             | Reorganized JSX structure to render the title above the template selection, adjusting the layout without altering functionality.                                       |
| .../NewsForm/InputStepRecipientCounter.tsx | Revised conditional logic for rendering the recipient counter; now checks `isSharingStep` instead of a custom counter flag and includes a comment for future enhancements. |
| .../NewsForm/InputStepSelector.tsx         | Updated conditions for handling section keys, label display, and input enablement/disabling based on the presence and length of selected keys.                         |
| .../NewsForm/InputStep/index.tsx           | Updated import statement to include `Properties` type and refined type definition for `initialFormValues` in `InputStepProps`.                                        |
| .../NewsForm/InputStep/styles.css           | Added new CSS class `.recipient-counter` to set the `justify-items` property to `end`.                                                                                 |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant InputStepRecipientCounter
    participant NewsSharingRecipientCounter

    User->>InputStepRecipientCounter: Trigger component render
    alt isSharingStep is true
        InputStepRecipientCounter->>NewsSharingRecipientCounter: Render recipient counter
    else
        InputStepRecipientCounter->>User: Skip rendering recipient counter
    end
```

```mermaid
sequenceDiagram
    participant User
    participant InputStepSelector

    User->>InputStepSelector: Change section name or load properties
    InputStepSelector->>InputStepSelector: Check if sections exist (or are empty)
    alt Sections exist
        InputStepSelector->>InputStepSelector: Map sections to set selected section keys
    else 
        InputStepSelector->>InputStepSelector: Clear selected section keys
    end
```

## Suggested reviewers

- vovaaxeapolla
- YEgorLu
- toplenboren

## Poem

> I’m a bunny hopping through the code,  
> Carrots of changes in every mode.  
> I nibble away at conditional logic so neat,  
> Rearranged layouts make my heart beat.  
> In our code burrow, improvements brightly glow! 🐇✨

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 972dcf13e5d2c5a9611ebb13637362e774182ec4 and 5fe85d2fa1397e75509e72621b9b6fbaa0d81efe.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx` (2 hunks)
* `apps/condo/domains/news/components/NewsForm/InputStep/styles.css` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (1)</summary>

* apps/condo/domains/news/components/NewsForm/InputStep/styles.css

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* apps/condo/domains/news/components/NewsForm/InputStep/InputStepRecipientCounter.tsx

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (5)</summary>

* GitHub Check: Build open-source part (windows-latest, 16.x, 3.13)
* GitHub Check: Build open-source part (ubuntu-22.04, 16.x, 3.13)
* GitHub Check: Semgrep vulnerabilities check
* GitHub Check: Check dependencies integrity (16.x)
* GitHub Check: Build Docker Image

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk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ArOmwem1A0SMgW8b+cIAQa+QEnVW9iMoRiOUwnR64Y0DEiE06G9eOFIDdm0+9bJh9hwaK9CtRtlCsYgxY0di8TMq2Cp0QBdERlSydRgxVP8MBBBctW9lVhCyBFBeVVBSGmBKGqCvECtwlae6O7ttAh16jg1kAz1phfAM1u4DdURGgUhdiONL1FAURJ0ANdsejQ1hjsx/QDDyAJjuxFW5jljX1uNdjTVKaj529gu2jh109Wds9OdF1BxkNTxpxPd7x7dmGLRyNxdCipdDjmdp1WEYNTd11CT5xvd8NftjDKTqRaT0hetGNq12iRNXBpNfCAiBUghxGS6FUtNB0vjIkvIWwOw0goodYShnCKhgmnN4U3N2hvN72LhK49g9gjA+CdYSKGgQBgWdoOW1eFdG2DEb9tsfTuwgzyyCQUQK2izYsJuNhJRNECSPgQ8RYoZaMQg6W2YsgYAeczAud0F8g4KG0GkQ9dCDMD8W9UQsjfAv9XhkjpEvhWwqMBzAzojbNeBVVa90jL6KLcjcGCjdVSjtBjVQGEDczCzwCyzrVOjKzaz7AGzqmSN3BZNuUZGLTVNwj1SohbUXT9N8LZqDAdYtT7ByUqU6k9EWkXkOkHNCOaOwIXAVAYUE0A60U8gHcdkagCUTkArLkhkFwuAAA+oCIgNq9/pJLQrQNq69IrSpAYBq52MBasGUPCLUHQGgDawwJUEiN2PCAwN2LQIiHEAwAIN2HED2PCGgJUMiMiDUMiAABxxDdhJSGBWskBlBxACCRtoDdiIiRthu0CdiRuVACCdgCC0BEjwiVCIjAUkACDAWRudg4gZv5tVtRjORqSMACA4i0CRuqDdiZsCA1BlAIwMDwjIj+vAVDtdg1CVBxDAWBuIi0A2vwgkCVBxuWvNvdgRtFtxBdgkDAW0DIgMA2vusVAVsCBdjwidg1CdiDskA1DjtlCZuiCLtNsQCQBTskCRvbvIgrFdirtXvAXAWIjdhXvIiDtlD+sCDwjJtoBoAzuRtlD0qeAWsauBTqC6uMQGvQw1R0DasaRxtAA= -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=open-condo-software/condo&utm_content=6020):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai plan` to trigger planning for file edits and PR creation.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: sonarqubecloud[bot]
created_at: 2025-04-07T18:08:00Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=open-condo-software_condo&pullRequest=6020) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [1 New issue](https://sonarcloud.io/project/issues?id=open-condo-software_condo&pullRequest=6020&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=open-condo-software_condo&pullRequest=6020&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=open-condo-software_condo&pullRequest=6020&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=open-condo-software_condo&pullRequest=6020&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=open-condo-software_condo&pullRequest=6020&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=open-condo-software_condo&pullRequest=6020)


author_association: NONE