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

Better entry point for image file managers and insert image changes #15149

Closed
Witoso opened this issue Oct 6, 2023 · 2 comments · Fixed by #15255
Closed

Better entry point for image file managers and insert image changes #15149

Witoso opened this issue Oct 6, 2023 · 2 comments · Fixed by #15255
Assignees
Labels
Epic package:ckbox package:image squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@Witoso
Copy link
Member

Witoso commented Oct 6, 2023

📝 Provide a description of the new feature

As we observe with CKBox, when an editor has an integrated file manager, discoverability of uploading images with it is low. Usually, such plugin has an icon that's not that that recognizable as an image one.

CKEditor 4 had a pretty visible option of Browse server.

We would move to a bit of different direction, opening up a possibility to add to an image split button more options. One of which to file managers. In the future, such extensibility could be used by other features.

image

Scope

After doing a PoC #15195, we decided to abandon the route of declarative UI in this area.

We also had a few discussions on the icon set. We decided that we will switch the icon of the uploadImage component. The primary objective is to effectively communicate the function of the button. The generic image icon, in other applications, either opens a modal (CKEditor 4, Tiny) or a dropdown (GDocs). In our case, the upload screen opens immediately, therefor a more specific icons was prepared.

Features and changes

  • insertImage should be intelligent when it comes to registering default actions:
    • The default action on the split button is the first available on the list below
      • if there's only one action, there's no dropdown arrow, unless it is insert with link.
    • The default list in the split button is:
      • Upload from computer (when uploadImage integration is provided)
      • Insert with file manager (when ckbox or ckfinder integration is provided)
      • Insert via URL (insert image via url integration is provided)
  • Remember when selection is on image, the label changes:
    • Replace from computer
    • Replace with file manager.
    • Update image URL.

Integrator

  • As an integrator, I can add additional components for the insert image button.
  • As an integrator, I can override the default order on the list.

Docs

Resources


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

@Witoso Witoso added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:image package:ckbox Epic squad:core Issue to be handled by the Core team. labels Oct 6, 2023
@Witoso
Copy link
Member Author

Witoso commented Oct 9, 2023

The idea would be to push the configuration to the integrator side, and:

  • Create "a split toolbar" component that an integrator could use to define such UI.
  • Create a default component for image insert that an integrator could use (to define).
  • It would make configuration more aligned with the current standards.

@Witoso
Copy link
Member Author

Witoso commented Oct 11, 2023

We need a PoC to uncover some details:

  • How to register as split button as a toolbar grouping.
  • How to add a main action to the split button via toolbar config.
  • How to define the toolbar grouping as vertical.
  • Can we add a more complex component to a toolbar (like insertViaUrl).

The idea is that we would like to give integrators possibility to define a complex image upload component.

@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Oct 25, 2023
@Witoso Witoso changed the title Better entry point for image file managers. Better entry point for image file managers and insert image changes Nov 20, 2023
@niegowski niegowski self-assigned this Dec 4, 2023
niegowski added a commit that referenced this issue Dec 5, 2023
Feature (image): Introduced the image insert dropdown as a consistent UI to insert images through different available integrations like image upload, insert an image with the asset manager, and insert an image via URL. Closes #15303. Closes #15149.

Other (image): The `ImageUploadUI` plugin is loaded by default when the `ImageBlock` or `ImageInline` plugins are loaded. See #15149.

Other (list, ui): The `CollapsibleView` moved from the `list` package to the `ui` package. See #15149.

Other (ui): The `SplitButtonView` constructor and `createDropdown()` helper accepts an instance of a `ButtonView` as an action view customization. See #15149.

Other (upload): The `FileDialogButtonView` is now an instance of the `ButtonView`, not just a wrapper on it. See #15149.

Internal (ckbox, ckfinder, image): The `ImageUploadUI`, `CKBoxUI`, `CKFinderUI`, and `ImageInsertViaUrlUI` plugins are registering integrations in the `ImageInsertUI`.

Internal (core): Added icons for `ImageUploadUI` and its integrations. Added translation contexts for common labels for images insert/replace via file manager.

MINOR BREAKING CHANGE (list): The `CollapsibleView` moved from the `list` package to the `ui` package. You can import it like this: `import { CollapsibleView } from '@ckeditor/ckeditor5-ui';`
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Dec 5, 2023
@CKEditorBot CKEditorBot added this to the iteration 69 milestone Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic package:ckbox package:image squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants