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

Bookmarks: part 2 #17180

Closed
Witoso opened this issue Sep 27, 2024 · 1 comment
Closed

Bookmarks: part 2 #17180

Witoso opened this issue Sep 27, 2024 · 1 comment
Labels
package:bookmark type:task This issue reports a chore (non-production change) and other types of "todos".
Milestone

Comments

@Witoso
Copy link
Member

Witoso commented Sep 27, 2024

Provide a description of the task

Goal

Implement more advanced handling of bookmarks (e.g. pasting) and data loading.

Description

After implementing #17063, we continue in Bookmarks implementation. Focus is on finishing the main work in bookmarks: pasting, handling loading of different data.

Scope

  • Functional requirements:
    • Handling wrapped bookmarks/anchors. <a name="" id="xyz">This text is in the bookmark</a>. We have multiple cases but in general, by default wrapped anchor will transition to pointed anchor, but there will be an opt-out config.
// CASE 1 - name the same as ID
// Input data
<p>
	<a id="xyz" name="xyz">This text is in the bookmark</a>
</p>

// After (default): consume the name but don't add to <a>;
// name is consumed only if identical with id. 
<p>
	<a id="xyz"></a>
	This text is in the bookmark
</p>

// Opt-out by config (handled by other converters, GHS),
// we don't show bookmark UI
<p>
	<a id="xyz">This text is in the bookmark</a>
</p>

// CASE 2 - just name
// Input data
<p>
	<a name="xyz">This text is in the bookmark</a>
</p>

// After (default): change name to id
<p>
	<a id="xyz"></a>
	This text is in the bookmark
</p>

// Opt-out by config (handled by other converters, GHS),
// we don't show bookmark UI
<p>
	<a id="xyz">This text is in the bookmark</a>
</p>

// CASE 3 - no content, but name
// Input data
<p>
	<a name="xyz"></a>
	This text is in the bookmark
</p>

// After: change name to id
<p>
	<a id="xyz"></a>
	This text is in the bookmark
</p>

// CASE 4 - name and id are different
// Input data
<p>
	<a id="xyz" name="abc">This text is in the bookmark</a>
</p>

// After (default): name not consumed (handled by GHS if enabled)
<p>
	<a id="xyz" name="abc"></a>
	This text is in the bookmark
</p>
  • Opt-out config from above examples:
    • Opt-out should be configured in config and work only for setData.
    • Opt-out means, that anchor with content will be preserved to be handled by other features, but not parsed as a bookmark.
  • Input from clipboard (pasting) with anchors from Word/GDoc/Excel sources transforms correctly to Bookmarks.
    • Whatever is in clipboard, should be converted to correct bookmark
    • It is not configurable (opt-out from above has no effect)
    • Paste from Word/GDoc/Excel) should behave as setData.
  • Trim bookmarkId in insert/update command.
  • Copy/Paste within the same editor
    • During copy-paste we leave the ID unchanged. This will lead to potential duplicates of IDs. But detecting duplicates may be tricky, and pasting would need to check agaist all elements that may have an ID. We decided to not handle this right now.
  • Change input label name from Add bookmark name into Bookmark name
  • Change form button text, depending on action Insert/Update
  • Non-functional requirements:
    • Bookmarks work with collaboration features (especially track changes).
    • Pagination (make sure we are not including bookmarks).
    • Make sure that attributes added by GHS to a bookmark do not turn it to link.
    • Figure out how bookmarks could be handled in exports and import (Word/PDF).
      • There’s shouldn’t any problems, we just need to test it.
    • Discuss content accessibility with bookmarks.
      • All good: widgets ✅, output content: no need to provide anything (invisible element).
@Witoso Witoso added type:task This issue reports a chore (non-production change) and other types of "todos". package:bookmark labels Sep 27, 2024
@Witoso
Copy link
Member Author

Witoso commented Oct 17, 2024

This part is also done, not merged to master yet.

@Witoso Witoso closed this as completed Oct 17, 2024
@Witoso Witoso added this to the upcoming milestone Oct 18, 2024
@CKEditorBot CKEditorBot modified the milestones: upcoming, iteration 80 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:bookmark type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

2 participants