Master carousel canvas renderer adrm#8976
Open
hokolomopo wants to merge 10 commits into
Open
Conversation
Collaborator
4fa2506 to
638b325
Compare
hokolomopo
commented
Jun 22, 2026
hokolomopo
left a comment
Contributor
Author
There was a problem hiding this comment.
There's a bunch of ugly things to improve with FIXME CAROUSELS comments
Comment on lines
+512
to
+536
| buildViewportGetters( | ||
| getHeaderDimensions: (sheetId: UID, dimension: "COL" | "ROW", index: number) => HeaderDimensions | ||
| ): ViewportsGetters { | ||
| return { | ||
| findLastVisibleColRowIndex: this.getters.findLastVisibleColRowIndex, | ||
| isReadonly: this.getters.isReadonly, | ||
| getMainCellPosition: this.getters.getMainCellPosition, | ||
| getNextVisibleCellPosition: this.getters.getNextVisibleCellPosition, | ||
| isColHidden: this.getters.isColHidden, | ||
| isRowHidden: this.getters.isRowHidden, | ||
| isHeaderHidden: this.getters.isHeaderHidden, | ||
| getNumberHeaders: this.getters.getNumberHeaders, | ||
| getSheetIds: this.getters.getSheetIds, | ||
| tryGetSheet: this.getters.tryGetSheet, | ||
| getNumberCols: this.getters.getNumberCols, | ||
| getNumberRows: this.getters.getNumberRows, | ||
| getFigures: this.getters.getFigures, | ||
|
|
||
| getColDimensions: (sheetId, index) => getHeaderDimensions(sheetId, "COL", index), | ||
| getRowDimensions: (sheetId, index) => getHeaderDimensions(sheetId, "ROW", index), | ||
| getHeaderSize: (sheetId, dim, index) => | ||
| dim === "COL" | ||
| ? getHeaderDimensions(sheetId, "COL", index).size | ||
| : getHeaderDimensions(sheetId, "ROW", index).size, | ||
| getColSize: (sheetId, col) => getHeaderDimensions(sheetId, "COL", col).size, |
Contributor
Author
There was a problem hiding this comment.
Not the greatest. The goal is to be able to give a custom size to the headers in the viewport, independently from their size in the model.
The internal viewports had indirect knowledge of frozen panes, as they
used an `offsetCorrectX/Y` to adjust coordinates based on their
boundary zone.
But this meant that we couldn't use a viewport to display an arbitrary
zone. If the viewport started at the column 2, it would offset
all of its coordinates by the width of the first column to leave space
for a frozen pane.
With this commit, the viewports no longer care about that. They are
given a zone to display, and return coordinates relative to that zone.
It's the responsibility of their caller to adjust the coordinates
if the viewport is not rendered in `{0,0}`.
Task: 6320421
This commit extracts the clickable cell overlay logic into a separate component. Task: 6320421
There was a default `FOOTER_SIZE` that was applied to all viewports. - It didn't make sense to have a footer size in the topLeft/topRight viewports (even if it didn't seem to be actually used in those) - The footer size only make sense in the context of a grid, not for print or for an independent viewport. Task: 6320421
To render the row (or col) headers, we would create a zone that goes from the first column to the last column of the sheet. Then we would proceed to ignore the width of this zone, and only use its x/width. We can use the zone of the first column, instead of bothering with a zone that includes all the columns. Task: 6320421
The goal of this commit is to make the rendering process mode-agnostic by removing the use of any getter. The rendering methods were taken out of the renderer store to make sure we will not add any getter in the future. Task: 6320421
This commit adds a new hook `useChildStoreProvider`. It allows for a component (and it's children) to use a different store provider, so it doesn't share some store with its parent. It will be useful to display a standalone viewport that have a `HoveredCellStore` that is not a local store, but should not be the same as in the main grid. Task: 6320421
64a6752 to
eb74976
Compare
eb74976 to
9004acf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description:
description of this task, what is implemented and why it is implemented that way.
Task: 6320421
review checklist