-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
docs: event stream typed document (#29109) #32100
Conversation
close-reopen to retrigger paused CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR passed. Let's take a look at these typed cases to see if they are correct.
akka-actor-typed-tests/src/test/scala/akka/actor/typed/eventstream/LoggingDocSpec.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I left some smaller feedback
@@@ div { .group-java } | ||
|
||
@@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #imports-deadletter } | ||
|
||
@@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #deadletter-actor } | ||
|
||
it can be subscribed like this: | ||
|
||
@@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #deadletters } | ||
|
||
@@@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The div { group-java/scala }
blocks doesn't lead to a tabbed code box, which is especially unfortunate as. a first code snippet, better turn them into complete regular code snippet blocks and either have the text "it can be subscribed like this" inbetween for both Scala and Java with a second code snippet for subscribing for both languages, or put it all in one code block and skip that text.
@@@ div { .group-java } | |
@@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #imports-deadletter } | |
@@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #deadletter-actor } | |
it can be subscribed like this: | |
@@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #deadletters } | |
@@@ | |
Java | |
: @@snip [LoggingDocTest.java](/akka-actor-typed-tests/src/test/java/akka/actor/typed/eventstream/LoggingDocTest.java) { #imports-deadletter #deadletter-actor #deadletters } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, however, this div { group-java/scala }
block will still follow tab switching.
Therefore, we will add a Tabbed to the first snippet of this block and retain the div { group-java }
only, as it is not allowed to combine imports and class definitions in Java (it would be broken by the format plugin).
I have pushed a commit to explain this, and the final result is like this on my PC, I think this will be better. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that is better, the big problem was the first code snippet in the page not having the tabs.
Co-authored-by: Johan Andrén <[email protected]>
Co-authored-by: Johan Andrén <[email protected]>
Co-authored-by: Johan Andrén <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
References #29109