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

There should be some way to globally disable the magic block feature #6774

Closed
oleq opened this issue May 8, 2020 · 5 comments · Fixed by #7582
Closed

There should be some way to globally disable the magic block feature #6774

oleq opened this issue May 8, 2020 · 5 comments · Fixed by #7582
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. squad:magic support:2 An issue reported by a commercially licensed client. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@oleq
Copy link
Member

oleq commented May 8, 2020

ATM it's a dependency of Widget so even config.removePlugins won't work and some integrators may want to get rid of it (for whatever the reason).

When we implement the keyboard support, then using CSS to get rid of it won't be an option because the feature will change the behavior of the selection.

@oleq oleq added domain:ui/ux This issue reports a problem related to UI or UX. squad:magic type:improvement This issue reports a possible enhancement of an existing feature. labels May 8, 2020
@Reinmar Reinmar added this to the nice-to-have milestone May 11, 2020
@Reinmar
Copy link
Member

Reinmar commented Jun 29, 2020

I'm considering moving it to Essentials. It's fairly easy to replace Essentials with your own list of plugins. 

Alternatively/Optionally, we could introduce something like optional dependencies. You would be able to use config.removePlugins to remove an optional dependency. This could potentially be useful in more cases. WDYT?

I feel that using WidgetTypeAround#isEnabled in order to disable that feature as a whole makes no sense. It shows that we're doing something wrong.

OTOH, if WidgetTypeAround is an optional dependency of Widget, then its code will be included in the bundle even if you want to disable it, which still smells bad. Perhaps we should just move it to Essentials and that's it. Alternatively, Widget could become such a glue plugin (all code would need to be moved elsewhere, e.g. to WidgetEngine).

@Reinmar Reinmar added the support:2 An issue reported by a commercially licensed client. label Jun 29, 2020
@oleq
Copy link
Member Author

oleq commented Jul 6, 2020

As for extending the Essentials: for one thing, I don't think the WTA is essential (like undo or enter). For another, it's a subset of some other feature (Widget) which itself is optional (you may not load image/media/table and not use Widget at all) so I see no good reason to elevate it.

Alternatively, Widget could become such a glue plugin (all code would need to be moved elsewhere, e.g. to WidgetEngine).

I like this feature composition concept so maybe this is the right thing to do.

@Reinmar
Copy link
Member

Reinmar commented Jul 7, 2020

Cases to address:

  • Disable the entire feature (buttons, keyboard) cause someone may simply not like it at all.
    • The simplest option here will be to use WidgetTypeAround#forceDisabled().
  • Hide buttons in all cases cause e.g. they obscure the view.
    • For now, CSS will be enough.
  • Disable the ability to type before/after a certain widget instance (i.e. - caret and buttons).
    • It seems that it could be driven by view-element custom properties (for before and after the widget).

@Reinmar
Copy link
Member

Reinmar commented Jul 7, 2020

TODO: We need to write a feature guide or a deep dive guide in the framework section in which we'll:

  • introduce and showcase this feature
  • list the ways to disable it (all 3)

@Reinmar Reinmar modified the milestones: nice-to-have, iteration 34 Jul 7, 2020
@jswiderski
Copy link

Use case from the client (support ticket no. 63880) - they want to block the behavior completely because they only want to allow typing inside widgets which makes perfect sense if they have one big widget inside editor a content area.

@oleq oleq self-assigned this Jul 8, 2020
niegowski added a commit that referenced this issue Jul 9, 2020
Feature (widget): Made it possible to disable the `WidgetTypeAround` plugin on the fly. Closes #6774.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. squad:magic support:2 An issue reported by a commercially licensed client. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants