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

Add deprecations for v6 #634

Merged
merged 8 commits into from
Jul 8, 2020
Merged

Add deprecations for v6 #634

merged 8 commits into from
Jul 8, 2020

Conversation

vladucu
Copy link
Member

@vladucu vladucu commented Jul 8, 2020

We've previously made a breaking change for PolarisBanner where we renamed action argument primaryAction.

This adds backwards support for action argument too together with a deprecation. Same changes are included for all the other components that have been using action as an argument.

Also, stops using a mixin for adding a deprecation re class argument that was implicitly working previously with non-tagless components in Ember.

@vladucu vladucu self-assigned this Jul 8, 2020
@vladucu vladucu requested a review from andrewpye July 8, 2020 12:22
@vladucu vladucu marked this pull request as ready for review July 8, 2020 12:47
@vladucu vladucu force-pushed the deprecate-action-argument branch from f487b07 to ddead3d Compare July 8, 2020 12:49
Copy link
Member

@andrewpye andrewpye left a comment

Choose a reason for hiding this comment

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

Nice cleanup @vladucu! I would have preferred to see the class deprecation changes done as a separate PR as they're unrelated to the scope suggested by this PR's title. Perhaps we could update the title instead so that it more accurately reflects what's happening in this PR?

Wondering if it's worth introducing a decorator for the action deprecation - no strong views either way though.

Also worth checking the component documentation - we've so far specifically called out differences in param names, component usage etc. between the Ember and React implementations so we probably need to update the docs as part of this change.

@@ -25,11 +25,10 @@ const avatarImages = [

const styleClasses = ['one', 'two', 'three', 'four', 'five', 'six'];

@deprecateClassArgument
Copy link
Member

Choose a reason for hiding this comment

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

This is neat, but what do you think of having a generic deprecateArgument decorator instead so that we have something reusable going forward? Maybe gets a bit too clunky having to pass the various deprecation properties (message, version etc.)?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I def like how simple the usage with this is
but something we should keep in mind and maybe do in the future 👍

*/
secondaryAction = null;
}
export default class PolarisEmptyStateDetails extends Component {}
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this JS file? Also curious why the deprecation warning's been removed 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems still needed in addons?!
This is just internal, so no need to repeat the deprecations and documenting properties since we do in the parent component. Ideally, this would be just a tagless component

@@ -14,7 +14,7 @@
</div>
</PolarisTextContainer>

{{#if action}}
{{#if @action}}
Copy link
Member

Choose a reason for hiding this comment

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

Should this be renamed as well? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

yeap

@vladucu vladucu force-pushed the deprecate-action-argument branch from ddead3d to a67bc8b Compare July 8, 2020 12:51
@vladucu vladucu changed the title Deprecate action argument Add deprecations for v6 Jul 8, 2020
@vladucu
Copy link
Member Author

vladucu commented Jul 8, 2020

Nice cleanup @vladucu! I would have preferred to see the class deprecation changes done as a separate PR as they're unrelated to the scope suggested by this PR's title. Perhaps we could update the title instead so that it more accurately reflects what's happening in this PR?

agree and sorry.... just trying to pick my battles 😂

Wondering if it's worth introducing a decorator for the action deprecation - no strong views either way though.

I'd lean just leaving this as is, since it's just temporary code

@vladucu vladucu merged commit bdcd581 into v6 Jul 8, 2020
@vladucu vladucu deleted the deprecate-action-argument branch July 8, 2020 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants