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

fix: Restore HSV_SATURATION and HSV_VALUE accessors and deprecate #7249

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

cpcallen
Copy link
Contributor

@cpcallen cpcallen commented Jul 4, 2023

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Developer errors/confusion caused by the removal of HSV_SATURATION and HSV_VALUE by PR #7077 despite them not having previously been formally deprecated.

Proposed Changes

Restore these accessors but mark them as deprecated.

Reason for Changes

Reduce developer pain.

Test Coverage

Passes npm test.

Documentation

This was an undocumented and not-previously-promulgated change in Blockly v10.0.0. If we do not revert (via this PR or similar) we should at least issue an errata to the release notes.

Additional Information

DEPRECATION: Blockly.HSV_SATURATION and Blockly.HSV_VALUE are deprecated and will be removed in a future version of Blockly. Use Blockly.utils.colour.getHsvSaturation / Blockly.utils.colour.setHsvSaturation and Blockly.utils.colour.getHsvValue / Blockly.utils.colour.setHsvValue instead.

Contrary to the notice at the top of the `Object.defineProperties`
call, these were not actually marked as deprecated, and their
removal in Blockly 10.0.0 constituted an avoidable zero-notice
breaking change.
@cpcallen cpcallen added PR: fix Fixes a bug deprecation This PR deprecates an API. labels Jul 4, 2023
@cpcallen cpcallen requested a review from a team as a code owner July 4, 2023 15:56
DEPRECATION:

Blockly.HSV_SATURATION and Blockly.HSV_VALUE are deprecated and
will be removed in a future version of Blockly.  Use
Blockly.colour.getHsvSaturation / Blockly.colour.setHsvSaturation
and Blockly.colour.getHsvValue / Blockly.colour.setHsvValue instead.
@cpcallen cpcallen changed the title Fix/hsv accessors fix: Restore HSV_SATURATION and HSV_VALUE accessors and deprecate Jul 4, 2023
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug deprecation This PR deprecates an API. labels Jul 4, 2023
@cpcallen cpcallen added the deprecation This PR deprecates an API. label Jul 4, 2023
@cpcallen cpcallen enabled auto-merge (squash) July 4, 2023 17:24
@cpcallen cpcallen merged commit a677355 into google:develop Jul 5, 2023
8 checks passed
@cpcallen cpcallen deleted the fix/hsv-accessors branch July 5, 2023 16:04
ericblackmonGoogle pushed a commit that referenced this pull request Jul 10, 2023
…#7249)

* fix: Restore HSV_SATURATION and HSV_VALUE accessors

Contrary to the notice at the top of the `Object.defineProperties`
call, these were not actually marked as deprecated, and their
removal in Blockly 10.0.0 constituted an avoidable zero-notice
breaking change.

* deprecate: Add deprecation notices for HSV_SATURATION and HSV_VALUE

DEPRECATION:

Blockly.HSV_SATURATION and Blockly.HSV_VALUE are deprecated and
will be removed in a future version of Blockly.  Use
Blockly.colour.getHsvSaturation / Blockly.colour.setHsvSaturation
and Blockly.colour.getHsvValue / Blockly.colour.setHsvValue instead.

(cherry picked from commit a677355)
@ericblackmonGoogle ericblackmonGoogle mentioned this pull request Jul 10, 2023
3 tasks
@chrisbansart
Copy link

Hello, the depecration message should include "utils" in the namespace. Thus it should be:
Blockly.HSV_SATURATION and Blockly.HSV_VALUE are deprecated and
will be removed in a future version of Blockly. Use
Blockly.utils.colour.getHsvSaturation / Blockly.utils.colour.setHsvSaturation
and Blockly.utils.colour.getHsvValue / Blockly.utils.colour.setHsvValue instead.

@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug deprecation This PR deprecates an API. labels Jul 17, 2023
@BeksOmega
Copy link
Collaborator

Fixed! Thanks @chrisbansart =)

@BeksOmega BeksOmega added the deprecation This PR deprecates an API. label Jul 17, 2023
@cpcallen
Copy link
Contributor Author

@BeksOmega: I do not see any for the problem @chrisbansart mentions in either develop or master. Am I missing something?

cpcallen added a commit to cpcallen/blockly that referenced this pull request Jul 17, 2023
cpcallen added a commit that referenced this pull request Jul 17, 2023
* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors

  Fix the comment / message errors noted in
  #7249 (comment)

* chore: Add renamings for HSV_SATURATION, HSV_VALUE
ericblackmonGoogle pushed a commit that referenced this pull request Jul 17, 2023
* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors

  Fix the comment / message errors noted in
  #7249 (comment)

* chore: Add renamings for HSV_SATURATION, HSV_VALUE

(cherry picked from commit 1bc4f67)
ericblackmonGoogle added a commit that referenced this pull request Jul 17, 2023
* fix(generators): Changes to exports and access controls for TypeScript compatibility (#7295)

* fix(generators): Add missing declarations for Order enums

* chore(generators): Remove spurious whitespace

* fix(generators): Make provideFunction_ etc. public

  Remove the protected declaration on provideFunction_ and
  FUNCTION_NAME_PLACEHOLDER_ so they can be used from generator
  functions written in TypeScript.

  Not strictly part of #7283, but closely related and required to
  fixing the related issue google/blockly-samples#1785.

* chore(generators): format

(cherry picked from commit d503fbb)

* fix: Correct errors in `HSV_SATURATION`, `HSV_VALUE` accessors (#7297)

* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors

  Fix the comment / message errors noted in
  #7249 (comment)

* chore: Add renamings for HSV_SATURATION, HSV_VALUE

(cherry picked from commit 1bc4f67)

* release: Update version number to 10.0.2

---------

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
ericblackmonGoogle added a commit that referenced this pull request Jul 17, 2023
* fix(generators): Changes to exports and access controls for TypeScript compatibility (#7295)

* fix(generators): Add missing declarations for Order enums

* chore(generators): Remove spurious whitespace

* fix(generators): Make provideFunction_ etc. public

  Remove the protected declaration on provideFunction_ and
  FUNCTION_NAME_PLACEHOLDER_ so they can be used from generator
  functions written in TypeScript.

  Not strictly part of #7283, but closely related and required to
  fixing the related issue google/blockly-samples#1785.

* chore(generators): format

(cherry picked from commit d503fbb)

* fix: Correct errors in `HSV_SATURATION`, `HSV_VALUE` accessors (#7297)

* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors

  Fix the comment / message errors noted in
  #7249 (comment)

* chore: Add renamings for HSV_SATURATION, HSV_VALUE

(cherry picked from commit 1bc4f67)

* release: Update version number to 10.0.2

---------

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This PR deprecates an API. PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants