Skip to content

Conversation

@harikakondur
Copy link
Contributor

  • replacing select with multiselect component for content type picker modal
  • removing SelectedContentTypes type, using ContentTypeProps cma type instead

https://contentful.atlassian.net/browse/INTEG-3378

Screen.Recording.2025-12-30.at.9.39.37.PM.mov
Screenshot 2025-12-30 at 9 39 33 PM

@harikakondur harikakondur marked this pull request as ready for review December 30, 2025 16:10
@harikakondur harikakondur requested a review from a team as a code owner December 30, 2025 16:10
@@ -1,9 +1,9 @@
import { useState, useCallback } from 'react';
import { SelectedContentType } from '../locations/Page/components/modals/step_2/SelectContentTypeModal';
import { ContentTypeProps } from 'contentful-management';
Copy link
Contributor

Choose a reason for hiding this comment

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

nice 💪

@harikakondur harikakondur changed the title fix: replacing select with multiselect for content type picker modal [INTEG fix: replacing select with multiselect for content type picker modal [INTEG-3378] Dec 30, 2025
Comment on lines 142 to 148
isLoading
? 'Loading content types...'
: contentTypes.length === 0
? 'No content types in space'
: selectedContentTypes.length === 0
? 'Select one or more'
: `${selectedContentTypes.length} selected`
Copy link
Contributor

Choose a reason for hiding this comment

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

nested turnaries are hard for me to read to be honest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a helper function getPlaceHoldertext()

  const getPlaceholderText = () => {
    if (isLoading) return 'Loading content types...';
    if (contentTypes.length === 0) return 'No content types in space';
    if (selectedContentTypes.length === 0) return 'Select one or more';
    return `${selectedContentTypes.length} selected`;
  };

@harikakondur harikakondur merged commit 563ed5a into google-docs-xmas-fb Dec 30, 2025
6 checks passed
@harikakondur harikakondur deleted the update-ct-picker branch December 30, 2025 17:22
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