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

deprecate receiveUploadPermissions #37508

Conversation

jiteshdhamaniya
Copy link
Contributor

Description

This PR Solves #33900.

receiveUploadPermissions is not used anymore so this PR makes it deprecated and suggests to use receiveUserPermission instead.

How has this been tested?

  • Find receiveUploadPermissions in all Gutenberg files, and found no reference, except declaration file.
  • Removed receiveUploadPermissions and tested site to confirm everything is working.

Screenshots

Screenshot 2021-12-18 at 11 32 17 AM

Screenshot 2021-12-18 at 11 33 03 AM

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @jiteshdhamaniya! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 18, 2021
@swissspidy
Copy link
Member

I thought the code can be safely removed altogether because it‘s not exposed publicly.

@Mamaduka
Copy link
Member

I thought the code can be safely removed altogether because it‘s not exposed publicly.

I think everything that's exported is public API>

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @jiteshdhamaniya! 👍

@ntsekouras ntsekouras merged commit 10f2b17 into WordPress:trunk Dec 27, 2021
@github-actions
Copy link

Congratulations on your first merged pull request, @jiteshdhamaniya! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 12.3 milestone Dec 27, 2021
@jiteshdhamaniya jiteshdhamaniya deleted the Deprecate-receiveUploadPermissions-action branch December 27, 2021 10:18
@swissspidy
Copy link
Member

I thought the code can be safely removed altogether because it‘s not exposed publicly.

I think everything that's exported is public API>

IIRC this function was never exported publicly outside of the package, so other packages could not use it. Hence the suggestion to completely remove this code

@Mamaduka
Copy link
Member

Mamaduka commented Jan 4, 2022

Sorry if I misunderstand something. Developers could access this action using the example below, making it a public API:

const { receiveUploadPermissions } = useDispatch( 'core' );

@swissspidy
Copy link
Member

Ah, right, missed that. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants