-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor!: remove deprecated functionality for v10 #7077
refactor!: remove deprecated functionality for v10 #7077
Conversation
/** | ||
* 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); | ||
}, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
The basics
npm run format
andnpm run lint
The 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_noPreventDefault
argument ofBlockly.browserEvents.bind
(this was already unused and will continue to be)Blockly.Events.Abstract#fromJson
the same method in other Event classes (useBlockly.Events.fromJson
)Blockly.Events.Ui
class (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_SATURATION
andBlockly.HSV_VALUE
(useBlockly.colour.getHsvSaturation
/setHsvSaturation
andBlockly.colour.getHsvValue
/setHsvValue
)Blockly.ContextMenu.currentBlock
(useBlockly.ContextMenu.getCurrentBlock
/setCurrentBlock
)Blockly.Events.recordUndo
(useBlockly.Events.getRecordUndo
/setRecordUndo
)Blockly.Tooltip.visible
andBlockly.Tooltip.DIV
(useBlockly.Tooltip.isVisible
andBlockly.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.svgMath
depending on the function)Blockly.utils.object.assign
andBlockly.utils.object.inherits
(useObject.assign
and 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.Icon
andBlockly.icons.MutatorIcons
constructors