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

feat: improve SVG exportation #2882

Merged
merged 5 commits into from Feb 2, 2024
Merged

feat: improve SVG exportation #2882

merged 5 commits into from Feb 2, 2024

Conversation

lpatiny
Copy link
Member

@lpatiny lpatiny commented Feb 1, 2024

closes: #2881

@lpatiny lpatiny enabled auto-merge (squash) February 1, 2024 17:32
Copy link

cloudflare-pages bot commented Feb 1, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: aa95f11
Status: ✅  Deploy successful!
Preview URL: https://5244903e.nmrium.pages.dev
Branch Preview URL: https://svg.nmrium.pages.dev

View logs

@lpatiny
Copy link
Member Author

lpatiny commented Feb 1, 2024

@targos I don't know why this test is failing now. The issue is there:

await peakAnnotationLocator.hover();
await nmrium.page.keyboard.press('Delete');
// Test that the peak deleted
await expect(
nmrium.page.locator(
'_react=Peaks[peaksSource="peaks"] >> _react=PeakAnnotation',
),
).toHaveCount(1);

@targos
Copy link
Member

targos commented Feb 1, 2024

It's not obvious, the error is:

<svg width="701" id="nmrSVG" height="786" viewBox="0 …>…</svg> intercepts pointer events

@targos
Copy link
Member

targos commented Feb 1, 2024

I personally can reproduce the same errors outside of this PR (main branch), but on GitHub actions, it is specific to this PR (#2884 passed for example)

Use a selector for the text element so the font size cannot cause issues.
@targos
Copy link
Member

targos commented Feb 2, 2024

Somehow today I couldn't reproduce the problem on main. Found that the issue was related to the font change. We need to ask PW to hover the text element, otherwise it can fall between the text and the annotation, which doesn't trigger the hover.

@targos targos disabled auto-merge February 2, 2024 08:31
@targos targos enabled auto-merge (squash) February 2, 2024 08:38
@targos targos merged commit a974c15 into main Feb 2, 2024
11 checks passed
@targos targos deleted the svg branch February 2, 2024 08:43
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.

Fix .svg formatting of metadata for Word
2 participants