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

Edit mode display of the view-file macro looks unbalanced, aesthetically unpleasing #310

Open
lucaa opened this issue Jul 27, 2024 · 2 comments

Comments

@lucaa
Copy link

lucaa commented Jul 27, 2024

How to reproduce:

  • add a view-file macro in a page
  • open the page in edit mode

Actual result:

image

  1. there is some asymetric whitespace under the name of the file in edit mode
  2. the whitespace between the attachment box and the following element is completely missing. This is not the same for other macros, as in the screenshot with info and warning, but this also reproduces with html macros or paragraphs.
  3. the filename passes on the next line, but not clear why as there seems to be a ton of space available - note that this doesn't seem to happen on Firefox, only on Chrome.

Expected result:

  1. symmetric whitespace
  2. proper spacing from surrounding elements - this is also an issue for the view mode, the spacing is too small compared to a spacing between paragraphs
  3. cleaner display of the filename - either surround the file with a box so that it's clear why the filename is cut, or display it entire.
@lucaa
Copy link
Author

lucaa commented Jul 27, 2024

proper spacing from surrounding elements - this is also an issue for the view mode, the spacing is too small compared to a spacing between paragraphs

For this, note that there is a logic in the XWiki skin / content for spacing elements (we are adding margin bottom to all elements, so that the next element is spaced properly). Ideally, this macro (and all macros) should follow that spacing. Also ideally, we shouldn't hardcode the rule of the spacing in the macro code.

Now, I don't know whether there is any "standard" element that could be re-used to obtain the effect with the standard CSS - apparently divs don't have it by default, which is normal.
To compare this with other macros that generate divs, to see what is the rule that they use..

@lucaa
Copy link
Author

lucaa commented Jul 27, 2024

tested with Pro macros 1.19.9 on XWiki 16.4.1

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

No branches or pull requests

1 participant