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(swirly-renderer-next): next gen renderer #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

demensky
Copy link

  • Drawing text with <path />. No need to worry about the presence of the font.
  • Dynamic calculation of stream title width.
  • Dynamic calculation of operator width. <foreignObject /> is not used.
  • Lack of sub pixel coordinates. Clearer display.
  • Rendering without browser APIs. Can be easily run in Node.js.
  • complete & error now have the same radius as next. But complete & error become larger if next overlaps them. Just like here.
  • Built-in dark theme!

The parser is not yet able to handle such a case (or I did not understand how):

  • Has no restriction on nesting of streams.
  • Nested streams in the operator.

Closes: #39
Closes: #40

- [x] Drawing text with `<path />`. No need to worry about the presence of the font.
- [x] Dynamic calculation of stream title width.
- [x] Dynamic calculation of operator width. `<foreignObject />` is not used.
- [x] Lack of sub pixel coordinates. Clearer display.
- [x] Rendering without browser APIs. Can be easily run in Node.js.
- [x] `complete` & `error` now have the same radius as `next`. But `complete` & `error` become larger if `next` overlaps them. [Just like here](https://rxjs.dev/assets/images/marble-diagrams/delayWhen.png).
- [x] Built-in **dark theme**!

The parser is not yet able to handle such a case (or I did not understand how):

- [x] Has no restriction on nesting of streams.
- [x] Nested streams in the operator.

Closes: timdp#39
Closes: timdp#40
@vercel
Copy link

vercel bot commented Jul 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
swirly ✅ Ready (Inspect) Visit Preview Nov 15, 2022 at 10:40AM (UTC)

@timdp
Copy link
Owner

timdp commented Jul 13, 2022

I was gonna suggest creating a PR so thanks! I'll do an in-depth review asap.

@demensky
Copy link
Author

demensky commented Jul 13, 2022

This is not the final revision yet. I wanted to discuss with you the reorganization of styles. My suggestion is to reduce the ability to change styles from within the diagram itself, leaving only the required styles (such as observableDistanceX). Styling will be done when rendering, similar to markdown. This will avoid unnecessary customization.

@demensky
Copy link
Author

What are your suggestions for improving this implementation?

@demensky demensky closed this Nov 15, 2022
@demensky
Copy link
Author

Sorry for not being able to interest you.

@timdp
Copy link
Owner

timdp commented Nov 15, 2022

No, I'm the one who should be sorry.

You've raised a legitimate concern and proposed a solution. More people in OSS should do that.

However, reviewing this is quite a daunting task to me. I was going to start with a few high-level considerations, but while I genuinely do appreciate your input, I can't say I'm looking forward to putting in the raw effort.

Combined with my tendency to drift in and out of specific projects, I'm unable to give you a timeline. But rest assured, this is sitting in my inbox and I'm very much aware of it. That's the best I can do right now.

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.

Text width calculation Feature Request: Adaptive marble diagram
2 participants