pubpub / pubpub-editor

A stand alone, extensible WSIWYG editor based on ProseMirror
GNU General Public License v2.0
101 stars 9 forks source link

Change footnote and cite positioning, add z-index #27

Closed gabestein closed 5 years ago

gabestein commented 5 years ago

This defaults footnotes and citations to opening down, rather than up, as a temporary solution to prevent them from opening off the top of the editor body, which is often occluded by a backgrounded block element that causes the cite/footer not to show. They can still open below the editor, but in most cases there's enough padding or other content below the footer to not have this issue. The long-term solution is still some sort of direction-sensing component.

Screen Shot 2019-08-14 at 5 20 01 PM

The z-index appears to be needed to prevent overlap with other elements within the editor, but I'm not an expert in it.

Screen Shot 2019-08-14 at 5 20 47 PM
gabestein commented 5 years ago

Hrm...this actually causes an issue when line-heights change, because the card might overlap the text, ie:

Screen Shot 2019-08-14 at 5 33 04 PM

So...maybe we need a bigger re-think here? One option is to set the font-size of the wrapper to initial, so it looks something like this:

Screen Shot 2019-08-14 at 5 35 06 PM

This also solves the other issue I'm tasked with, which is making it so citations and footnotes have a consistent size no matter what their parent element appears in. But I could also see us wanting to let the implementer of the editor do those overrides.

So, interested in your thoughts.

isTravis commented 5 years ago

Closing this as it is handled by the node-view updates.