This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
i/5597: Set balloon toolbar's max-width #536
Merged
Changes from 17 commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
bb78e2e
Fix: Set balloon toolbar's max-width to be half of the editable's wid…
panr 82747ef
Tests: Add scenario for a setting toolbar max-width
panr 085c255
Tests: Add scenario to test if toolbar will group items
panr ac3c31f
Fix: Refactor setting max-width for toolbar as a private method for t…
panr 69560b9
Add maxWidth observable to ToolbarView class
panr 438d844
Refactor toolbar view maxWidth binding
panr f630220
Move setting toolbar max-width to initializer instead of running it w…
panr 56d7300
Add test for toolbar max-width binding
panr aaa73fe
Change test for setting balloon toolbar max-width
panr fd6151a
Refactor access to balloon toolbar config and pass down shouldGroupWh…
panr d44f716
Add test for checking if grouping items can be disabled from balloon …
panr 08a5058
Increase test timeout while waiting for ResizeObserver
panr bb97620
Add _enableGroupingOnMaxWidthChange() private method
panr b3da94f
Update ToolbarView#maxWidth observable with note describing how it ma…
panr fcc0e29
Fix ballon toolbar code
panr 8e04fe0
Remove obsolete test from ToolbarView tests
panr 6f9eeae
Fix balloon toolbar tests
panr a316c8d
Add "ck-balloon-toolbar_min-width" class to set default min-width for…
panr 8e4882e
Use ResizeObserver class instead of getResizeObserver helper
panr 09475dc
Make notifications context plugin.
ffa11c3
Export body collection to the separate file.
6523052
Applied changes to the body collection API.
61c5246
Removed console.log.
4a248ce
Fix broken import.
38ffe70
Tests: introduce tests for body collection. Update tests broken after…
872cfcc
Docs: added API docs to the body collection.
74b6034
Renamed attachToDOM() to attachToDom().
oskarwrobel 7599547
Renamed detachFromDOM() to detachFromDom().
oskarwrobel 9edbdc2
Docs improvements.
oskarwrobel 3ffa6b8
Docs improvements.
oskarwrobel 70c867b
Docs improvements.
oskarwrobel de73f72
Docs improvements.
oskarwrobel e577621
Docs improvements.
oskarwrobel 9db89a5
Brought LabeledView. Aligned DropdownView to LabeledView interface.
oleq 59f588f
Added styles for LabeledView.
oleq 949a577
Minor API docs corrections.
Reinmar 34e5189
Internal: Updated new license headers.
Reinmar 672697c
Docs: LabeledView docs.
oleq 3822783
Tests: Added tests for DropdownView#id.
oleq dcfef67
Tests: Added tests for LabelView#id.
oleq 153449a
Tests: Added tests for the LabeledView class.
oleq 2dee198
Tests: Added tests for LabeledView utils. Added some docs.
oleq 4455327
Aligned BoxedEditorUIView to the new LabelView API.
oleq 0de45e5
Code clean-up.
oleq c66a579
Docs: Fixed a broken link.
oleq 1498ef2
Fix invalid self imports.
jodator e31e110
Remove empty afterEach() from labeled input view utils tests.
jodator e14a9a6
Update src/labeledview/utils.js
jodator dccfa9a
Internal: Aligned the ToolbarView class (and tests) to the ResizeObse…
oleq 9e27b73
Added the ToolbarView#isCompact property.
oleq b657ccd
Tests: Added tests for ToolbarView#isCompact.
oleq 72f7c1d
Tests: Fixed failing ToolbarView tests due to interactions with other…
oleq 5b39d04
Docs: Body collection API docs corrected. [skip ci]
AnnaTomanek 638c572
Add #withArrow param to DropdownButtonView
panr a9b1482
Add safeguard for "hasBorder" option
panr 6e84a6e
Add ColorInputView
panr 6d7f3ae
Code refactoring.
oleq 6ecc076
Move some of the font color utils to the color grid utils
panr f2772db
Move some of the font utils tests to color grid utils tests
panr 6a9c665
Remove color input files from ui
panr 88ada61
Reverted changes made to ColorGridView.
oleq cca93b2
Tests: Added tests for the getLocalizedColorOptions() helper.
oleq b378326
Docs: Added headers to the colorgrid utils module.
oleq 60b878e
Moved the normalizeColorCode helper back to ckeditor5-font.
oleq 88e2f4e
Fix invalid self-import.
jodator f24a196
Other: Updated translations. [skip ci]
mlewand be21634
Other: Reverted year 2020 in .po files license header. [skip ci]
mlewand e22b92a
Fix translations contexts
panr d922f70
Internal: Adjusted color context descriptions. [skip ci]
mlewand 164b78a
Internal: Optimzied the SVG icons for size. [skip ci]
oleq 993d9c5
Docs: Changelog. [skip ci]
Reinmar e6b800a
Docs: Corrected the changelog. [skip ci]
Reinmar 58014f1
Internal: Updated dependencies. [skip ci]
mlewand 0bfeb4d
Release: v17.0.0. [skip ci]
mlewand 3aa9833
Add additional postions for anchoring the balloon
panr 9f69492
Remove redundant invocation of resizeObserver.destroy()
panr 7ebdea3
Change balloon toolbar max-width to 90% of editable's width and add `…
panr eebfe70
Update ballonpanelview tests
panr 0012531
Update balloontoolbar tests
panr e255a4c
Merge branch master into i/5597
panr b7ddada
Merge branch 'master' into i/5597
panr 733e30a
Changed the order of default positions used by BalloonPanelView#attac…
oleq d069d43
Tests: Stabilized the BalloonToolbar that checks items grouping to ma…
oleq a58ac73
Fix northArrowSouthMiddleWest calculations & rearrange balloonpanelvi…
panr 763e13c
Make resizeObserver protected value
panr c8ea412
Remove setting min-width class for balloontoolbar and related test as…
panr 24840cb
Fix docs for ToolbarView API
panr 3d5b192
Fix manual test helpers for balloonpanelview
panr 684123c
Fix typo
panr c2faec9
Remove `.ck-balloon-toolbar_min-width` class from theme css
panr 276e9a0
Fix comma dangles
panr 1c4eb28
Docs: Fixed typos in BalloonPanelView.defaultPositions docs.
oleq d339b70
Reverted changes to BalloonPanelViews tests made in 733e30acee35.
oleq 964995c
Remove unnecessary checking for editableElement since we use new Resi…
panr 79f7cd1
Tests: Improved the readability of the balloon panel view positioning…
oleq 56cfbe8
Docs and code refactoring in BalloonPanelView and BalloonToolbar clas…
oleq 3c39173
Docs: Improved docs of the ToolbarView class.
oleq 8142f58
Docs: Improved the dev docs in the BalloonToolbar plugin.
oleq 85651a9
Tests: Code refactoring in BalloonPanelView tests.
oleq 0395c4f
Tests: Minor naming improvement in the BalloonToolbar test.
oleq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 checked this ratio and I came to the conclusion that it's unsafe for very small editables, e.g.:
Unfortunately, this case is totally valid, people may enable the editor on very narrow fields.
So here's what I propose:
BalloonToolbar
in CSS (so at least the heading dropdown is visible + maybe 2 or 3 buttons). As a custom CSS property so developers can override it if they want to.min-width
should overrulemax-width
set by us in JS and this should work out great.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't we use the viewport width instead of editable width?
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'm not sure about the viewport thing, because in some situations, someone can have the editor's width set to, for example: 60% of the viewport and then we want to make sure, that toolbar will not expand over the editor, covering some important stuff next to it.
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 agree with @panr. The UI of the editor should be restricted to the editable whenever possible. This is "our territory" in the application and we should not expand beyond 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.
I .9 is too much ATM. You can have that scenario:
So if you want to set it to .9 we need to tweak anchoring behaviour as well.
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 could extend default
BalloonPanelView
positions and add intermediate ones and then enable them in theBalloonToolbar
.And we even have an issue for that :D
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.
Done, I added "middle-" states.