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

Responsive toolbar #416

Closed
SammyM opened this issue Mar 21, 2017 · 10 comments · Fixed by ckeditor/ckeditor5-ui#523
Closed

Responsive toolbar #416

SammyM opened this issue Mar 21, 2017 · 10 comments · Fixed by ckeditor/ckeditor5-ui#523
Assignees
Labels
status:discussion type:feature This issue reports a feature request (an idea for a new functionality or a missing option). type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@SammyM
Copy link

SammyM commented Mar 21, 2017

Is this a bug report or feature request?

🆕 Feature request

💻 Version of CKEditor

CKEditor v5 @ 12.4.0

📋 Steps to reproduce

Currently the toolbar gets a little ugly in narrow viewports. Namely it flows into two, disorganized lines.

Example below:

screen shot 2017-03-21 at 15 44 26

A solution for this would be to collapse overflowing buttons.


If you'd like to see this feature implemented, add 👍 to this post.

@fredck
Copy link
Contributor

fredck commented Mar 21, 2017

Hey @SammyM, can you elaborate a bit, guiding us on your expectations on this? How do you think CKEditor should behave when it comes to responsive design?

@fredck
Copy link
Contributor

fredck commented Mar 21, 2017

I mean, we know there’s work to be done, and we have plans for it, but I would love to hear your expectations, because it may point us to things we didn't take in consideration so far.

@SammyM
Copy link
Author

SammyM commented Mar 21, 2017

I've not spent a lot of time playing with the new version of CKEditor so I'm not sure of all the functionality yet, but I've noticed that the popups/tooltips can't fully be seen on smaller viewports. For example:

screen shot 2017-03-21 at 15 44 26

I'm glad to hear it's in your plans.

@HasanAmmori
Copy link

Well, I am sure these are minor things that I wouldn't be worried about. Most of the elements act really well already

@Reinmar Reinmar added the type:question This issue asks a question (how to...). label May 5, 2017
@Reinmar Reinmar added this to the unknown milestone Apr 5, 2018
@SammyM
Copy link
Author

SammyM commented Sep 7, 2018

Is there an update on this at all? I know the UI of CKEditor has changed a bit since I last raised this issue, but the popups still go off the screen.

screen shot 2018-09-07 at 16 44 02

@oleq
Copy link
Member

oleq commented Oct 16, 2018

I proposed 2 improvements to the UI:

Responsive in–balloon forms

This feature is on review now.

image

image

(WIP) Dynamic items grouping for overflowed toolbars

The PoC can be found in the PR but it's not finished yet.

kapture 2018-10-16 at 15 16 18

image

Why not a scrollable toolbar instead?

It sounded like a great plan and at first. In fact, I tried to implement a scrollable toolbar. Like when it overflows, the scrollbar appears and it is possible to reach the rest of the items easily (at least on mobile). But my PoC failed because of the following reasons:

  • The solution is OK for mobiles (touch devices) but not necessarily on desktops. We'd need to implement grouping soon anyway, e.g. in the document editor where we struggle to find a space for more feature buttons.
  • When the toolbar gets any overflow, all children are cropped (e.g. dropdown panels, tooltips),
  • To fight the above, I tried to rewrite dropdown panels to balloon–like components (with position: absolute + our positioning heuristics) and I found multiple issues with that approach:
    • The dropdowns were hit by the "position delay syndrome" kapture 2018-10-15 at 13 10 45
    • I found out our API is not ready for any UI component using BalloonPanelView or anything that goes into the "body" collection. ATM only plugins can use these things because to work with them, we need to know about the editor (EditorUI), which is impossible in plain UI components:
      • Where to insert it in DOM (editor.ui.view.body)
      • How to handle the focus (editor.ui.focusTracker)
    • Because of the above I had to rewrite createDrodpown so it gets both the reference to the body collection and the focus tracker so the dropdown can put the (now floating) panel in the right place in DOM and register it in the FC (the panel no longer belongs to the toolbar which is in the FC by default). That's quite a mess.
    • When the dropdown panel is no longer in the same tree as its button (in the "body" collection), when suddenly the toolbar changes its position (e.g. sticky panel is no longer sticky because of focus loss), we must update the position of the panel too. The dropdown has no idea what happens to the toolbar, it doesn't know anything about that (it's encapsulated as a View) so there's no way to tell the dropdown to update the position of its panel except from the outside. That would require a very weird API.
      image
      image

I figured we'd need a massive refactoring to deal with these issues that we cannot afford ATM.

dkonopka added a commit to ckeditor/ckeditor5-media-embed that referenced this issue Oct 26, 2018
Feature: Improved responsiveness of the media form view in narrow viewports (see ckeditor/ckeditor5#416).
dkonopka added a commit to ckeditor/ckeditor5-theme-lark that referenced this issue Oct 26, 2018
Feature: Introduced the ck-media-phone RWD mixin that outputs a @media query. Improved responsiveness of media embed, link, and image form views in narrow viewports (see ckeditor/ckeditor5#416).
dkonopka added a commit to ckeditor/ckeditor5-image that referenced this issue Oct 26, 2018
Feature: Improved responsiveness of the text alternative view in narrow viewports (see ckeditor/ckeditor5#416).
dkonopka added a commit to ckeditor/ckeditor5-link that referenced this issue Oct 26, 2018
Feature: Improved responsiveness of the form and actions views in narrow viewports (see ckeditor/ckeditor5#416).
dkonopka added a commit that referenced this issue Oct 26, 2018
Feature: Improved responsiveness of the forms in narrow viewports (see #416).
@Reinmar
Copy link
Member

Reinmar commented Oct 26, 2018

The first part of the changes mentioned by @oleq in #416 (comment) are merged:

image

We still need your feedback on the "(WIP) Dynamic items grouping for overflowed toolbars" part though.

@Reinmar Reinmar modified the milestones: unknown, backlog Jul 2, 2019
@Reinmar Reinmar added status:discussion type:improvement This issue reports a possible enhancement of an existing feature. labels Jul 2, 2019
@Reinmar Reinmar modified the milestones: backlog, iteration 27 Aug 27, 2019
@mlewand
Copy link
Contributor

mlewand commented Aug 28, 2019

It's about time to focus this issue. Issue with balloons out of view have been fixed with #1299, the only outstanding problem is the toolbar responsiveness, and let's track it in this issue.

@mlewand mlewand changed the title Do you have any plans to make CKEditor responsive? Responsive / collapsing toolbar Aug 28, 2019
@mlewand mlewand added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). and removed type:question This issue asks a question (how to...). labels Aug 28, 2019
@mlewand mlewand changed the title Responsive / collapsing toolbar Responsive toolbar Aug 28, 2019
jodator added a commit to ckeditor/ckeditor5-core that referenced this issue Oct 15, 2019
Internal: Created a "three vertical dots" icon for the toolbar grouping feature (see ckeditor/ckeditor5#416).
jodator added a commit to ckeditor/ckeditor5-theme-lark that referenced this issue Oct 15, 2019
Other: Adjusted toolbar styles to allow automatic items grouping (see ckeditor/ckeditor5#416).
jodator added a commit to ckeditor/ckeditor5-utils that referenced this issue Oct 15, 2019
Feature: Implemented the `getResizeObserver()` helper that offers an entry to the native `ResizeObserver` API (see ckeditor/ckeditor5#416).
jodator added a commit to ckeditor/ckeditor5-ui that referenced this issue Oct 15, 2019
Feature: Implemented automatic items grouping in the `ToolbarView` component. Closes ckeditor/ckeditor5#416.

BREAKING CHANGE: The internal structure of the component has changed. Toolbar items are no longer direct descendants of the toolbar in DOM, which may affect some integrations (mainly CSS selectors if adjustments were made to the styles).
jodator added a commit to ckeditor/ckeditor5-editor-decoupled that referenced this issue Oct 15, 2019
Feature: Enabled automatic items grouping in the main editor toolbar when there is not enough space to display them in a single row (see ckeditor/ckeditor5#416).
jodator added a commit to ckeditor/ckeditor5-editor-classic that referenced this issue Oct 15, 2019
Feature: Enabled automatic items grouping in the main editor toolbar when there is not enough space to display them in a single row (see ckeditor/ckeditor5#416).
@nusagates
Copy link

nusagates commented Sep 5, 2020

Screenshot_20200906-055855
Unable to scroll toolbar. So the invisible toolbar item could not be used on mobile phone.

How to resolve this issue?

@oleq
Copy link
Member

oleq commented Sep 7, 2020

@nusagates Please leave a 👍 in #5586.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:discussion type:feature This issue reports a feature request (an idea for a new functionality or a missing option). type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
7 participants