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

XWIKI-17664: When adding an annotation the focus should be inside WYSIWYG by default #3694

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Nov 26, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-17664

Changes

Description

  • Added a comment to explain a line of code that doesn't work with CKEditor anymore
  • Added a CKE config change so that it gets focus when loaded.

Clarifications

  • The legacy way was just a textarea for the annotation edition. I left this in for backwards compatibility. However, in parallel I added a CKEditor config change that would focus the field once it's loaded.
  • Comments explain why I went with this solution precisely.

Screenshots & Video

On the video below, we can see a basic use case and experimentation with adjacent UIs (namely inline editing and comment edition).

2024-11-26.14-56-41.mp4

Executed Tests

Manual tests, see above.
I doubt the changes would change anything to tests since it's only a minor CKEditor config update (and the docker tests pretty much don't care about the focus state).
Built changes with mvn clean install -f xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-ui and then successfully passed the docker test suite: mvn clean install -f xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-test/xwiki-platform-annotation-test-docker.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 16.10.X

…IWYG by default

* Added a comment to explain a line of code that doesn't work with CKEditor anymore
* Added a CKE config change so that it gets focus when loaded.
@Sereza7
Copy link
Contributor Author

Sereza7 commented Nov 27, 2024

Assigning surli to this ticket since he reviewed and merged #3239 which was a very similar solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants