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

Clean up and improve Annotation stories #1466

Merged
merged 1 commit into from
Aug 21, 2023
Merged

Clean up and improve Annotation stories #1466

merged 1 commit into from
Aug 21, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Aug 9, 2023

While working on refactoring Html in #1465 , I noticed that the Annotation stories were in need of a good clean-up.

I took full advantage of Storybook by splitting each annotation example into its own story, which means that the controls now work as expected and the props are properly listed in the Docs page.

I also:

  • removed the SVG story, since Annotation is no longer the recommended way to render SVG elements;
  • added a story to document overflowCanvas.

This actually uncovered a bug: annotations that overflow the canvas are not positioned properly, since they are positioned relatively to the canvasWrapper element, which includes the axes. I have an idea to fix this, but I'll continue working on declarative axes first.

@loichuder
Copy link
Member

image

Just a thought: it would be nice to highlight the (10, 16) point above with a red cross for example.

@axelboc
Copy link
Contributor Author

axelboc commented Aug 21, 2023

Good call! I kept it quite discrete so the text remains readable when the annotation is centred.

image
image

@axelboc axelboc merged commit dc8c110 into main Aug 21, 2023
8 checks passed
@axelboc axelboc deleted the annotation-stories branch August 21, 2023 12:18
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.

2 participants