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

consolidate java/scala content #23052

Closed
2 tasks
patriknw opened this issue May 29, 2017 · 28 comments
Closed
2 tasks

consolidate java/scala content #23052

patriknw opened this issue May 29, 2017 · 28 comments
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted 3 - in progress Someone is working on this ticket help wanted Issues that the core team will likely not have time to work on t:docs

Comments

@patriknw
Copy link
Member

patriknw commented May 29, 2017

With the @java and @scala tags and the multi-tab code snippets it's possible to consolidate java and scala content into same .md file and avoid duplication.

Example: https://raw.githubusercontent.com/akka/akka/master/akka-docs/src/main/paradox/scala/guide/tutorial_1.md

  • actors.md - @richard-imaoka
  • ... you can help too! Please write a comment what you're working on to avoid duplicate work.

Can be done piece-by-piece.

@patriknw patriknw added new-docs 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted labels May 29, 2017
@ktoso ktoso added the help wanted Issues that the core team will likely not have time to work on label May 29, 2017
@atiqsayyed
Copy link
Contributor

@patriknw I'd be very happy to take this up, could you please explain a little more of what are we planning to do? And what are the areas that we'll be focussing on?

@raboof
Copy link
Member

raboof commented May 31, 2017

@atiqsayyed that would be great!

The process is as follows:

  • Mention in this issue which pages you're planning to merge
  • Compare a file in akka-docs/src/main/paradox/java/... with the same one under akka-docs/src/main/paradox/scala/.... They should cover the same contents, but one is for Java and the other is for Scala. The 'compare files' feature of IntelliJ IDEA is a nice tool for this.
  • Update the file in the scala folder to contain both the Scala and Java content. You may use:
    • @scala and @java directives for inline text
    • @@@ div { .group-scala } for blocks
    • code blocks become tabbed
  • Replace the 'java' version of the page with a symlink:
    • Remove the old version (git rm akka-docs/src/main/paradox/java/...)
    • Create a symlink (cd akka-docs/src/main/paradox/java; ln -s ../scala/... ...; cd -)
    • Add the symlink to git (git add akka-docs/src/main/paradox/java/...)
  • Test your changes (sbt akka-docs/paradox, see CONTRIBUTING.md for details, check both the Java and Scala versions)

You could look at https://github.com/akka/akka/pull/23039/files as an example - it's probably best to contribute PR's on a page-per-page basis at least at first. Feel free to let us know if you have any questions/problems!

@richardimaoka
Copy link
Contributor

Hi just to let you know and to avoid duplicated work, I already started on paradox/scala/actors.md and paradox/java/actors.md. I'm going to submit a PR soon. For other .md files I did not start the work yet.

@atiqsayyed
Copy link
Contributor

Okay.. Unfortunately i also started with actors :D
No Issues, I can work on other files. @richard-imaoka thanks for putting it here..

@ktoso
Copy link
Member

ktoso commented Jun 1, 2017

Yep, thanks for coordinating :-)
I'll put a list who works on what in the first post.
Are you going to pick up something else @atiqsayyed ?

@richardimaoka
Copy link
Contributor

richardimaoka commented Jun 1, 2017

@atiqsayyed I am really sorry about that ... I started working on actors.md about a week ago, so I should have submitted a PR earlier so that we could avoid the conflict.

Let's coordinate this using the below list (if the core team prefers, please move the list to the 1st comment on this issue).

The core team or I can mark what @atiqsayyed is working on at the moment.

/java

/java/stream

@atiqsayyed
Copy link
Contributor

atiqsayyed commented Jun 1, 2017

I'll work on

/java/stream/index.md
 /java/stream/stages-overview.md

to start with and try to do as many as possible...
If someone is picking anything please share it here.. Thanks!

@gosubpl
Copy link
Contributor

gosubpl commented Jun 5, 2017

For me: /java/distributed-data.md :)

@gosubpl
Copy link
Contributor

gosubpl commented Jun 5, 2017

And I will also tackle two other: /java/typed-actors.md /java/typed.md

@richardimaoka
Copy link
Contributor

Sure, recorded @gosubpl's items, as well as @atiqsayyed's PR.

@atiqsayyed
Copy link
Contributor

created pull request for stream-cookbook.md

@naferx
Copy link
Contributor

naferx commented Jun 13, 2017

hey @richard-imaoka , I'll give it a try to /java/stream/stream-integrations.md and
/java/stream/stream-introduction.md

@richardimaoka
Copy link
Contributor

OK, marked the items for @atiqsayyed and @naferx

@richardimaoka
Copy link
Contributor

Raised the above issue in akka-http 😃

gosubpl added a commit to gosubpl/akka that referenced this issue Jul 21, 2017
gosubpl added a commit to gosubpl/akka that referenced this issue Jul 23, 2017
gosubpl added a commit to gosubpl/akka that referenced this issue Jul 24, 2017
gosubpl added a commit to gosubpl/akka that referenced this issue Jul 24, 2017
gosubpl added a commit to gosubpl/akka that referenced this issue Jul 25, 2017
@richardimaoka
Copy link
Contributor

Now it looks like /java/stream/index.md is the last one 😃

@raboof
Copy link
Member

raboof commented Aug 16, 2017

Yes, excellent ;).

I couldn't resist trying out what the pages now look like when I remove the page refresh on language switch (6dae337), sneak preview at http://pi.bzzt.net/akka-docs/ . Needs some more careful thinking/work before we can actually put it live, but you can experience how the language switching can now be nice and smooth there :)

@richardimaoka
Copy link
Contributor

Yep, the new language switch is much smoother. I really like it! 👍

As far as I can tell, remaining tasks are:

  1. Redirect on the current versoin: (e.g.) /scala/actors.html to /actors.html
  2. Suggest redirect to the page without /scala or /java when you visit a page for an older version.

https://doc.akka.io/docs/akka/2.4/scala/actors.html
2017-10-30_00h34_59

Is 1. more for server-side settings which the core team takes care, and 2. might be a trick in JavaScript the community can figure out?

@raboof
Copy link
Member

raboof commented Oct 30, 2017

In fact the redirection can be done in the repo, too - see https://github.com/akka/akka/pull/23544/files#diff-b5f788d092e9bf5e9eb7c8cb3365cf83 . I'll update that PR to resolve merge conflicts today and then perhaps we should just merge it.

I suppose we should make a separate ticket for re-introducing the 'suggest the latest version of this page' functionality? Though I think our SEO is now better so people don't end up on older versions of the docs so often anymore ;)

@raboof
Copy link
Member

raboof commented Oct 30, 2017

I added #23869 for the 'latest version' box. I think this one can now be closed! Many thanks to all of you who have been a tremendous help in achieving this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted 3 - in progress Someone is working on this ticket help wanted Issues that the core team will likely not have time to work on t:docs
Projects
None yet
Development

No branches or pull requests

7 participants