dronekit / sphinx_3dr_theme Goto Github PK
View Code? Open in Web Editor NEWSphinx 3DR Theme based on sphinx_rdt_theme
Sphinx 3DR Theme based on sphinx_rdt_theme
Lets make it easier for people to report bugs against pages by adding a Page Bug link to the footer. When clicked the link should open a github issue with the subject and body appropriately seeded with the page name and URL.
The will require a config setting in theme so we can enter the target github repo for issues.
It can be done using templating.
You can see an example of what I mean in the Page bug link at the bottom of this page
The ability to add notes, hints, tips, warnings is very useful. Most themes support this CSS. Can we get it added please. See http://udig.refractions.net/files/docs/latest/user/docguide/sphinxSyntax.html#notes-and-warnings
versionadded can be green or yellow - a type of note. deprecated should be a type of warning. I use versionadded in the API Reference for the gimbal dronekit/dronekit-python#498 . I don't use deprecated because this needs to stand out ... but I will if you add support for it :-)
If you navigate to any sidebar link, then there is no obvious UI option to go back to the home page/table of contents.
There is actually an option - clicking the top header bar option for Android/Python - but this doesn't feel like obvious navigation to me. Adding a "Table of Contents" link at the bottom of the glossary or a "Home" at the top might help.
Original posted here dronekit/dronekit-python#310 (comment)
The API reference page for dronekit python is hard to follow and looks very foreign to a programmer. I have stopped going there because it is easier to look at the source code then find what I am looking for on that page.
I suggest we try to match the format of current python API documentation. This will make the experience more familiar and easy to comprehend.
Here are a few python examples:
http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html
https://docs.python.org/2/library/logging.html
Notable characteristics:
-Header/page break for every function(i.e. distinguishable dividers)
-Bold function names
-shows how the function is called in one line
-Lists and describes parameters
-Plenty of white space!
-Class name is listed in front of function name(when applicable)
Non essentials:
-Basic color scheme. Not too crazy
-Show deprecated methods
Other examples:
-Java docs has a very clean, extensible layout. I have never seen it used with python but is a great resource for an API
I use explicit references to link to documents. This allows me to link to headings, and to documents, even if the documents move around.
The links are taking me below the target. For example, there is an anchor at the top of the page: http://python.dronekit.io/quick_start.html#quick-start
Other "top of page" example is http://python.dronekit.io/guide/getting_started.html#get-started
Here is an in-page heading link to a heading: http://python.dronekit.io/quick_start.html#vagrant-sitl-from-full-image - see the heading is off-screen:
See here for an example. This doesn't seem to happen to .. codeblock:: xml
but it does happen to .. codeblock:: java
Currently the sidebar TOC shows displays page titles only. When a page is opened, the toc should expand at that point to include the contents for the page itself.
This is next step from #17.
Inline code items (marked up with double backticks) and code references (links, marked up with :py:class:whatever
) appear the same. A working link code link should be highlighted differently.
I can't test changes to this properly because I cant get the build to run (using Vagrant).
I tried vagrantfile below in root, but can't get it to install all dependencies. Have assigned to the expert - that's you @mrpollo !
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: <<-SHELL
apt-get -y update
echo "[Sphinx 3DR Theme]: Installing build essentials"
apt-get -y install build-essential
echo "[Sphinx 3DR Theme]: Installing Python Devel"
apt-get -y install python-dev
echo "[Sphinx 3DR Theme]: Installing pip ..."
apt-get -y install python-pip
easy_install -U pip
echo "[Sphinx 3DR Theme]: Installing Sphinx ... "
pip install sphinx
echo "[Sphinx 3DR Theme]: Installing NPM ... "
apt-get -y install npm
echo "[Sphinx 3DR Theme]: Installing Bundler ... "
gem install bundler
echo "[Sphinx 3DR Theme]: Installing Bower ... "
npm install -g bower
echo "[Sphinx 3DR Theme]: Installing Grunt-cli ... "
npm install -g grunt-cli
echo "[Sphinx 3DR Theme]: Installing NPM requirements ... "
npm install
echo "[Sphinx 3DR Theme]: Installing Bower requirements ... "
bower install
echo "[Sphinx 3DR Theme]: Building"
grunt build
SHELL
end
Make the sidebar expandable like the one this site.
What this allows that we don't have now:
In summary, this displays a more TOC detail for the current page, while still giving the overview/context of the page within the hierarchy. This is a much better sidebar if you have a bigger documentation set, with some levels of nesting.
This still has some issues following #5 being closed.
The CSS for the autogenerated class documentation is not very useable - http://python.dronekit.io/automodule.html
Consider the example below:
The solution is probably to make classes a little more prominent. Indent any description text for them. Further indent any associated attributes, documentation, functions etc. They might perhaps be a little larger, and function parameters a little smaller.
In addition there is not enough space after tables:
Single level list looks OK (though arguably the space to first bullet could be a bit reduced).
With indented bullet, the spacing isn't quite right - I think the space before the indented bullet should be reduced, and possibly a bit more after. In addition, note how the spacing between the top level bullets is also much bigger than in the example screenshot above.
This is a "mockup" of how it might look if improved:
See example here - note, this is a temporary link, hosted on dropbox.
The "3DR" logo is displayed on top left of navbar on Chrome, but not Firefox or IE (for chrome I tried on a fresh browser, so I think it is not a caching issue).
See dronekit/dronekit-python#39 (closed, because I am opening here) for diagrams
Consider this link to the Vehicle.flush method (on my dropbox).
It takes you here (just below the heading):
When it should take you here (just above the heading):
A version of the autodocs with these links (for manual testing) will be available when this changelist is merged.
dronekit/dronekit-python#58
In the meantime you can easily test just by selecting links from the genindex on the live site.
I expected to be able to use this in the normal way:
However running the drone-kit python docs (e.g. this conf.py) it fails due to missing conf.py in your theme (and yes, this does appear to be missing from the pip installation.
What is the correct way to use this with https://github.com/diydrones/dronekit-python ?
For some large topics, like Getting Started the navigation scrolls out of view. If you want to access it then you have to do a lot of scrolling up to get back to it.
The requirement is to create a mechanism to make it easy to get to the sidebar TOC again. Some ideas:
Can you please create and upload a new PIP then at least I could see what my changes look like before submitting them.
This spaces the sections apart far too much, and should be removed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.