-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Editor] Change the cursor when we switch to FreeText mode (bug 1787297) #15386
Conversation
cursor: auto; | ||
} | ||
|
||
.annotationEditorLayer.freeTextEditing { |
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.
In the Ink-case we're setting the cursor with an .annotationEditorLayer .inkEditor.editing
rule, so do we perhaps want to use similar naming here as well (or are those cases not similar enough to warrant that)?
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.
The situation is slightly different from ink stuff.
For ink stuff, when we're editing, we always have a div (with a canvas inside) which covers all the page.
But I'll change that to have something more consistent.
} | ||
|
||
.annotationEditorLayer.freeTextEditing { | ||
cursor: var(--editorFreeText-editing-cursor), auto; |
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.
Do you perhaps want to use text
as the fallback instead?
--editorFreeText-editing-cursor: url(images/toolbarButton-editorFreeText.svg) | ||
8 16; |
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.
Sorry, but this won't work in the components
build unfortunately. I can't comment on the all the relevant lines of the diff, but what you want/need is (assuming again that "text" is a reasonable default value):
diff --git a/web/annotation_editor_layer_builder.css b/web/annotation_editor_lay
er_builder.css
index 5251eaeeb..fa8dc8e67 100644
--- a/web/annotation_editor_layer_builder.css
+++ b/web/annotation_editor_layer_builder.css
@@ -20,8 +20,11 @@
--freetext-padding: 2px;
/*#if COMPONENTS*/
--editorInk-editing-cursor: pointer;
+ --editorFreeText-editing-cursor: text;
/*#else*/
--editorInk-editing-cursor: url(images/cursor-editorInk.svg) 0 16;
+ --editorFreeText-editing-cursor: url(images/toolbarButton-editorFreeText.svg)
+ 8 16;
/*#endif*/
}
if (mode === AnnotationEditorType.FREETEXT) { | ||
this.div.classList.add("freeTextEditing"); | ||
} else { | ||
this.div.classList.remove("freeTextEditing"); | ||
} |
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.
This could be shorter/simpler written as:
if (mode === AnnotationEditorType.FREETEXT) { | |
this.div.classList.add("freeTextEditing"); | |
} else { | |
this.div.classList.remove("freeTextEditing"); | |
} | |
this.div.classList.toggle("freeTextEditing", mode === AnnotationEditorType.FREETEXT); |
c741347
to
1b14b06
Compare
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/a97fbedea1530cd/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/e065f2b71b962c5/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/a97fbedea1530cd/output.txt Total script time: 5.00 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/e065f2b71b962c5/output.txt Total script time: 7.42 mins
|
/botio-windows integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/002a43a7cda37cc/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/002a43a7cda37cc/output.txt Total script time: 7.21 mins
|
I ran integration tests locally on windows and I can't reproduce this issue which very unlikely related to this patch. |
No description provided.