-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs(app): refactor the Docs App based on the MD prototype #10341
Conversation
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
2852225
to
1901974
Compare
CLAs look good, thanks! |
1901974
to
c78f1ee
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
c78f1ee
to
fb3e6bd
Compare
CLAs look good, thanks! |
Finally, there :) /ping @jesselpalmer, @joshkurz, @caitp, @petebacondarwin |
Awesome. I'll take a look shortly
|
targetElem.scrollIntoView(); | ||
} | ||
} | ||
} |
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.
Why are you not using $anchorScroll
?
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.
Because scrolling does not happen on the window level (but a nested element), we don't want to scroll to top. Thus we need to tell $anchorScroll
which element we want it to scroll to and the only way is to set $location.hash
to its ID (e.g. top-anchor
). And that wouldn't look nice imo.
BTW, I think there is an awesome PR that adds support for providing an explicit hash to $anchorScroll
, in case we don't want it to scroll to $location.hash()
.
There it is: #9596 😉
} | ||
|
||
.type-hint-date { | ||
background:pink; | ||
.md-tile-left .fa { |
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.
Consider renaming the 'fa' class. I can't really tell what this is just by reading it.
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.
This is the FontAwesome base class (so can't rename it).
I am leaving them for now (in case we choose to temporarily use FontAwesome, until materlia design's icon font is released.
We can remove them eventually.
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.
Cool, or should I say awesome :)
|
||
.view-source { | ||
margin-right:10px; | ||
#sidenav-toc.md-locked-open[flex="33"] { |
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.
Add return.
I incorporated the prototype detailed in #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 #3)
fb3e6bd
to
3904cd5
Compare
Updated the PR based on the comments. |
So, just checked it out --- I think it's a reasonable baseline to start with --- there is that huge list of TODOs that we'll want to work on, but I think we could land this to start with, so that Jesse could start working on individual design aspects, and we could start trying to improve the various features in isolation |
@caitp Sounds good to me. |
BTW, some tests have been broken:
|
I like the disable failing test option. That way we can just update the failing tests after the page is more stable and remove whichever ones we don't need anymore. |
We can just disable the docsapp tests for now on the materialize branch --- but yes we will need to re-enable them before shipping this |
but actually, since we will need to update them anyways, it's probably better to fix them as you go |
I pushed a few changes (in a new commit for easier review; should probably be squashed when merging):
/fyi @jesselpalmer, @joshkurz, @caitp, @petebacondarwin |
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/`.
52e65bf
to
7a51d5d
Compare
@caitp: Making sure I understood you correctly: We should ignore e2e tests failing for examples 89 and 90 (temporarily) and disable unit-testing for the Docs app (temporarily again) ? Should I make the changes in this PR or a separate one ? (@caitp: Will you merge this (as soon as we sort out the above) or shall I do it ?) |
I think you should fix the e2e tests so that it's easier to merge into master later. I was going to do it myself, but you are welcome to do it |
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).
Added a new commit (gkalpak@caed914) fixing test-related errors (more details in the commit's message). |
Closed by 8edece2...3d5af88 |
I incorporated the prototype detailed in gkalpak#3.
Things that are different from the prototype (besides using actual data):
(This section probably needs rethinking anyway.)
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:
commented out).
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.
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
gkalpak#3)