Fix/whitespace in authorship highlight #2223 #2228
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
details
fixes the white-space issue with the
<stencila-authorship>
component,the issue was with whitespace and new lines in the html`` templates, (probably due to the 'inline' nature of the host element) these new lines and any leading / trailing whitespaces within the elements were being compressed into a single whitespace. even if removing all these from the the template, the sl-tooltip element was still adding the white space, this is because in the template of that element in the shoelace library contains the whitespace.
I have removed the sl toolitp and replaced it with a simple custom tip that is absolutely positioned, and appears on group hover.
I have formatted the html template in a way that adds no whitespace between elements, and added a
// prettier-ignore
instruction so the file formatting will not alter the template.Also due to codemirrors limitations, have the error messages tooltip and the provenance tooltip active at the same time, will munge the content together in a single ugly af tooltip, I have set the prov tooltip to deactivate if error messages are present for now. until we can make them look nice in the same tooltip / or e able to switch between them.
related issue: #2223