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

Quill Bubble Theme Issue #1

Open
RalfBarkow opened this issue Dec 2, 2019 · 12 comments
Open

Quill Bubble Theme Issue #1

RalfBarkow opened this issue Dec 2, 2019 · 12 comments

Comments

@RalfBarkow
Copy link

Context of this issue is https://forum.dmx.systems/t/dmx-5-0-beta-2-released/37/3

at the moment you can upload and embed images via the richtext editor. This works in all HTML fields, e.g. in a Note topic.

In dm5-detail-panel, bubble theme of Quill, the toolbar is hidden behind the Note view if Text is only 1 line. The follwing image shows Devtools layout view after adding some lines to the Text.

A simple solution might be to add some bottom padding.

BTW: How could one change the Quill theme to Snow?

Quill Bubble Theme Issue

@jri
Copy link
Member

jri commented Dec 2, 2019

This is a known issue, and to my knowledge there is no simple solution. See the discussion at https://git.dmx.systems/dmx-platform/dmx-platform/issues/218

The problem is that in DMX the Quill toolbar is part of the scrollable detail panel content, so outside the scroll area it is clipped.

Workaround: when the toolbar is clipped just scroll it into view.

BTW: How could one change the Quill theme to Snow?

In the context of DMX you can change the Quill theme (not tested) here: https://git.dmx.systems/dmx-platform/dmx-platform/blob/master/modules/dmx-webclient/src/main/js/store/webclient.js#L30
But you have to build DMX then (resp. run it in dev mode). Tell me if you need more info.

@RalfBarkow
Copy link
Author

Thanks Jörg! Changed Quill Theme to Snow:

Bildschirmfoto 2019-12-02 um 14 11 30

@jri
Copy link
Member

jri commented Dec 2, 2019

Cool! Tell me if you need any further help.

@RalfBarkow
Copy link
Author

RalfBarkow commented Dec 2, 2019

Jörg, I think we might have to take a closer look at this again later.

If you Click Save:
Bildschirmfoto 2019-12-02 um 14 32 22
you will see Write and Preview icons on the right.

Click Write icon:
Bildschirmfoto 2019-12-02 um 14 36 30

and you get 2 * Snow ... :-(
But I would say, this is a minor issue compared to the advantages of changing to Swow theme.
We could fix Write and Preview later.

@RalfBarkow
Copy link
Author

Unfortunately every click on Edit adds another Quill toolbar.

@RalfBarkow
Copy link
Author

RalfBarkow commented Dec 2, 2019

Like to share a statement of Jörg (and close this issue):

A basic UI concept of DMX is that the UI disappears as far as possible. This means that ideally the screen only displays content, no controls. Content is the reason why the user sits in front of the screen, controls are a necessary evil. Evil because the screen space is by far the most limited resource ever.
Therefore DMX uses the "Bubble" theme.

@jri
Copy link
Member

jri commented Dec 2, 2019

@RalfBarkow thank you for the good translation and sharing that statement!

Regarding the clipped toolbar: I tend not to apply additional padding as it would create unwanted empty space when the toolbar is not visible.

Workaround: when the toolbar is clipped just scroll it into view.

Possibly here lies a solution: do that scrolling programmatically. That is every time the toolbar appears check if it fits viewport, and if not scroll the content area accordingly.

@RalfBarkow
Copy link
Author

@jri Sounds good, but I'm afraid this exceeds my JS knowledge.
Found Element.scrollIntoView() @ https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
Does that help?

@RalfBarkow RalfBarkow reopened this Dec 2, 2019
@RalfBarkow
Copy link
Author

RalfBarkow commented Dec 2, 2019

@jri
Copy link
Member

jri commented Dec 2, 2019

OK, I'll work on that soon.
Thanks for the links!

@jri
Copy link
Member

jri commented Dec 3, 2019

I did some research and tried various things, but no success. In order to continue I'd need support from Quill community (which unfortunately is not very active since a while). I've filed an issue: slab/quill#2859

@RalfBarkow
Copy link
Author

@jri made a pen that demonstrates the use of vue-quill-minimum:
https://codepen.io/jri/pen/ZEYYNMZ

Codepen is great for experimenting. You can easily change code and try it out with the Run button. This should make it easy for you to switch from bubble to snow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants