Skip to content

Relaxing sync validation#2969

Closed
raymon1 wants to merge 1 commit intofacebook:mainfrom
raymon1:feature/relaxing_sync_validation
Closed

Relaxing sync validation#2969
raymon1 wants to merge 1 commit intofacebook:mainfrom
raymon1:feature/relaxing_sync_validation

Conversation

@raymon1
Copy link
Copy Markdown
Contributor

@raymon1 raymon1 commented Mar 26, 2025

Description

Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
# Field Validation Change
1 Description ALL Cap Remove
2 Description length(5000) Remove
3 Price If missing Remove
4 Title length(150) Remove
5 validate_product_visibility if hidden Keep for now (we need to sync items as hidden in case they are not visible)
6 Out of stock if woocommerce_hide_out_of_stock_items we don't sync Removed in another PR
7 product_status ALL Cap Keep (part of other efforts)
8 validate_product_sync_field Keep
9 validate_product_terms Check whether the product's categories or tags (terms) exclude it from sync. Keep

Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active

Screenshots

Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate

Before

In the before nothing synced showing error in the meta_box component

After

image https://www.facebook.com/commerce/catalogs/955650953442091/products

As you can see, I have synced items with different validations to ensure syncing is happening

Test instructions

Create a product with a validation issue and try saving and check if it's being synced or not

Checklist

  • I followed general Pull Request best practices. Meta employees to follow this wiki
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests and all the new and existing unit tests pass locally with my changes
  • I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.

Changelog entry

Relaxing sync validations

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Hi @raymon1!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch from d5dc183 to 938ec5b Compare March 27, 2025 09:52
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch from 938ec5b to a291ccc Compare March 27, 2025 10:01
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@iodic iodic self-requested a review March 28, 2025 10:07
@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch from a291ccc to 37a3e7e Compare March 28, 2025 10:44
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@iodic
Copy link
Copy Markdown
Collaborator

iodic commented Mar 28, 2025

Hi @raymon1, can you share some of the background for the changes included in this changeset? As you mention for #5, some of these may not align with the users' expectations (which products get synced or not).

@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch 2 times, most recently from 8fb3a56 to 14f457b Compare April 7, 2025 12:27
@raymon1 raymon1 mentioned this pull request Apr 7, 2025
6 tasks
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch from 14f457b to 1358525 Compare April 8, 2025 09:22
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch from 1358525 to b6c4492 Compare April 8, 2025 09:42
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@raymon1 raymon1 force-pushed the feature/relaxing_sync_validation branch from b6c4492 to 8255399 Compare April 8, 2025 09:55
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@raymon1 merged this pull request in 58674fe.

facebook-github-bot pushed a commit that referenced this pull request Apr 8, 2025
Summary:
## Description

in #2969 the validations were relaxed, this might cause some backend issues. In this diff, in order to sync products, we are truncating any extra characters form the title and description

### Type of change
- New feature (non-breaking change which adds functionality)

## Checklist

- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)).
- [X] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
- [X] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)).

## Changelog entry

Truncates extra characters from title and description

Pull Request resolved: #3023

Test Plan:
Create item with more than the limits of 150 character for title and more than 5000 for description
Before:
The title/description will be missing
if both title and description are above limit, the item won't be synced

After:
Truncates (title/description)
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/4eb494c7-d070-485a-8b6d-e9ff187fedfb" />
synced
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/01b0a61d-3fe2-4a92-9a01-e2e263ad76a5" />

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before

### After

Reviewed By: vinkmeta, SayanPandey

Differential Revision: D72567584

Pulled By: raymon1

fbshipit-source-id: 17a6b279f1a3ce5d55237b885c3d349b9b6abdfb
SayanPandey pushed a commit to SayanPandey/facebook-for-woocommerce that referenced this pull request Apr 8, 2025
Summary:
## Description

Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

### Type of change

Please delete options that are not relevant.

- [X] New feature (non-breaking change which adds functionality)

| # | Field | Validation | Change |
| --- | --- | --- | ---|
| 1 | Description | ALL Cap | Remove |
| 2 | Description | length(5000) | Remove |
| 3 | Price | If missing | Remove|
| 4 | Title | length(150) | Remove |
| 5 | validate_product_visibility | if hidden| Keep for now (we need to sync items as hidden in case they are not visible) |
| 6 | Out of stock | if woocommerce_hide_out_of_stock_items we don't sync | Removed in another PR |
| 7 | product_status | ALL Cap | Keep (part of other efforts) |
| 8 | validate_product_sync_field| | Keep |
| 9 | validate_product_terms| Check whether the product's categories or tags (terms) exclude it from sync.| Keep |

Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before
In the before nothing synced showing error in the meta_box component

### After
<img width="1280" alt="image" src="https://github.com/user-attachments/assets/195d2190-cbbb-493c-aee4-94a9fb0bbaf8" />
https://www.facebook.com/commerce/catalogs/955650953442091/products

As you can see, I have synced items with different validations to ensure syncing is happening

## Test instructions

Create a product with a validation issue and try saving and check if it's being synced or not

## Checklist

- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc))
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have added tests and all the new and existing unit tests pass locally with my changes
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.

## Changelog entry

Relaxing sync validations

Pull Request resolved: facebook#2969

Reviewed By: vinkmeta

Differential Revision: D71912613

Pulled By: raymon1

fbshipit-source-id: 8e358749664d426f809711a889a6665d257f9a4c
vinkmeta pushed a commit that referenced this pull request Apr 13, 2025
Summary:
## Description

Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

### Type of change

Please delete options that are not relevant.

- [X] New feature (non-breaking change which adds functionality)

| # | Field | Validation | Change |
| --- | --- | --- | ---|
| 1 | Description | ALL Cap | Remove |
| 2 | Description | length(5000) | Remove |
| 3 | Price | If missing | Remove|
| 4 | Title | length(150) | Remove |
| 5 | validate_product_visibility | if hidden| Keep for now (we need to sync items as hidden in case they are not visible) |
| 6 | Out of stock | if woocommerce_hide_out_of_stock_items we don't sync | Removed in another PR |
| 7 | product_status | ALL Cap | Keep (part of other efforts) |
| 8 | validate_product_sync_field| | Keep |
| 9 | validate_product_terms| Check whether the product's categories or tags (terms) exclude it from sync.| Keep |

Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before
In the before nothing synced showing error in the meta_box component

### After
<img width="1280" alt="image" src="https://github.com/user-attachments/assets/195d2190-cbbb-493c-aee4-94a9fb0bbaf8" />
https://www.facebook.com/commerce/catalogs/955650953442091/products

As you can see, I have synced items with different validations to ensure syncing is happening

## Test instructions

Create a product with a validation issue and try saving and check if it's being synced or not

## Checklist

- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc))
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have added tests and all the new and existing unit tests pass locally with my changes
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.

## Changelog entry

Relaxing sync validations

Pull Request resolved: #2969

Reviewed By: vinkmeta

Differential Revision: D71912613

Pulled By: raymon1

fbshipit-source-id: 8e358749664d426f809711a889a6665d257f9a4c
vinkmeta pushed a commit that referenced this pull request Apr 13, 2025
Summary:
## Description

in #2969 the validations were relaxed, this might cause some backend issues. In this diff, in order to sync products, we are truncating any extra characters form the title and description

### Type of change
- New feature (non-breaking change which adds functionality)

## Checklist

- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)).
- [X] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
- [X] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)).

## Changelog entry

Truncates extra characters from title and description

Pull Request resolved: #3023

Test Plan:
Create item with more than the limits of 150 character for title and more than 5000 for description
Before:
The title/description will be missing
if both title and description are above limit, the item won't be synced

After:
Truncates (title/description)
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/4eb494c7-d070-485a-8b6d-e9ff187fedfb" />
synced
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/01b0a61d-3fe2-4a92-9a01-e2e263ad76a5" />

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before

### After

Reviewed By: vinkmeta, SayanPandey

Differential Revision: D72567584

Pulled By: raymon1

fbshipit-source-id: 17a6b279f1a3ce5d55237b885c3d349b9b6abdfb
vahidkay-meta pushed a commit that referenced this pull request Apr 14, 2025
Summary:
## Description

Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

### Type of change

Please delete options that are not relevant.

- [X] New feature (non-breaking change which adds functionality)

| # | Field | Validation | Change |
| --- | --- | --- | ---|
| 1 | Description | ALL Cap | Remove |
| 2 | Description | length(5000) | Remove |
| 3 | Price | If missing | Remove|
| 4 | Title | length(150) | Remove |
| 5 | validate_product_visibility | if hidden| Keep for now (we need to sync items as hidden in case they are not visible) |
| 6 | Out of stock | if woocommerce_hide_out_of_stock_items we don't sync | Removed in another PR |
| 7 | product_status | ALL Cap | Keep (part of other efforts) |
| 8 | validate_product_sync_field| | Keep |
| 9 | validate_product_terms| Check whether the product's categories or tags (terms) exclude it from sync.| Keep |

Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before
In the before nothing synced showing error in the meta_box component

### After
<img width="1280" alt="image" src="https://github.com/user-attachments/assets/195d2190-cbbb-493c-aee4-94a9fb0bbaf8" />
https://www.facebook.com/commerce/catalogs/955650953442091/products

As you can see, I have synced items with different validations to ensure syncing is happening

## Test instructions

Create a product with a validation issue and try saving and check if it's being synced or not

## Checklist

- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc))
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have added tests and all the new and existing unit tests pass locally with my changes
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.

## Changelog entry

Relaxing sync validations

Pull Request resolved: #2969

Reviewed By: vinkmeta

Differential Revision: D71912613

Pulled By: raymon1

fbshipit-source-id: 8e358749664d426f809711a889a6665d257f9a4c
vahidkay-meta pushed a commit that referenced this pull request Apr 14, 2025
Summary:
## Description

in #2969 the validations were relaxed, this might cause some backend issues. In this diff, in order to sync products, we are truncating any extra characters form the title and description

### Type of change
- New feature (non-breaking change which adds functionality)

## Checklist

- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)).
- [X] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
- [X] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)).

## Changelog entry

Truncates extra characters from title and description

Pull Request resolved: #3023

Test Plan:
Create item with more than the limits of 150 character for title and more than 5000 for description
Before:
The title/description will be missing
if both title and description are above limit, the item won't be synced

After:
Truncates (title/description)
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/4eb494c7-d070-485a-8b6d-e9ff187fedfb" />
synced
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/01b0a61d-3fe2-4a92-9a01-e2e263ad76a5" />

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before

### After

Reviewed By: vinkmeta, SayanPandey

Differential Revision: D72567584

Pulled By: raymon1

fbshipit-source-id: 17a6b279f1a3ce5d55237b885c3d349b9b6abdfb
mradmeta pushed a commit that referenced this pull request Apr 14, 2025
Summary:
## Description

Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

### Type of change

Please delete options that are not relevant.

- [X] New feature (non-breaking change which adds functionality)

| # | Field | Validation | Change |
| --- | --- | --- | ---|
| 1 | Description | ALL Cap | Remove |
| 2 | Description | length(5000) | Remove |
| 3 | Price | If missing | Remove|
| 4 | Title | length(150) | Remove |
| 5 | validate_product_visibility | if hidden| Keep for now (we need to sync items as hidden in case they are not visible) |
| 6 | Out of stock | if woocommerce_hide_out_of_stock_items we don't sync | Removed in another PR |
| 7 | product_status | ALL Cap | Keep (part of other efforts) |
| 8 | validate_product_sync_field| | Keep |
| 9 | validate_product_terms| Check whether the product's categories or tags (terms) exclude it from sync.| Keep |

Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before
In the before nothing synced showing error in the meta_box component

### After
<img width="1280" alt="image" src="https://github.com/user-attachments/assets/195d2190-cbbb-493c-aee4-94a9fb0bbaf8" />
https://www.facebook.com/commerce/catalogs/955650953442091/products

As you can see, I have synced items with different validations to ensure syncing is happening

## Test instructions

Create a product with a validation issue and try saving and check if it's being synced or not

## Checklist

- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc))
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have added tests and all the new and existing unit tests pass locally with my changes
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.

## Changelog entry

Relaxing sync validations

Pull Request resolved: #2969

Reviewed By: vinkmeta

Differential Revision: D71912613

Pulled By: raymon1

fbshipit-source-id: 8e358749664d426f809711a889a6665d257f9a4c
mradmeta pushed a commit that referenced this pull request Apr 14, 2025
Summary:
## Description

in #2969 the validations were relaxed, this might cause some backend issues. In this diff, in order to sync products, we are truncating any extra characters form the title and description

### Type of change
- New feature (non-breaking change which adds functionality)

## Checklist

- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)).
- [X] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
- [X] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)).

## Changelog entry

Truncates extra characters from title and description

Pull Request resolved: #3023

Test Plan:
Create item with more than the limits of 150 character for title and more than 5000 for description
Before:
The title/description will be missing
if both title and description are above limit, the item won't be synced

After:
Truncates (title/description)
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/4eb494c7-d070-485a-8b6d-e9ff187fedfb" />
synced
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/01b0a61d-3fe2-4a92-9a01-e2e263ad76a5" />

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before

### After

Reviewed By: vinkmeta, SayanPandey

Differential Revision: D72567584

Pulled By: raymon1

fbshipit-source-id: 17a6b279f1a3ce5d55237b885c3d349b9b6abdfb
rubycalling pushed a commit that referenced this pull request Apr 16, 2025
Summary:
## Description

Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

### Type of change

Please delete options that are not relevant.

- [X] New feature (non-breaking change which adds functionality)

| # | Field | Validation | Change |
| --- | --- | --- | ---|
| 1 | Description | ALL Cap | Remove |
| 2 | Description | length(5000) | Remove |
| 3 | Price | If missing | Remove|
| 4 | Title | length(150) | Remove |
| 5 | validate_product_visibility | if hidden| Keep for now (we need to sync items as hidden in case they are not visible) |
| 6 | Out of stock | if woocommerce_hide_out_of_stock_items we don't sync | Removed in another PR |
| 7 | product_status | ALL Cap | Keep (part of other efforts) |
| 8 | validate_product_sync_field| | Keep |
| 9 | validate_product_terms| Check whether the product's categories or tags (terms) exclude it from sync.| Keep |

Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before
In the before nothing synced showing error in the meta_box component

### After
<img width="1280" alt="image" src="https://github.com/user-attachments/assets/195d2190-cbbb-493c-aee4-94a9fb0bbaf8" />
https://www.facebook.com/commerce/catalogs/955650953442091/products

As you can see, I have synced items with different validations to ensure syncing is happening

## Test instructions

Create a product with a validation issue and try saving and check if it's being synced or not

## Checklist

- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc))
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have added tests and all the new and existing unit tests pass locally with my changes
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.

## Changelog entry

Relaxing sync validations

Pull Request resolved: #2969

Reviewed By: vinkmeta

Differential Revision: D71912613

Pulled By: raymon1

fbshipit-source-id: 8e358749664d426f809711a889a6665d257f9a4c
rubycalling pushed a commit that referenced this pull request Apr 16, 2025
Summary:
## Description

in #2969 the validations were relaxed, this might cause some backend issues. In this diff, in order to sync products, we are truncating any extra characters form the title and description

### Type of change
- New feature (non-breaking change which adds functionality)

## Checklist

- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
- [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)).
- [X] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
- [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
- [X] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)).

## Changelog entry

Truncates extra characters from title and description

Pull Request resolved: #3023

Test Plan:
Create item with more than the limits of 150 character for title and more than 5000 for description
Before:
The title/description will be missing
if both title and description are above limit, the item won't be synced

After:
Truncates (title/description)
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/4eb494c7-d070-485a-8b6d-e9ff187fedfb" />
synced
<img width="2056" alt="image" src="https://github.com/user-attachments/assets/01b0a61d-3fe2-4a92-9a01-e2e263ad76a5" />

## Screenshots
Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate
### Before

### After

Reviewed By: vinkmeta, SayanPandey

Differential Revision: D72567584

Pulled By: raymon1

fbshipit-source-id: 17a6b279f1a3ce5d55237b885c3d349b9b6abdfb
@tzahgr tzahgr mentioned this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants