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

Fix(Dropdown): Made the titleText required property #17854

Merged

Conversation

Thamjith
Copy link
Contributor

Closes #17843

This PR makes the titleText an optional property in the propTypes, since we are only showing titleText conditionally.

Changelog

Changed

  • Made the titleText optional in propTypes.

Testing / Reviewing

  • Remove the titleText property from in "packages/react/src/components/Dropdown/Dropdown.stories.js"
  • Navigate to the packages/react directory using cd packages/react and run yarn storybook
  • Check the console in browsers's developer tools

Copy link
Contributor

github-actions bot commented Oct 23, 2024

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@Thamjith
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit d54f8c4
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/671fa4e37a5dfc00098ebcd7
😎 Deploy Preview https://deploy-preview-17854--v11-carbon-web-components.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

netlify bot commented Oct 23, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d54f8c4
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/671fa4e3c0a2520008a7ca4b
😎 Deploy Preview https://deploy-preview-17854--v11-carbon-react.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

netlify bot commented Oct 23, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d54f8c4
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/671fa4e3b9c416000868976b
😎 Deploy Preview https://deploy-preview-17854--carbon-elements.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.

@Thamjith Thamjith force-pushed the 17843-dropdown-type-update branch from 27025c1 to 75ab61b Compare October 23, 2024 15:10
@Thamjith
Copy link
Contributor Author

recheck

@Thamjith Thamjith force-pushed the 17843-dropdown-type-update branch from 75ab61b to d644eb3 Compare October 23, 2024 17:16
@Thamjith Thamjith marked this pull request as ready for review October 24, 2024 05:46
@Thamjith Thamjith requested a review from a team as a code owner October 24, 2024 05:46
@Thamjith Thamjith force-pushed the 17843-dropdown-type-update branch from d644eb3 to 1f5c1e2 Compare October 24, 2024 05:49
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

I think this should be required even though it's conditionally rendered.

@Thamjith Thamjith requested a review from tay1orjones October 25, 2024 09:58
@Thamjith Thamjith changed the title Fix(Dropdown): Made the titleText optional in propTypes Fix(Dropdown): Made the titleText required property Oct 25, 2024
@Thamjith
Copy link
Contributor Author

@tay1orjones updated the code to make the titleText property required instead of optional.

@Thamjith Thamjith force-pushed the 17843-dropdown-type-update branch from 8a86889 to 5afd492 Compare October 25, 2024 10:02
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.79%. Comparing base (098bfb8) to head (d54f8c4).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17854   +/-   ##
=======================================
  Coverage   80.79%   80.79%           
=======================================
  Files         406      406           
  Lines       14041    14041           
  Branches     4395     4395           
=======================================
  Hits        11344    11344           
+ Misses       2531     2530    -1     
- Partials      166      167    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@annawen1
Copy link
Member

There was a duplicate ticket and the fix was already merged in #17886, but I'm going to go ahead and approve so @Thamjith can get credit for his contribution!

@Thamjith Thamjith force-pushed the 17843-dropdown-type-update branch 2 times, most recently from 380dbcf to fb213a0 Compare October 28, 2024 14:46
@tay1orjones tay1orjones enabled auto-merge October 28, 2024 14:51
auto-merge was automatically disabled October 28, 2024 14:51

Head branch was pushed to by a user without write access

@Thamjith Thamjith force-pushed the 17843-dropdown-type-update branch from bcae1a1 to d54f8c4 Compare October 28, 2024 14:51
@tay1orjones tay1orjones enabled auto-merge October 28, 2024 14:51
@tay1orjones tay1orjones added this pull request to the merge queue Oct 28, 2024
Merged via the queue into carbon-design-system:main with commit e4386e6 Oct 28, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Dropdown props.titleText is marked as optional in typescript but required in prop-types
3 participants