Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tplevko
Copy link
Contributor

@tplevko tplevko commented Aug 14, 2025

fixes #1800

vokoscreenNG-2025-08-14_13-57-32.mp4

@codecov
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.17%. Comparing base (59566ab) to head (8b41865).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...ages/ui/src/components/XPath/XPathEditorLayout.tsx 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2449      +/-   ##
==========================================
+ Coverage   81.96%   82.17%   +0.20%     
==========================================
  Files         471      474       +3     
  Lines       15067    15205     +138     
  Branches     3335     3363      +28     
==========================================
+ Hits        12350    12494     +144     
+ Misses       2715     2544     -171     
- Partials        2      167     +165     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tplevko tplevko marked this pull request as draft August 14, 2025 11:52
@tplevko tplevko requested a review from a team August 14, 2025 15:03
@tplevko tplevko marked this pull request as ready for review August 14, 2025 15:03
Comment on lines +48 to +55
const searchInputRef = useRef<HTMLInputElement>(null);
const [searchValue, setSearchValue] = useState('');
const focusOnSearchInput = useCallback(() => {
searchInputRef.current?.focus();
}, []);
const handleOnSearchChange = useCallback((_event: unknown, value: string) => {
setSearchValue(value);
}, []);
Copy link
Member

Choose a reason for hiding this comment

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

Do you see similarities with the Catalog search? I wonder if we could have a custom hook to handle search so we have this logic only once 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked and it doesn't seem like there are too many similarities in the way the search is handled in these two cases for the creation of custom hook to be of interest.

)
.map((func, index) => (
<DraggableContainer
key={index}
Copy link
Member

Choose a reason for hiding this comment

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

Please let's avoid using index if possible, I think it would be better to use the value + func.name as the key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated.

label={value}
hidden={
!functionDefinitions[value as FunctionGroup].some((func) =>
func.displayName.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()),
Copy link
Member

Choose a reason for hiding this comment

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

Could we transform the searchValue to lowercase once and then use it? This way we would save some work

Copy link
Contributor Author

@tplevko tplevko Aug 15, 2025

Choose a reason for hiding this comment

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

Thanks for the hint, updated.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 15, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@lordrip lordrip merged commit 0ae19f8 into KaotoIO:main Aug 18, 2025
13 checks passed
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.

Search in function list

3 participants