Skip to content

Conversation

@thunterdb
Copy link
Contributor

This PR adds a sidebar menu when browsing the user guide of MLlib. It uses a YAML file to describe the structure of the documentation. It should be trivial to adapt this to the other projects.

screen shot 2015-11-18 at 4 46 12 pm

@SparkQA
Copy link

SparkQA commented Nov 19, 2015

Test build #46280 has finished for PR 9826 at commit d67f060.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public final class UnsafeSorterSpillReader extends UnsafeSorterIterator implements Closeable\n * class CountVectorizerModelWriter(instance: CountVectorizerModel) extends Writer\n * final class IDF(override val uid: String) extends Estimator[IDFModel] with IDFBase with Writable\n * class MinMaxScalerModelWriter(instance: MinMaxScalerModel) extends Writer\n * class StandardScalerModelWriter(instance: StandardScalerModel) extends Writer\n * class StringIndexModelWriter(instance: StringIndexerModel) extends Writer\n * class ALS(override val uid: String) extends Estimator[ALSModel] with ALSParams with Writable\n * trait ScalaReflection\n * case class Schema(dataType: DataType, nullable: Boolean)\n * s\"Unable to generate an encoder for inner class$\n *case class EncodeUsingSerializer(child: Expression, kryo: Boolean) extends UnaryExpression \n *case class DecodeUsingSerializer[T](child: Expression, tag: ClassTag[T], kryo: Boolean)`\n

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elastic-net

@mengxr
Copy link
Contributor

mengxr commented Nov 19, 2015

Great work! Shall we hide the side-nav-bar if width is not sufficient? See attached screenshot:

screen shot 2015-11-18 at 6 45 11 pm

@thunterdb
Copy link
Contributor Author

@mengxr with the fixes, the top menu breaks before the side menu :-)
screen shot 2015-11-19 at 11 30 13 am
screen shot 2015-11-19 at 11 30 25 am

@thunterdb
Copy link
Contributor Author

This is about as much as I can do with my very limited knowledge of CSS, so additional fixes can be done in a separate PR.

@SparkQA
Copy link

SparkQA commented Nov 19, 2015

Test build #46343 has finished for PR 9826 at commit c8a7cb2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

nice! I wonder if there's something more general we can do. This is useful across all pages in the docs so it would be worth investigating if there are existing frameworks we can use. E.g. this format is nice: http://docs.scala-lang.org/overviews/core/futures.html

@thunterdb
Copy link
Contributor Author

@andrewor14 this is a different issue: the SIPs show the table of contents within one document, which we already have with the {:toc} directive. This PR adds the per-project organization (linking various markdown files together). This is not something we can infer automatically because we show different levels of nesting for each of the pages. Each project already has this description in their overview pages, and I am proposing we move them to the side bar:

@thunterdb
Copy link
Contributor Author

@mengxr based on our discussions, here is a slightly updated version:

  • menu is fixed
  • menu disappears under the page (but it looks half covered in the middle). Fixing that would require JS, I think (and sk-learn does not have a fixed menu):

screen shot 2015-11-19 at 3 10 50 pm

@mengxr
Copy link
Contributor

mengxr commented Nov 20, 2015

@thunterdb Could you try the following CSS:

.left-menu-wrapper {
  position: absolute;
  height: 100%;
  width: 256px;
  margin-top: -20px;
  padding-top: 20px;
  background-color: #F0F8FC;
}

.left-menu {
  position: fixed;
  width: 256px;
  padding-right: 10px;
}

It doesn't fix the issue with hiding the sidebar but makes the background lighter:

screen shot 2015-11-19 at 11 38 05 pm

@thunterdb
Copy link
Contributor Author

@mengxr comment addressed

@mengxr
Copy link
Contributor

mengxr commented Nov 20, 2015

test this please

2 similar comments
@mengxr
Copy link
Contributor

mengxr commented Nov 20, 2015

test this please

@mengxr
Copy link
Contributor

mengxr commented Nov 21, 2015

test this please

@SparkQA
Copy link

SparkQA commented Nov 21, 2015

Test build #46457 has finished for PR 9826 at commit 0350265.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Nov 23, 2015
This PR adds a sidebar menu when browsing the user guide of MLlib. It uses a YAML file to describe the structure of the documentation. It should be trivial to adapt this to the other projects.

![screen shot 2015-11-18 at 4 46 12 pm](https://cloud.githubusercontent.com/assets/7594753/11259591/a55173f4-8e17-11e5-9340-0aed79d66262.png)

Author: Timothy Hunter <timhunter@databricks.com>

Closes #9826 from thunterdb/spark-11835.

(cherry picked from commit fc4b792)
Signed-off-by: Xiangrui Meng <meng@databricks.com>
@asfgit asfgit closed this in fc4b792 Nov 23, 2015
@mengxr
Copy link
Contributor

mengxr commented Nov 23, 2015

LGTM. Merged into master and branch-1.6. Thanks! (The Jenkins test failure is irrelevant. The PR build doesn't compile doc anyway. So I verified the changes on my local computer.)

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.

4 participants