michelson / dante2

A complete rewrite of dante editor in draft-js
https://michelson.github.io/dante2/
Other
912 stars 121 forks source link

Toolbar position #129

Open leonidpelykhivskyi opened 6 years ago

leonidpelykhivskyi commented 6 years ago

The toolbar has wrong position and size on small resolutions

screen shot 2018-09-27 at 16 00 37

Do you have any fixes for this?

michelson commented 6 years ago

Hi @LeonidPelyhivskyi , position looks good to me, maybe it's not quite pixel perfect yet. The size could be handled by hiding some elements on media query. I guess that will depend on each implementation.

leonidpelykhivskyi commented 6 years ago

Hi @michelson, the position looks good, you right. I meant toolbar size. I am not sure that is a good idea to hide elements. What I should do if I need all of them? I think it much better if the editor will control the size of the toolbar or by default will be in two line if it can't be rendered in the viewport.

A few more cases:

screen shot 2018-09-27 at 20 37 14 screen shot 2018-09-27 at 20 37 42
michelson commented 6 years ago

Hi @LeonidPelyhivskyi, maybe it would make more sense to set position of the toolbar as fixed (editor's top or bottom ) instead popover mode on mobile context. ¿what do you think about that?

leonidpelykhivskyi commented 6 years ago

Yes, it makes sense. But it will not fix toolbar width. You should do more manipulation with toolbar elements to make it smaller. In any case, it will be much better than now.

idfunctor commented 6 years ago

I've noticed the same issue @LeonidPelyhivskyi however I was able to override with custom CSS rules to make it "perfect" for my implementation. I agree that Dante2 repo itself can have more modular CSS handling but until that gets addressed; just override or fork and change the CSS.

michelson commented 5 years ago

check version 0.5.0-rc13 👍

I've implemented a fixed version of the menu. for mobile will render as:

image

for wide screen will render as:

image

Also you can force the sticky behavior to be always fixed just setting the sticky: true on the toolbar block