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

feat(blocks-api): blocks.update() now can update tunes as well as data #2720

Merged
merged 10 commits into from
Jul 6, 2024

Conversation

w99910
Copy link
Contributor

@w99910 w99910 commented May 17, 2024

AFAIK, when you update block using editor.blocks.update method, only data attribute is merged and updated. I believe tunes data should be updated if provided.

AFAIK, when you update block using `editor.blocks.update` method, only `data` attribute is merged and updated. I believe `tunes` data should be updated if provided.
Copy link
Member

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

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

Please, add a corresponded testcase

w99910 and others added 2 commits May 17, 2024 18:30
Update `tunes` data when new `tunes` data is provided
@w99910
Copy link
Contributor Author

w99910 commented May 17, 2024

Please, add a corresponded testcase

I have added a test. In order to prevent breaking change, I decided to add new parameter called tunes to update method of BlockManager and BlocksAPI.

src/components/modules/api/blocks.ts Outdated Show resolved Hide resolved
src/components/modules/api/blocks.ts Outdated Show resolved Hide resolved
test/cypress/tests/should-update-tunes-settings.cy.ts Outdated Show resolved Hide resolved
test/cypress/tests/should-update-tunes-settings.cy.ts Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
Copy link
Member

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

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

Almost ready to approve, please check the last comment and add a changelog

src/components/modules/api/blocks.ts Outdated Show resolved Hide resolved
@neSpecc neSpecc changed the title Update tunes data when new tunes data is provided feat(blocks-api): blocks.update() now can update tunes as well as data Jul 6, 2024
@neSpecc neSpecc merged commit 44c29dd into codex-team:next Jul 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants