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

New linking experience. #17368

Draft
wants to merge 112 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
da30dbd
Feature (link): Update UI of the small Link panel
filipsobol Oct 15, 2024
1b3d161
Optimize SVG
filipsobol Oct 15, 2024
56df972
Make the existing tests pass
filipsobol Oct 15, 2024
7e317cc
Rename `left` and `right` o `leftSlot` and `rightSlot`
filipsobol Oct 16, 2024
66c2305
Remove unfinished code for displaying errors for the "Displayed text"…
filipsobol Oct 16, 2024
bc9cb31
Add tests covering `leftSlot` and `rightSlot`
filipsobol Oct 16, 2024
6141b0f
Make the "Insert" button slightly wider, as per the design
filipsobol Oct 16, 2024
65b7116
Add missing code comments
filipsobol Oct 16, 2024
35b6de5
Update based on feedback
filipsobol Oct 16, 2024
15697ab
Revert change in `resetFormStatus`
filipsobol Oct 16, 2024
bacbfa7
Update checked class name
filipsobol Oct 16, 2024
6888409
Fix test
filipsobol Oct 16, 2024
164a78b
Use form view is link UI footer
filipsobol Oct 17, 2024
d8cfa76
Add missing dev dependency
filipsobol Oct 17, 2024
a82849f
Fix dependency version
filipsobol Oct 17, 2024
6a17c14
Replaced LinkActionsView with ToolbarView.
niegowski Oct 17, 2024
a5054d0
Updated theme css.
niegowski Oct 17, 2024
9eae802
Add missing items to the `contexts.json`
filipsobol Oct 18, 2024
926d12d
Replaced bookmark actions view with bookmark toolbar.
niegowski Oct 18, 2024
b2b8382
Added missing theme changes.
niegowski Oct 18, 2024
2fd1097
Merge branch 'refs/heads/ck/epic/17230-linking-experience' into ck/17…
niegowski Oct 18, 2024
8801976
Apply suggestions from code review
filipsobol Oct 21, 2024
e5c3ba9
Update name of the variable
filipsobol Oct 21, 2024
fc52947
Merge pull request #17265 from ckeditor/update-small-link-panel
filipsobol Oct 21, 2024
21284d2
Merge branch 'refs/heads/ck/epic/17230-linking-experience' into ck/17…
niegowski Oct 21, 2024
c06c42d
Simplified handling of scroll to bookmark.
niegowski Oct 21, 2024
4273091
Feature (link): Add `Advanced` view UI
filipsobol Oct 21, 2024
bdb872b
Added tests for custom positions for widget toolbar.
niegowski Oct 21, 2024
3600a2d
Updated tests for BookmarkUI.
niegowski Oct 21, 2024
8c42492
Added tests.
niegowski Oct 22, 2024
3e3f343
Adding tests.
niegowski Oct 22, 2024
0f1c3c1
Feature (link): Properly handle opening and closing of the Advanced p…
filipsobol Oct 22, 2024
ad799cf
Adding tests.
niegowski Oct 22, 2024
6a72381
Destroy the Advanced view together with the rest of views and add mis…
filipsobol Oct 22, 2024
d714014
Added bookmarks view panel.
pszczesniak Oct 23, 2024
d96fd2c
Show message when no bookmarks available.
pszczesniak Oct 23, 2024
1d05aa5
Do not auto-update decorators
filipsobol Oct 23, 2024
42b2795
Include link toolbar in toolbars cycling.
niegowski Oct 23, 2024
2ec5eae
Style the empty information when no bookmarks available.
pszczesniak Oct 24, 2024
7abf7b8
Removed commented code.
pszczesniak Oct 24, 2024
23109ae
Code refactor.
niegowski Oct 24, 2024
7b3f6cb
Code refactor.
pszczesniak Oct 24, 2024
bcf7e7e
Fix tests
filipsobol Oct 24, 2024
edd58fd
Fix the widths of input fields.
pszczesniak Oct 25, 2024
cec3747
Added comments to explain how to manage the focus.
pszczesniak Oct 25, 2024
1677b46
Moved bookmark icons to the core package.
pszczesniak Oct 24, 2024
ebf370c
Added bookmark icon to the bookmark list item.
pszczesniak Oct 25, 2024
f86ac7b
Fix code coverage
filipsobol Oct 25, 2024
d286299
Add translations
filipsobol Oct 25, 2024
55faede
Remove comment
filipsobol Oct 25, 2024
7941da9
Remove comment
filipsobol Oct 25, 2024
c9b6418
Fix comment
filipsobol Oct 25, 2024
b70797f
Fix comments
filipsobol Oct 25, 2024
77ddc30
Added tests to 'getAllBookmarkNames' method.
pszczesniak Oct 25, 2024
aa52358
Code refactor.
niegowski Oct 25, 2024
b3a8095
Added tests.
pszczesniak Oct 25, 2024
02788fb
Move common translations to the `core` package
filipsobol Oct 25, 2024
6b2a7ed
Remove the `showAdvanced` event and use generic `execute` event instead
filipsobol Oct 25, 2024
2572f59
Use `div` instead of `form`
filipsobol Oct 25, 2024
1910f40
Add dedicated advanced view class
filipsobol Oct 25, 2024
8eef5f6
Added event type.
pszczesniak Oct 28, 2024
f241f43
Change the order of removing views and update the isUIVisible getter.
pszczesniak Oct 28, 2024
f54ba36
Added tests for LinkUI class.
pszczesniak Oct 28, 2024
2f2b5d1
Fix tests
filipsobol Oct 28, 2024
00dd241
Feedback fixes
filipsobol Oct 28, 2024
40a9239
Reuse available method
filipsobol Oct 28, 2024
239f33f
Fix test
filipsobol Oct 28, 2024
80fbb3c
Apply suggestions.
filipsobol Oct 28, 2024
2edffb6
Change default values in test
filipsobol Oct 28, 2024
5f1c8e6
Merge pull request #17325 from ckeditor/add-advanced-view-to-link-ui
filipsobol Oct 28, 2024
ac62819
Updated tests.
niegowski Oct 28, 2024
512bd73
Merge branch 'refs/heads/ck/epic/17230-linking-experience' into ck/17…
niegowski Oct 28, 2024
1a3c069
Other (link): Hide the settings button if there are no manual decorat…
filipsobol Oct 28, 2024
6eed8f4
Added more tests.
pszczesniak Oct 28, 2024
2dd03ad
Merge branch 'ck/epic/17230-linking-experience' into ck/17230-bookmar…
pszczesniak Oct 28, 2024
ea8ec24
Styled bookmarks panel.
pszczesniak Oct 28, 2024
0d3ba80
Apply suggestions from code review
filipsobol Oct 29, 2024
b0eaeab
Apply suggestions from code review.
pszczesniak Oct 29, 2024
b114b7c
Merge pull request #17347 from ckeditor/hide-settings-button-without-…
filipsobol Oct 29, 2024
6c5857f
Merge remote-tracking branch 'origin/master' into ck/epic/17230-linki…
filipsobol Oct 29, 2024
17e1a9c
Merge branch 'refs/heads/ck/epic/17230-linking-experience' into ck/17…
niegowski Oct 29, 2024
da427fa
Code refactor.
niegowski Oct 29, 2024
7b756cb
Code refactor.
niegowski Oct 29, 2024
b42a230
Code refactor.
niegowski Oct 29, 2024
8094374
Code refactor.
niegowski Oct 29, 2024
77aa258
Code refactor.
niegowski Oct 29, 2024
8ab51c9
Code refactor.
niegowski Oct 29, 2024
b603e81
Code refactor.
niegowski Oct 29, 2024
2127878
Added missing context.
niegowski Oct 29, 2024
327a8ca
Fixed tests.
niegowski Oct 29, 2024
a6e5dd6
Merge pull request #17340 from ckeditor/ck/17230-bookmarks-view
niegowski Oct 29, 2024
10ea525
Merge branch 'refs/heads/ck/epic/17230-linking-experience' into ck/17…
niegowski Oct 29, 2024
9bba842
Fix imports.
niegowski Oct 29, 2024
8681829
Added tests.
niegowski Oct 29, 2024
d2a706e
Added tests.
niegowski Oct 29, 2024
7312f71
Fixed dependencies.
niegowski Oct 30, 2024
3507e74
Added bookmark icon on link preview button.
niegowski Oct 30, 2024
ab4e356
Updated tests.
niegowski Oct 30, 2024
4eef8e6
Code cleanup before review.
niegowski Oct 30, 2024
9e577ed
Other (link): Rename the `cancel` event to `back` in LinkAdvancedView.
filipsobol Oct 30, 2024
4a59575
Renamed internal method.
niegowski Oct 30, 2024
c698b4a
Docs fixes.
niegowski Oct 30, 2024
0bec17a
Fix tests
filipsobol Oct 30, 2024
4a23fde
Updated styles.
niegowski Oct 30, 2024
680aa2f
Fix docs.
niegowski Oct 30, 2024
1928ac6
Merge pull request #17364 from ckeditor/rename-the-cancel-event-to-back
filipsobol Oct 31, 2024
32baeb8
Updated bookmark icons.
niegowski Oct 31, 2024
235023b
Added missing icons.
niegowski Oct 31, 2024
5104e6b
Updated optimized icon.
niegowski Oct 31, 2024
1f1e736
Removed redundant css class.
niegowski Oct 31, 2024
610d412
Changed bookmark icon sizes to be relative to the main font size.
pszczesniak Oct 31, 2024
d53fa3d
Merge pull request #17283 from ckeditor/ck/17230-link-toolbar
niegowski Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/ckeditor5-bookmark/lang/contexts.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"Bookmark": "The label of the bookmark toolbar button. Also, a bookmark form header.",
"Insert": "The button in the bookmark insert form.",
"Update": "The button in the bookmark update form.",
"Edit bookmark": "Button opening the Bookmark editing balloon.",
"Remove bookmark": "Toolbar button tooltip for bookmark remove button.",
"Bookmark name": "The label of the input in the bookmark insert and update form. Also, the tooltip for the bookmark name in the bookmark preview.",
"Enter the bookmark name without spaces.": "The description of bookmark input in the bookmark insert form.",
"Bookmark must not be empty.": "The error message. Displayed when the bookmark name is empty.",
"Bookmark name cannot contain space characters.": "The error message. Displayed when provided name includes spaces.",
"Bookmark name already exists.": "The error message. Displayed when provided name already exists.",
"bookmark widget": "The label for the bookmark widget."
"bookmark widget": "The label for the bookmark widget.",
"Bookmark toolbar": "The label used by assistive technologies describing an bookmark toolbar attached to a bookmark widget."
}
4 changes: 2 additions & 2 deletions packages/ckeditor5-bookmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"dependencies": {
"ckeditor5": "43.2.0",
"@ckeditor/ckeditor5-core": "43.2.0",
"@ckeditor/ckeditor5-engine": "43.2.0",
"@ckeditor/ckeditor5-widget": "43.2.0",
"@ckeditor/ckeditor5-utils": "43.2.0",
"@ckeditor/ckeditor5-ui": "43.2.0"
Expand All @@ -28,13 +27,14 @@
"@ckeditor/ckeditor5-dev-utils": "^42.0.0",
"@ckeditor/ckeditor5-easy-image": "43.2.0",
"@ckeditor/ckeditor5-editor-classic": "43.2.0",
"@ckeditor/ckeditor5-editor-multi-root": "43.2.0",
"@ckeditor/ckeditor5-engine": "43.2.0",
"@ckeditor/ckeditor5-essentials": "43.2.0",
"@ckeditor/ckeditor5-heading": "43.2.0",
"@ckeditor/ckeditor5-html-support": "43.2.0",
"@ckeditor/ckeditor5-image": "43.2.0",
"@ckeditor/ckeditor5-link": "43.2.0",
"@ckeditor/ckeditor5-list": "43.2.0",
"@ckeditor/ckeditor5-editor-multi-root": "43.2.0",
"@ckeditor/ckeditor5-paragraph": "43.2.0",
"@ckeditor/ckeditor5-paste-from-office": "43.2.0",
"@ckeditor/ckeditor5-table": "43.2.0",
Expand Down
25 changes: 25 additions & 0 deletions packages/ckeditor5-bookmark/src/bookmarkconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,29 @@ export interface BookmarkConfig {
* @default true
*/
enableNonEmptyAnchorConversion?: boolean;

/**
* Items to be placed in the bookmark contextual toolbar.
*
* Assuming that you use the {@link module:bookmark/bookmarkui~BookmarkUI} feature, the following toolbar items will be available
* in {@link module:ui/componentfactory~ComponentFactory}:
*
* * `'bookmarkPreview'`,
* * `'editBookmark'`,
* * `'removeBookmark'`.
*
* The default configuration for bookmark toolbar is:
*
* ```ts
* const bookmarkConfig = {
* toolbar: [ 'bookmarkPreview', '|', 'editBookmark', 'removeBookmark' ]
* };
* ```
*
* Of course, the same buttons can also be used in the
* {@link module:core/editor/editorconfig~EditorConfig#toolbar main editor toolbar}.
*
* Read more about configuring the toolbar in {@link module:core/editor/editorconfig~EditorConfig#toolbar}.
*/
toolbar?: Array<string>;
}
21 changes: 20 additions & 1 deletion packages/ckeditor5-bookmark/src/bookmarkediting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module bookmark/bookmarkediting
*/

import { type Editor, Plugin, icons } from 'ckeditor5/src/core.js';
import { Plugin, icons, type Editor } from 'ckeditor5/src/core.js';
import { toWidget } from 'ckeditor5/src/widget.js';
import { IconView } from 'ckeditor5/src/ui.js';
import type { EventInfo } from 'ckeditor5/src/utils.js';
Expand Down Expand Up @@ -51,6 +51,17 @@ export default class BookmarkEditing extends Plugin {
return true;
}

/**
* @inheritDoc
*/
constructor( editor: Editor ) {
super( editor );

editor.config.define( 'bookmark', {
toolbar: [ 'bookmarkPreview', '|', 'editBookmark', 'removeBookmark' ]
} );
}

/**
* @inheritDoc
*/
Expand Down Expand Up @@ -81,6 +92,13 @@ export default class BookmarkEditing extends Plugin {
return null;
}

/**
* Returns all unique bookmark names existing in the content.
*/
public getAllBookmarkNames(): Set<string> {
return new Set( this._bookmarkElements.values() );
}

/**
* Defines the schema for the bookmark feature.
*/
Expand Down Expand Up @@ -135,6 +153,7 @@ export default class BookmarkEditing extends Plugin {
class: 'ck-bookmark'
}, [ this._createBookmarkUIElement( writer ) ] );

writer.setCustomProperty( 'bookmark', true, containerElement );
this._bookmarkElements.set( modelElement, id );

// `getFillerOffset` is not needed to set here, because `toWidget` has already covered it.
Expand Down
Loading