[REF] replace the sheetView plugin by a store#8939
Open
hokolomopo wants to merge 4 commits into
Open
Conversation
Collaborator
13b6359 to
7f7d820
Compare
87a9eb8 to
059e6b0
Compare
The model was already almost independent from the sheetView, this commit changes the last remaining parts. - `getMaxFigureSize`: during the copy/paste, we bounded the image size with the size of the viewport. This feels quite arbitrary, using a constant value seems as arbitrary and less hassle. - `POPOUT_CHART_FROM_CAROUSEL`: we can compute the new chart position before sending the command rather than in the command handling Task: 6314784
Helper `getChartPositionAtCenterOfViewport` is not used anywhere. Task: 6314784
059e6b0 to
a9f0988
Compare
hokolomopo
commented
Jun 24, 2026
| const { x, y } = this.env.model.getters.getVisibleRect({ | ||
| const { height } = this.viewStore.sheetViewDimensionWithHeaders; | ||
| const sheetId = this.env.model.getters.getActiveSheetId(); | ||
| const visible = this.viewStore.viewports.isVisibleInViewport({ sheetId, col, row }); |
Contributor
Author
There was a problem hiding this comment.
Kinda sucks to have to do viewStore.viewports ... But we cannot have getters that take arguments in a store.
The main issue is that we can call viewStore.viewports.setViewportOffset(x,y) rather than viewStore.setViewportOffset(x,y) which will skip the render(true) of the stores... Maybe we should create a type manually removing the problematic methods ? Won't work in odoo tho.
41d8e89 to
4f77309
Compare
This commit move all the viewport logic out of the model and into a new store. This will de-correlate the viewport logic from the model, and allow to display multiple independent viewports. Task: 6314784
4f77309 to
1ee7dc6
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: TASK_ID
review checklist