core icon indicating copy to clipboard operation
core copied to clipboard

Suggestion Component Refactor

Open rjvelazco opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. The suggestion menu is been used in different components, you can see it in the Block Editor design.

The problem is that the 'suggestions' component was meant to belong to the 'floating menu plugins'; Now that we use it in different components, it's getting difficult to maintain due to new @input we need to modify some behaviors.

suggestion-menu-inputs.png

Describe the solution you'd like We must consider that the suggestions menu is made up of three components:

  • Suggestions
  • List suggestions
  • Suggestion list item

What we need to do is rename Suggestion to ContentletsSuggestion and create a new component called PageSuggestion; reusing child components and as much logic as possible.

Describe alternatives you've considered We can also use ng-content approach but we must consider that the suggestion component is created dynamically by the floating menu. If we follow this approach we have to make sure that the floating menu works normally.

Additional context This issue was created because there are different components in the block-editor that shares similar functionality to the suggestion component, and this will allow us to better reuse code.

Floating Menu Suggestions Link Form Suggestions
suggestion-menu.png link-form-suggestions.png

rjvelazco avatar Aug 02 '22 21:08 rjvelazco

Hey team! Please add your planning poker estimate with ZenHub @hmoreras @oidacra @fmontes

rjvelazco avatar Aug 02 '22 21:08 rjvelazco