Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tagoverflow typescript conversion #5715

Merged
merged 12 commits into from
Jul 30, 2024

Conversation

davidmenendez
Copy link
Contributor

Closes #5673

@davidmenendez davidmenendez requested a review from a team as a code owner July 23, 2024 19:40
@davidmenendez davidmenendez requested review from elycheea and amal-k-joy and removed request for a team July 23, 2024 19:40
Copy link

netlify bot commented Jul 23, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 6e08291
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/66a3d3653796c90008746220
😎 Deploy Preview https://deploy-preview-5715--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@amal-k-joy amal-k-joy left a comment

Choose a reason for hiding this comment

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

Good work
Please see some minor comments

onOverflowTagChange = defaults.onOverflowTagChange,

// Collect any other property values passed in.
overflowType,
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, Looks like overflowType is an optional prop and we were using a default value as 'default' , and now you have removed passing default values.
Will that affect the behaviour?
Can we pass just like overflowType = 'default'
Please check other props as well where default values have been removed

@@ -292,7 +286,7 @@ const tagTypes = Object.keys(TYPES);
*/
export const string_required_if_more_than_10_tags = isRequiredIf(
PropTypes.string,
({ items }) => items && items.length > allTagsModalSearchThreshold
({ items }) => items && items?.length > allTagsModalSearchThreshold
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey , do you think just this is enough, though both works?
({ items }) => items?.length > allTagsModalSearchThreshold

);
};

const visibleItems = getOverflowPopoverItems();
const hasItems = visibleItems && visibleItems?.length > 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as above
const hasItems = visibleItems?.length > 0;

@davidmenendez davidmenendez requested a review from amal-k-joy July 29, 2024 16:51
@davidmenendez
Copy link
Contributor Author

@amal-k-joy please re-review when you have a chance. ty!

id: string;
label: string;
onClose: () => void;
tagType?:
Copy link
Member

Choose a reason for hiding this comment

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

If possible we should try to import this from @carbon/react.

maxVisible?: number;
measurementOffset?: number;
multiline?: boolean;
overflowAlign?:
Copy link
Member

Choose a reason for hiding this comment

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

If possible we should try to import this from @carbon/react.

Copy link
Member

@matthewgallo matthewgallo left a comment

Choose a reason for hiding this comment

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

Found some types that we might be able to just pull in from @carbon/react, but we can open a separate issue.

@matthewgallo matthewgallo added this pull request to the merge queue Jul 30, 2024
Merged via the queue into carbon-design-system:main with commit 35ea4c4 Jul 30, 2024
19 checks passed
@davidmenendez davidmenendez deleted the tagoverflow-tsx branch July 30, 2024 20:00
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.

Add Typescript types to TagOverflow
3 participants