[MGNLUI-5941] Extract VaadinLookup into production code Created: 09/Jun/20  Updated: 12/Jan/23  Resolved: 12/Jan/23

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 4m
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

VaadinLookup is a test utility to search for components in hierarchy. 
There are similar needs in the production code as well:

The class will need some cleaning up, before it's moved. There's logic that is fairly duplicit 

  • info.magnolia.ui.VaadinLookup#find
  • info.magnolia.ui.VaadinLookup#findComponents(com.vaadin.ui.Component, java.util.function.Predicate<com.vaadin.ui.Component>, java.util.Set<T>)

but there are differences. Some of the methods and their overloaders only pick the first found component, other pick first and if there's more they throw exceptions, or they return a set. What options to offer needs to be considered and duplicities removed.

A related class to VaadinLookup that should be extracted with it in some neat package is MultiValueProperty and more might be coming. Think of good packaging and placement for the whole group.


Generated at Mon Feb 12 09:31:34 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.