Search block - File block: Add deprecated vars to render_callback
functions
#58432
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
In last Interactivity API changes, we added-removed the three variables that are passed through the render_callback.
As these functions may be have been used by external developers, we need to "deprecate them", but only in the docs.
_deprecated_argument
is not being used, cause if it is added, it will appear in all blocks rendered, as the callback is always passing those values (even if they are not being used)Doing this:
![Screenshot 2024-01-29 at 18 36 29](https://private-user-images.githubusercontent.com/37012961/300785082-655f3a3a-fd7d-4912-b3ba-10391ebd4e44.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODk1NTYsIm5iZiI6MTczOTA4OTI1NiwicGF0aCI6Ii8zNzAxMjk2MS8zMDA3ODUwODItNjU1ZjNhM2EtZmQ3ZC00OTEyLWIzYmEtMTAzOTFlYmQ0ZTQ0LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MjA1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdlYzNmZGIwYmEyYmRmZGYwYmViOTlkYzMxN2Y0ODMxNTA5NjkwNjExNWZjZGM0ZTQ3OWQ0Y2RhNDk5ZjY0ZWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cOEyR7EjZBzNixVhap_bXKJpeswFCpLOfW3RFBurSsA)
Would cause this:
![Screenshot 2024-01-29 at 18 35 26](https://private-user-images.githubusercontent.com/37012961/300785115-6429688a-6357-4fa0-a312-c7f53e0e977a.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODk1NTYsIm5iZiI6MTczOTA4OTI1NiwicGF0aCI6Ii8zNzAxMjk2MS8zMDA3ODUxMTUtNjQyOTY4OGEtNjM1Ny00ZmEwLWEzMTItYzdmNTNlMGU5NzdhLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MjA1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1MjU3YWIwMDRiMjdlNzJkNTkwMWQ1ZjRjOTBmMjVjZTM1MTJjNjM2NTMxNjk0MzFkOTU4ZDg1ZjFhMDExYTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.st3reldRmePRhtjVF4nMyQY3cP2xSu7js42pqzV3130)
So the cleanest way to deal with this issue is to leave the variables, skip the linting issue, and add them as deprecated in the docs.