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

Fix/whitespace in authorship highlight #2223 #2228

Merged
merged 2 commits into from
May 19, 2024

Conversation

mike-parkin
Copy link
Collaborator

@mike-parkin mike-parkin commented May 17, 2024

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

@nokome nokome merged commit 0b4da91 into main May 19, 2024
7 of 8 checks passed
@nokome nokome deleted the fix/whitespace-in-authorship-highlight-#2223 branch May 20, 2024 00:12
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.

None yet

2 participants