Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(endpoint): Add constructors for filter classes #3295

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Feb 27, 2025

These were added to the Flow versions but not copied back to Hilla. They still are useful when you work with the filter classes yourself

These were added to the Flow versions but not copied back to Hilla. They still are useful when you work with the filter classes yourself
@Artur- Artur- requested a review from cromoteca February 27, 2025 13:19
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.89%. Comparing base (d87eb73) to head (95ac7dd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3295   +/-   ##
=======================================
  Coverage   86.89%   86.89%           
=======================================
  Files         115      115           
  Lines        8287     8287           
  Branches     1269     1269           
=======================================
  Hits         7201     7201           
  Misses       1072     1072           
  Partials       14       14           
Flag Coverage Δ
unittests 86.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Artur-
Copy link
Member Author

Artur- commented Feb 28, 2025

This is to allow using a Hilla service from Flow as

comboBox.setItemsPageable((pageable, filterString) -> productService.list(pageable, new PropertyStringFilter("name", Matcher.CONTAINS, filterString)));

instead of

comboBox.setItemsPageable((pageable, filterString) -> {
  PropertyStringFilter filter = new PropertyStringFilter();
  filter.setPropertyId("name");
  filter.setMatcher(PropertyStringFilter.Matcher.CONTAINS);
  filter.setFilterValue(filterString);
  return productService.list(pageable, filter);
});

@platosha platosha changed the title chore: Add constructors for filter classes feat(endpoint): Add constructors for filter classes Feb 28, 2025
Copy link
Contributor

@platosha platosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate this small and nice feature, thanks! However, it needs some tests.

@platosha
Copy link
Contributor

platosha commented Feb 28, 2025

I appreciate this small and nice feature, thanks! However, it needs some tests.

A unit test would be enough, I think.

@Artur-
Copy link
Member Author

Artur- commented Mar 1, 2025

What should it test?

@platosha
Copy link
Contributor

platosha commented Mar 3, 2025

What should it test?

Constructors invoked within the use case outlined above: #3295 (comment)

@Artur-
Copy link
Member Author

Artur- commented Mar 3, 2025

Updated tests to use the constructors

Copy link

sonarqubecloud bot commented Mar 3, 2025

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