Due to the recent changes ragarding the Docs app "Materialization", some
tests where failing for the following reasons:
1. JQuery wasn't being copied to 'build/docs/components/'.
2. E2E examples 89 and 90 were relying on the Bootstrap's glyphicons.
Temporarily replaced with FontAwesome icons; to be replaced with
Material Design iconfont, when ready.
3. `ngMaterial` (and its various dependencies) weren't loaded by Karma
during unit testing (causing modules depending on it to fail). Added a
fake `ngMaterial` module (as a temporary solution).
Since the structure was a little different than the prototype,
classes/styles where not applied correctly to the links in the left
sidenav. This commit fixes the issue.
I also added FontAwesome, in order to be able to display icons until the
Material Design icon-font is released. Since this is a temporary meassure,
I didn't added as a bower dependency; just added a `font-awesome` folder
in assets and added `font-awesome/css/font-awesome.css` to the stylesheets
of each deployment (under `docs/config/services/deployments/`.
I incorporated the prototype detailed in https://github.com/gkalpak/angular.js/issues/3.
Things that are different from the prototype (besides using actual data):
* The left sidenav (toc) is not styled properly (or even readably).
* The subheaders in the left sidenav are not "stickying" properly (only `ng` becomes sticky).
* Icons are missing (since we are not using FontAwesome). E.g. search-fab, toc-toggle, results
* In the right sidenav (search) there are some unwanted horizontal scrollbars.
(This section probably needs rethinking anyway.)
* I have implemented a `responsiveMenu` directive to show the options in the header-menus
(Learn/Develop/Discuss). The purpose is to show the options in a "dropdown-ish" menu on larger
screens and using a BottomSheet on smaller. At the moment a BottomSheet is used on every
screen-size.
Notes:
- Still no version-picker and breadcrumbs (I have left the original implementation of those two
commented out).
- I have replaced the previous docs.css with a new one containing the style of the prototype.
I have renamed the old one to `docs_old.css` and left it there temporarily for quick reference.
We need to clean up this and the rest of the old CSS files.
- The main content area is totally unstyled and needs some love (a lot actually).
I have also "sprinkled" the code with a few more TODOs/FIXMEs.
(For more details on known issues and missing features take a look at
https://github.com/gkalpak/angular.js/issues/3)
The docs images had been duplicated in
```
docs/img/
```
and
```
docs/app/assets/img
```
This commit fixes the gulp build to use the doc images from `docs/img` and
removes the duplocates from `docs/app/assets/img`
Closes#9655
This commit refactors how the search index is built. The docsSearch service
is now defined by a provider, which returns a different implementation of
the service depending upon whether the current browser supports WebWorkers
or now.
* **WebWorker supported**: The index is then built and stored in a new worker.
The service posts and receives messages to and from this worker to make
queries on the search index.
* **WebWorker no supported**: The index is built locally but with a 500ms
delay so that the initial page can render before the browser is blocked as
the index is built.
Also the way that the current app is identified has been modified so we can
slim down the js data files (pages-data.js) to again improve startup time.
Closes#9204Closes#9203
The keywords processor now also extracts the members (i.e. method, properties
and events) into its own search term property. These are then used in the lunr
search index with higher weighting that normal keywords to push services that
contain the query term as a member higher up the search results.
Closes#7661
Form previously posted to target="_blank", but pop-up blockers were causing this to not work.
If a user chose to bypass pop-up blocker one time and click the link, they would arrive at
a new default plnkr, not a plnkr with the desired template.
This fix removes the _blank target, causing the plnkr to open in the current window/tab.
Bootstrap CSS was removing the margin after ul elements if they were
descendents of other ul elements. But if the ul was followed by a p
then this looked terrible.
Related to #5953
In firefox the version picker's dropdown icon from the default `select` element
is still showing. This CSS forces FF to hide the ugly default.
Closes#6878
When the search input box was submitted (i.e. by pressing enter) the
app was supposed to take you to the first item but this was not happening.
It turns out the app was just reading the wrong property for the path to
the item.
Closes#3078
With the minimum search length set to 3, it was not possible to search for `$q`.
Changing this to 2 fixes that without really upsetting the search display, since we
only display the first 40 API and 14 non-API items anyway.
Closes#3078
There are some files in the examples that look like JSON and the default
$http transformResponse handler was trying to convert these from strings
to object. An example was the style.css file in the
https://docs.angularjs.org/api/ng/type/ngModel.NgModelController docs.
This commit fixes this by simply removing this transform when loading
these files.