Skip to content

Conversation

@AbhishekA1509
Copy link
Member

Description

This pull request introduces enhancements to the SelectPicker component suite, focusing on improved support for user identifier options and minor improvements in API utility. The primary change is the introduction of an isUserIdentifier prop, enabling custom rendering (including avatars or icons) for options that represent user identifiers, such as API tokens. Additionally, there is a small update to the cluster options API utility to support request cancellation.

SelectPicker user identifier support:

  • Added the isUserIdentifier prop to SelectPicker, FilterSelectPicker, and their respective prop types, enabling special rendering for options that represent user identifiers. [1] [2] [3] [4]
  • Updated the option rendering logic in SelectPickerOption to display an avatar or icon for user identifier options, and to extract and display the username for API tokens. [1] [2]
  • Ensured the isUserIdentifier prop is properly passed through all relevant components and used as a dependency in memoized callbacks. [1] [2] [3]
  • Updated type definitions to restrict isUserIdentifier usage to multi-select mode only.

Utility and import improvements:

  • Updated imports in common.tsx to include getAlphabetIcon and API_TOKEN_PREFIX for rendering and parsing user identifier options.

API utility update:

  • Modified getClusterOptions to accept an optional AbortSignal, allowing for request cancellation.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

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.

3 participants