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

Improved blocks.insert() by allowing passing parameters as an object … #2095

Closed
wants to merge 3 commits into from

Conversation

zang77
Copy link

@zang77 zang77 commented Jul 12, 2022

  • Improved block.insert() by allowing passing parameters as an object

  • Fixed some issues commented out from last pr. Set the default parameter for insert.

  • Added changelog for insert function.

Resolves #1817

)

* Improved block.insert() by allowing passing parameters as an object

* Fixed some issues commented out from last pr. Set the default parameter for insert.

* Added changelog for insert function.
@aditink
Copy link

aditink commented Jul 12, 2022

Fixes issue #1817

* @param {number?} index — index where to insert new Block
* @param {boolean?} needToFocus - flag to focus inserted Block
* @param replace - pass true to replace the Block existed under passed index
* @param {NewBlock} newBlock — the block that will be inserted
*/
public insert = (
Copy link
Member

Choose a reason for hiding this comment

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

it would be better to save the backward capability

* @interface NewBlock Describes new block configuration
*/

export interface NewBlock {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export interface NewBlock {
export interface BlockInsertionParams {

@neSpecc
Copy link
Member

neSpecc commented Feb 18, 2023

The solution should save the backward compatibility, but this PR is dropping it.

@neSpecc neSpecc closed this Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: improve block.insert() interface to allow passing parameters as an object instead of set
4 participants