Skip to content

feat: deprecate legacy Facebook product fields for new products#2927

Closed
devbodaghe wants to merge 3 commits intofacebook:mainfrom
devbodaghe:deprecate_facebook_custom_fields
Closed

feat: deprecate legacy Facebook product fields for new products#2927
devbodaghe wants to merge 3 commits intofacebook:mainfrom
devbodaghe:deprecate_facebook_custom_fields

Conversation

@devbodaghe
Copy link
Copy Markdown
Contributor

Deprecate Facebook Product Fields and Improve UX

Description

This PR implements a conditional rendering approach for legacy Facebook product fields while deprecating them for new products. This change aims to provide a smoother transition away from deprecated fields while maintaining functionality for existing products that rely on them.

Changes Made:

  • Added conditional rendering for Facebook product fields (Description, Custom Image URL, Facebook Price)
  • Fields will only display for products that already have values stored
  • Removed these fields from new product creation flow
  • Added a dismissible deprecation notice to inform users about the upcoming removal of these fields
  • Moved inline styles to dedicated CSS file for better maintainability

Technical Details:

  • Fields are shown only when FB Image URL, Description, Price evaluates true
  • Added clear deprecation messaging to help users understand the transition
  • Improved code organization by separating presentation logic from business logic

Testing:

  1. Existing products with Facebook fields should:

    • See the deprecation notice
    • Still have access to previously configured fields
    • Be able to edit existing values
  2. New products should:

    • Not see the deprecated fields
    • Use the new recommended workflow for Facebook product management
  3. All products should maintain their current Facebook catalog sync status

Screenshots

Existing Product Edit Screen

Screenshot 2025-03-06 at 12 13 46 *All Facebook fields visible regardless of whether they were being used*

New Product Screen

Screenshot 2025-03-06 at 12 13 46 *Showing all deprecated fields on new product creation*

After Changes

Existing Product with Facebook Fields

Screenshot 2025-03-06 at 12 03 17

Only showing fields that were previously configured, with deprecation notice

New Product Screen

Screenshot 2025-03-06 at 12 03 17

Clean interface without deprecated fields

Existing Product without Facebook Fields

Screenshot 2025-03-06 at 12 03 46

Similar to new product screen, showing only current supported fields

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe 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

@devbodaghe has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe 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

@devbodaghe merged this pull request in eaccf0c.

facebook-github-bot pushed a commit that referenced this pull request Mar 11, 2025
)

Summary:
# Revert: Deprecate Legacy Facebook Product Fields for New Products

## Description

This pull request reverts the changes introduced in commit `feat: deprecate legacy Facebook product fields for new products` #2927. The original commit deprecated fb specific fields in product creation.

Pull Request resolved: #2932

Reviewed By: SayanPandey

Differential Revision: D70962783

Pulled By: devbodaghe

fbshipit-source-id: f11622ff1395df5da67db76473ca904877173645
tzahgr pushed a commit that referenced this pull request Apr 1, 2025
Summary:
# Deprecate Facebook Product Fields and Improve UX

## Description
This PR implements a conditional rendering approach for legacy Facebook product fields while deprecating them for new products. This change aims to provide a smoother transition away from deprecated fields while maintaining functionality for existing products that rely on them.

### Changes Made:
- Added conditional rendering for Facebook product fields (Description, Custom Image URL, Facebook Price)
- Fields will only display for products that already have values stored
- Removed these fields from new product creation flow
- Added a dismissible deprecation notice to inform users about the upcoming removal of these fields
- Moved inline styles to dedicated CSS file for better maintainability

### Technical Details:
- Fields are shown only when FB Image URL, Description, Price evaluates true
- Added clear deprecation messaging to help users understand the transition
- Improved code organization by separating presentation logic from business logic

### Testing:
1. Existing products with Facebook fields should:
   - See the deprecation notice
   - Still have access to previously configured fields
   - Be able to edit existing values

2. New products should:
   - Not see the deprecated fields
   - Use the new recommended workflow for Facebook product management

3. All products should maintain their current Facebook catalog sync status

## Screenshots
#### Existing Product Edit Screen
<img width="603" alt="Screenshot 2025-03-06 at 12 13 46" src="https://github.com/user-attachments/assets/fa884306-e448-42f3-8d90-ef36f2277b16" />
*All Facebook fields visible regardless of whether they were being used*

#### New Product Screen

<img width="603" alt="Screenshot 2025-03-06 at 12 13 46" src="https://github.com/user-attachments/assets/837a4681-64c2-46cc-b306-cb296d2a9ac0" />
*Showing all deprecated fields on new product creation*

### After Changes
#### Existing Product with Facebook Fields
<img width="618" alt="Screenshot 2025-03-06 at 12 03 17" src="https://github.com/user-attachments/assets/1ec98723-8db6-4e9e-b1a7-80a83fc3b2ed" />

*Only showing fields that were previously configured, with deprecation notice*

#### New Product Screen

<img width="618" alt="Screenshot 2025-03-06 at 12 03 17" src="https://github.com/user-attachments/assets/3cf9b2fe-f66b-4d16-9f79-1105db0dead2" />

*Clean interface without deprecated fields*

#### Existing Product without Facebook Fields

<img width="603" alt="Screenshot 2025-03-06 at 12 03 46" src="https://github.com/user-attachments/assets/f12ac1d7-f7a9-4fd9-a3c6-3b2ed381e1ff" />

*Similar to new product screen, showing only current supported fields*

Pull Request resolved: #2927

Reviewed By: SayanPandey

Differential Revision: D70699295

Pulled By: devbodaghe

fbshipit-source-id: b2a156978095b8334b9b2772d4e87fe9354dea11
tzahgr pushed a commit that referenced this pull request Apr 1, 2025
)

Summary:
# Revert: Deprecate Legacy Facebook Product Fields for New Products

## Description

This pull request reverts the changes introduced in commit `feat: deprecate legacy Facebook product fields for new products` #2927. The original commit deprecated fb specific fields in product creation.

Pull Request resolved: #2932

Reviewed By: SayanPandey

Differential Revision: D70962783

Pulled By: devbodaghe

fbshipit-source-id: f11622ff1395df5da67db76473ca904877173645
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.

2 participants