Skip to content

Add support to convert column control to responsive node and process responsiveGrid#233

Open
asamaraie wants to merge 1 commit intoadobe:mainfrom
asamaraie:feature/add-responsivegrid-support-to-column-control
Open

Add support to convert column control to responsive node and process responsiveGrid#233
asamaraie wants to merge 1 commit intoadobe:mainfrom
asamaraie:feature/add-responsivegrid-support-to-column-control

Conversation

@asamaraie
Copy link

@asamaraie asamaraie commented Jan 7, 2025

Description

Due to how the rewriting a tree functions, when using the Responsive logic, the parent node order is not preserved. There becomes a conflict between the Column Control order being overwritten by the tree traversal.

Need to find a way to apply the Responsive handling for the Column Control rewriter, without losing the order.

Changes

  • Recursive call to find other column controls in the page and process them.
  • Find the column start, break and end nodes and copy the content accordingly
  • Add back the responsive column control conversation OSGI configurations prompt
  • Preserve the order of the nodes in the tree after conversion.

Related Issue

Support responsiveGrid

Motivation and Context

I noticed that the current column control conversion OSGI configuration doesn't support the responsiveGrid. I added it back to allow users to use it instead of creating new columns if they choose to. It also support having multiple column controls in the page and process them correctly now. previously it was only process one column control that exist in the page

How Has This Been Tested?

I test this locally by using the all-in-one conversion.

  • need to write unit-test

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

- recursive call to find other column controls in the page and process them.
- find the column start, break and end nodes and copy the content accordingly
@asamaraie
Copy link
Author

@bstopp Could you please take a look at this PR. I have fixed this issue while I was customizing the column control rewrite rule.

@bstopp
Copy link
Contributor

bstopp commented Jan 8, 2025

Need unit tests for this.

@bstopp
Copy link
Contributor

bstopp commented Jan 9, 2025

Just out of curiosity, what drove you to needing this change? working on a project or?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants