-
Notifications
You must be signed in to change notification settings - Fork 684
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
(WIP) introduce autofill preview tooltip #10037
base: master
Are you sure you want to change the base?
Conversation
var currPos = { | ||
// x: app.file.textCursor.rectangle.cX1, | ||
x: app.file.viewedRectangle.cX1, | ||
y: app.file.textCursor.rectangle.cY2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
textCursor -> where "caret" is while editing text inside cell
cellCursor -> position of selected cell
please look into docstate.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use:
var currPos = {
x:
app.calc.cellCursorRectangle.pWidth +
app.calc.cellCursorRectangle.pX1 +
5,
y:
app.calc.cellCursorRectangle.pHeight +
app.calc.cellCursorRectangle.pY1 +
5,
};
currently we have:
Peek.2024-09-16.12-30.mp4
issues
- Popup width is too long
- popup location should be updated per autofill selection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, at least we can move the popup right now. I needed to close the popup before update it :)
Peek.2024-09-19.11-21.mp4
bf26e73
to
6476ce4
Compare
6476ce4
to
0169e9b
Compare
|
||
var topLeftPixels = this._twipsToCorePixels(topLeftTwips); | ||
var offsetPixels = this._twipsToCorePixels(offset); | ||
this._cellAutoFillAreaPixels = L.LOUtil.createRectangle(topLeftPixels.x, topLeftPixels.y, offsetPixels.x, offsetPixels.y); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we somehow put this into event's data? in the map.fire ( ... )
so we will not need to store it inside canvas layer class
0169e9b
to
ed42db0
Compare
- we should show cell value previews in a popup while using autofill feature. - This will allow users to see what value will be filled in the current cell in advance. - use 'fixedtext' type for cell previews - add AutoFillPreviewTooltip class - requires: https://gerrit.libreoffice.org/c/core/+/172589 Signed-off-by: Bayram Çiçek <[email protected]> Change-Id: Ice62a3eb891a1653b5ec6ad5b10efe2fac0e914f
Add a special case to JS dialog positioning next to Autofilter case. Use a new object everytime as newPopupData. Use the position read from the event. Signed-off-by: Gökay Şatır <[email protected]> Change-Id: I6c3ad27914f109b6df42d780438f59149c3495e8
ed42db0
to
e839a87
Compare
@bayramcicek hello, thanks for the PR :) I sent a small update to fix some issues. But there are still things to look:
I hope this helps, thanks :) |
@@ -710,8 +710,10 @@ L.Control.JSDialog = L.Control.extend({ | |||
instance.updatePos(); | |||
} | |||
|
|||
if (instance.isAutofilter) | |||
if (instance.isAutofilter && instance.id !== 'autoFillPreviewTooltip') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pleae do not use hardcoded ids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that wrong due to centerDialogPosition
above maybe?
or really we enter autofilter case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We enter the autofilter case there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see isAutofilter
is too general now: instance.isAutofilter = instance.isDocumentAreaPopup && this.map._docLayer.isCalc();
Can we check if instance.isAutoCompletePopup
can be used here?
Thank you so much :) I will check them asap. |
this.calculateAutoFilterPosition(instance); | ||
else if (instance.id === 'autoFillPreviewTooltip') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be instance.isAutoCompletePopup
?
clickToClose: '_POPOVER_', | ||
id: 'autoFillPreviewTooltip', | ||
canHaveFocus: false, | ||
noOverlay: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isAutoCompletePopup property might be needed
Change-Id: Ice62a3eb891a1653b5ec6ad5b10efe2fac0e914f
Summary
TODO
Checklist
make prettier-write
and formatted the code.make check
make run
and manually verified that everything looks okay