Skip to content

Conversation

@jperals
Copy link
Member

@jperals jperals commented Nov 14, 2025

Description

Ticket: AWSUI-61464
Dry run: 7600116220

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (567860d) to head (bb8a6c8).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4039   +/-   ##
=======================================
  Coverage   96.99%   96.99%           
=======================================
  Files         861      861           
  Lines       25207    25209    +2     
  Branches     9098     9099    +1     
=======================================
+ Hits        24450    24452    +2     
- Misses        710      751   +41     
+ Partials       47        6   -41     

☔ 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.

@jperals jperals marked this pull request as ready for review November 17, 2025 07:35
@jperals jperals requested a review from a team as a code owner November 17, 2025 07:35
@jperals jperals requested review from avinashbot and pan-kot and removed request for a team November 17, 2025 07:35
detail: {
operation: 'and',
tokenGroups: [{ propertyKey: 'other-string', operator: '=', value: null }],
tokenGroups: [{ propertyKey: 'other-string', operator: '=', value: '' }],
Copy link
Member

@pan-kot pan-kot Nov 17, 2025

Choose a reason for hiding this comment

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

This fixes the issue for string properties, but breaks enum and custom properties, see: #4041

Copy link
Member Author

@jperals jperals Nov 18, 2025

Choose a reason for hiding this comment

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

Thanks. Changed the logic based on the expected behavior of those tests (empty array for enum and null for custom properties). Also refactored into one test for each.

I rely on the presence of a form property in order to infer a custom property (see token-editor.tsx below? Is there a better way? Nor the internal operator, which is a string, nor the matchedProperty, which is of type InternalFilteringProperty, have enough information about this, and the PropertyFilterTokenType type returned by property.getTokenType only knows about value or enum.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, relying on the form sounds good 👍

: allowedOperators[0];
const matchedProperty = filteringProperties.find(property => property.propertyKey === newPropertyKey) ?? null;
setTemporaryToken({ ...temporaryToken, property: matchedProperty, operator, value: null });
const isCustomType = !!matchedProperty?.externalProperty.operators?.find(
Copy link
Member

Choose a reason for hiding this comment

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

The matchedProperty is of internal property type. It supports derived properties for better ergonomics, so there is no need to find the form like this. Instead, you can either check for getValueFormRenderer(operator) prop, or even extend the getTokenType() to return "value" | "enum" | "custom".

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, thanks. Updated to use getValueFormRenderer.

@jperals jperals added this pull request to the merge queue Nov 20, 2025
Merged via the queue into main with commit 1e40736 Nov 20, 2025
49 checks passed
@jperals jperals deleted the fix/property-filter-token-null branch November 20, 2025 09:50
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