Skip to content

Conversation

@frapuks
Copy link
Member

@frapuks frapuks commented Dec 19, 2025

Proposed changes

  • refacto objectOrganisationFIeld jsx to tsx

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

@frapuks frapuks self-assigned this Dec 19, 2025
@frapuks frapuks added the filigran team use to identify PR from the Filigran team label Dec 19, 2025
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.80%. Comparing base (b819f20) to head (8617533).
⚠️ Report is 508 commits behind head on master.

Files with missing lines Patch % Lines
...components/common/form/ObjectOrganizationField.tsx 57.14% 6 Missing ⚠️
...nts/settings/users/edition/UserEditionOverview.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13781   +/-   ##
=======================================
  Coverage   30.79%   30.80%           
=======================================
  Files        2907     2907           
  Lines      192125   192166   +41     
  Branches    39165    39187   +22     
=======================================
+ Hits        59166    59188   +22     
- Misses     132959   132978   +19     
Flag Coverage Δ
opencti 30.80% <50.00%> (+<0.01%) ⬆️
opencti-front 2.47% <50.00%> (+0.01%) ⬆️
opencti-graphql 68.19% <ø> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SamuelHassine SamuelHassine force-pushed the master branch 8 times, most recently from 1c222ef to 2cb4539 Compare January 10, 2026 19:59
// Deprecated - https://mui.com/system/styles/basics/
// Do not use it for new code.
const useStyles = makeStyles(() => ({
const useStyles = makeStyles<Theme>(() => ({
Copy link
Member

Choose a reason for hiding this comment

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

makeStyles is deprecated, you should rather integrate the styles directly in the html :)

const handleChangeObjectOrganization = (
name: string,
values: { label: string; value: string }[],
value: FieldOption[],
Copy link
Member

Choose a reason for hiding this comment

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

you can keep the denomination 'values' since it's an array

const handleChangeObjectOrganization = (
name: string,
values: { label: string; value: string }[],
value: FieldOption[],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
value: FieldOption[],
values: FieldOption[],

setOrganizations(searchResults);
});
const searchOrganizations = (event?: SyntheticEvent<Element, Event>) => {
if (event?.target instanceof HTMLInputElement) {
Copy link
Member

Choose a reason for hiding this comment

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

you are changing the behavior with this if, you can remove it if you event is typed correctly (BaseSyntheticEvent)

}));
setOrganizations(searchResults);
});
const searchOrganizations = (event?: SyntheticEvent<Element, Event>) => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const searchOrganizations = (event?: SyntheticEvent<Element, Event>) => {
const searchOrganizations = (event?: BaseSyntheticEvent) => {

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

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants