Skip to content

Conversation

@kossebau
Copy link
Contributor

No description provided.

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/1945/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a default size (even 200x200 is fine) set on the <div> to minimize developer confusion. Once I can see where the element is and how it looks like, I can adapt the size myself using the instructions below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you mean see if editorDiv.style.height and style.width is not set on creation, then set something as default? Hm...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're understandably uncomfortable about that - note that there is a precedent for such things in HTML5, for example a textarea has a default width and height as well.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. textarea has the advantage that the browser can simply calculate the pixel size derived from the default size given in columns and lines... whereas we here would have to do some more complicated calculation of a sensible size in pixels from things like what elements are on the toolbar and what page size the document might have.
IMHO an automatic default size should be something sensible, delivering a setup that is useful. Otherwise it makes a bad impression. Some randomly set default size just to help people seeing the element is not a good enough reason I think. Because then some people might rely on the default size, and if we change it in the future, things will break for them and they will be unhappy.
So until we have code to calculate sensible default sizes (and thus also a sensible minimal size) I don't think we should have a default size.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants