FrancescoCastaldi commented on PR #44894:
URL: https://github.com/apache/superset/pull/44894#issuecomment-6152780137

   Hi @aminghadersohi,
   
   I have pushed commit 844d017 addressing all three review comments on this PR:
   
   1. SelectValue harmonization (types.ts):
   Harmonized SelectValue to explicitly include LabeledValue and 
LabeledValue[]. This preserves external consumer contracts (such as 
SelectAsyncControl/index.tsx) and resolves TS2322 without modifying consumer 
files, while fully satisfying the AsyncSelect and Select test suites.
   
   2. Storybook props typing (AsyncSelect.stories.tsx):
   Typed the WithAllowNewOptions story arguments with Omit<AsyncSelectProps, 
'ref'>, eliminating the ref mismatch between BaseSelectProps and AsyncSelectRef 
during arg spreading.
   
   3. Refined equality invariant in isEqual (utils.tsx):
   Conditioned trimmed string comparisons on trimmedA.length > 0 && trimmedA 
=== trimmedB, and added explicit guards for numeric zero comparisons against 
empty or whitespace strings. This ensures:
   * isEqual('', ' ') === false
   * isEqual(' ', '   ') === false
   * isEqual('', '') === true and isEqual(' ', ' ') === true
   * isEqual(' Sales ', 'Sales') === true (preserving intended label 
deduplication)
   * isEqual(0, '') === false while isEqual(0, '0') === true
   
   Validation and test evidence:
   * Test suite: 224/224 unit tests passing across constants, utils, Select, 
and AsyncSelect.
   * Static typing: TypeScript compilation check completes with 0 errors (0 
TS2322).
   * Dedicated regression tests added to utils.test.ts covering whitespace and 
numeric boundary conditions.
   
   The branch fix/asyncselect-drop-duplicate-new-option is updated and ready 
for your re-review.
   
   Best regards,
   Francesco Castaldi
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to