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

Single view cell state event listener #137486

Merged
merged 7 commits into from
Nov 19, 2021
Merged

Single view cell state event listener #137486

merged 7 commits into from
Nov 19, 2021

Conversation

rebornix
Copy link
Member

@rebornix rebornix commented Nov 19, 2021

Re #131808.

This PR implements CellPart#updateState and registers a single event listener for view cell state change.

@@ -86,6 +86,19 @@ export class CellEditorOptions extends Disposable {
this._value = this._computeEditorOptions();
}

prepareRender(): void {
Copy link
Member

Choose a reason for hiding this comment

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

It could be optional to implement these, seems that parts often don't need to

Copy link
Member Author

Choose a reason for hiding this comment

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

not everyone needs updateLayoutNow either so we can probably use override other than abstract

Copy link
Member Author

Choose a reason for hiding this comment

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

I might still keep it though to ensure that when we add a new CellPart, we are aware that batching DOM read and writes are necessary.

}

if (e.inputCollapsedChanged) {
this.templateData.progressBar.updateForCellState(this.viewCell);
Copy link
Member

Choose a reason for hiding this comment

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

The progress bar can be a cell part right?

Copy link
Member Author

Choose a reason for hiding this comment

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

@roblourens yes, it would make good sense to make it a cell part.

@rebornix rebornix merged commit 0b35337 into main Nov 19, 2021
@rebornix rebornix deleted the rebornix/single-cell-em branch November 19, 2021 19:11
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants