eBay / nice-modal-react

A modal state manager for React.
https://ebay.github.io/nice-modal-react
MIT License
1.96k stars 110 forks source link

fix: rename antd visibility props to 'open' from 'visible' #78

Closed shoota closed 1 year ago

shoota commented 1 year ago

Fixed, antd deprecated warnings.

Ant Design has deprecated the visible property. Using visible will cause a warning to be displayed in the console.

Please see official explains.

P.S. Thanks for the awesome module πŸ˜ƒ

supnate commented 1 year ago

Thanks @shoota ! I suggest adding new helpers named antdModalV5, antdDrawerV5. So that it's still compatible with antd versions before 4.23.0. Also, would you plz also include unit tests for the new API? Thanks!

codecov-commenter commented 1 year ago

Codecov Report

Merging #78 (d452bc9) into main (5bd49dd) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #78   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          186       194    +8     
  Branches        29        29           
=========================================
+ Hits           186       194    +8     
Impacted Files Coverage Ξ”
src/index.tsx 100.00% <100.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

shoota commented 1 year ago

@supnate Thanks reading this PR!!

include unit tests for the new API

So Sorry... I tried to fix test. 576ec0b (#78)

supnate commented 1 year ago

Hi @shoota , thanks for the update. Besides the unit tests. I think it would be better to provide new helper methods named antdModalV5, atndDrawerV5 so that it doesn't break existing behavior, that is, be compatible with old antd versions before v4.23.0.

shoota commented 1 year ago

provide new helper methods named antdModalV5, atndDrawerV5

Oh, I understand that you say... I will be re-change soon, thx!!

shoota commented 1 year ago

I'm so sorry too late...., I re-write this PR πŸ™‡

supnate commented 1 year ago

Thanks @shoota ! LGTM. I will publish the change soon.

supnate commented 1 year ago

Published in the new version v1.2.7: https://github.com/eBay/nice-modal-react/releases . Thanks for your contribution! @shoota