refactor!: remove deprecated functionality for v10#7077
Merged
rachel-fenichel merged 5 commits intoRaspberryPiFoundation:developfrom May 11, 2023
rachel-fenichel:v10_deprecation
Merged
refactor!: remove deprecated functionality for v10#7077rachel-fenichel merged 5 commits intoRaspberryPiFoundation:developfrom rachel-fenichel:v10_deprecation
rachel-fenichel merged 5 commits intoRaspberryPiFoundation:developfrom
rachel-fenichel:v10_deprecation
Conversation
4 tasks
BeksOmega
approved these changes
May 11, 2023
cpcallen
reviewed
Jul 4, 2023
Comment on lines
-180
to
-210
| /** | ||
| * The richness of block colours, regardless of the hue. | ||
| * Must be in the range of 0 (inclusive) to 1 (exclusive). | ||
| * @name Blockly.HSV_SATURATION | ||
| * @type {number} | ||
| * @suppress {checkTypes} | ||
| */ | ||
| HSV_SATURATION: { | ||
| get: function () { | ||
| return colour.getHsvSaturation(); | ||
| }, | ||
| set: function (newValue) { | ||
| colour.setHsvSaturation(newValue); | ||
| }, | ||
| }, | ||
| /** | ||
| * The intensity of block colours, regardless of the hue. | ||
| * Must be in the range of 0 (inclusive) to 1 (exclusive). | ||
| * @name Blockly.HSV_VALUE | ||
| * @type {number} | ||
| * @suppress {checkTypes} | ||
| */ | ||
| HSV_VALUE: { | ||
| get: function () { | ||
| return colour.getHsvValue(); | ||
| }, | ||
| set: function (newValue) { | ||
| colour.setHsvValue(newValue); | ||
| }, | ||
| }, | ||
| }); |
Collaborator
There was a problem hiding this comment.
These were removed despite not being deprecated, and this has provoked at least one question in the forum.
@maribethb and @rachel-fenichel: I think we should restore these (with a @deprecation and deprecation.warn() and issue a patch release promptly, and re-remove them in a future version.
4 tasks
8 tasks
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The basics
npm run formatandnpm run lintThe details
Resolves
Fixes #6814
Remake of #6862
Proposed Changes
Remove deprecated methods/classes/files that were slated for removal in v10 or before June 2023. In v9, these functions printed deprecation warnings.
Additional Information
The following APIs have been removed, and where applicable the replacement is specified:
Blockly.resizeSvgContents()(useBlockly.WorkspaceSvg#resizeSvgContents)Blockly.copy(useBlockly.clipboard.copy)Blockly.paste(useBlockly.clipboard.paste)Blockly.duplicate(useBlockly.clipboard.duplicate)Blockly.isNumber(useBlockly.utils.string.isNumber)Blockly.hueToHex(useBlockly.utils.colour.hueToHex)Blockly.bindEvent_(useBlockly.browserEvents.bind)Blockly.unbindEvent_(useBlockly.browserEvents.unbind)Blockly.bindEventWithChecks_(useBlockly.browserEvents.conditionalBind)opt_noPreventDefaultargument ofBlockly.browserEvents.bind(this was already unused and will continue to be)Blockly.Events.Abstract#fromJsonthe same method in other Event classes (useBlockly.Events.fromJson)Blockly.Events.Uiclass (use a more specific UI event that extendsBlockly.Events.UiBase)Blockly.CodeGenerator#variableDB_(useBlockly.CodeGenerator#nameDB_e.g.javascriptGenerator.nameDB_)Blockly.alert,Blockly.prompt, andBlockly.confirm(useBlockly.dialog.alert/setAlert,Blockly.dialog.prompt/setPrompt, andBlockly.dialog.confirm/setConfirm)Blockly.mainWorkspace(useBlockly.getMainWorkspace())Blockly.selected(useBlockly.getSelected()/setSelected())Blockly.HSV_SATURATIONandBlockly.HSV_VALUE(useBlockly.colour.getHsvSaturation/setHsvSaturationandBlockly.colour.getHsvValue/setHsvValue)Blockly.ContextMenu.currentBlock(useBlockly.ContextMenu.getCurrentBlock/setCurrentBlock)Blockly.Events.recordUndo(useBlockly.Events.getRecordUndo/setRecordUndo)Blockly.Tooltip.visibleandBlockly.Tooltip.DIV(useBlockly.Tooltip.isVisibleandBlockly.Tooltip.getDiv)Blockly.WidgetDiv.DIV(useBlockly.WidgetDiv.getDiv)Blockly.Touch(use PointerEvents instead of touch-specific events)Blockly.utils(use the new location e.g.Blockly.utils.svgMathdepending on the function)Blockly.utils.object.assignandBlockly.utils.object.inherits(useObject.assignand ES6 class inheritance)Blockly.utils.object.values(useObject.values)Blockly.utils.style.getCascadedStyle(leave Blockly out of your css shenanigans)Blockly.utils.svgMath.is3dSupported(we now always assume 3d transforms are supported, so you can too)Blockly.utils.xml.getDocument/setDocument/textToDomDocument(no longer provided)Blockly.Xml.textToDom(useBlockly.utils.xml.textToDom)Blockly.icons.IconandBlockly.icons.MutatorIconsconstructors