GithubHelp home page GithubHelp logo

angular / material.angular.io Goto Github PK

View Code? Open in Web Editor NEW
866.0 36.0 387.0 10.42 MB

Docs site for Angular Components

Home Page: http://material.angular.io

License: MIT License

TypeScript 60.48% JavaScript 7.34% HTML 12.67% Shell 0.56% SCSS 14.32% Starlark 4.63%

material.angular.io's Introduction

Angular Components Docs Site

This is the repository for the Angular Components documentation site.

Versions of this site are also available for

Contributing

Please open bugs against the Angular Material and CDK components, directives, documentation contents, API docs, and demos in the Angular Components repo.

Please only open issues with the documentation site itself (not the content) in this repo. This includes issues like the navigation not working properly, examples or documentation not being presented in an accessible way, issues with rendering or layout of the documentation pages, etc.

Where does the content come from?

The guides, examples, and docs content repo angular/material2-docs-content contains the documentation content and examples. They are generated from:

Development Setup

  1. Make sure you have NodeJS LTS installed
  2. Make sure you have Yarn installed
  3. Install the project's dependencies
    • yarn install
  4. Update to the latest version of the docs-content and examples
    • yarn build:content

Development Server

  1. Run yarn start for a dev server. Navigate to http://localhost:4200/.

Build

Run yarn prod-build to build the project.

Running unit tests

  1. Run yarn test to execute the unit tests via Karma.

Running end-to-end tests

Run yarn e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via yarn start.

Deployment instructions

> yarn install
> yarn upgrade @angular/components-examples

# Development
> yarn publish-dev

# Production
> yarn publish-prod

material.angular.io's People

Contributors

amcdnl avatar amitafr avatar amysorto avatar andrewseguin avatar andy9775 avatar annieyw avatar clydin avatar crisbeto avatar dependabot[bot] avatar devversion avatar donroyco avatar edricchan03 avatar eladbezalel avatar frankiepo avatar gregmagolan avatar jbedard avatar jelbourn avatar jeripeiersbb avatar josephperrott avatar kara avatar kian23kpt avatar mmalerba avatar rafaelss95 avatar riavalon avatar splaktar avatar tinayuangao avatar vivian-hu-zz avatar wagnermaciel avatar willshowell avatar zarend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

material.angular.io's Issues

Implement ApiViewer component

This will consume the json generated from TypeDoc and output tabular API docs.

  • First step will be a service that takes in the TypeDoc output and gives back a data structure that's more in-line with what we're interested in.
  • Needs to be themable based on current material theme

Needs design from #3

Add server-side prerendering

  • When dealing with multiple versions of docs, we likely only want to support prerendering the latest/ version.
  • Will likely be implemented with firebase dynamic hosting

Implement user preferences service

We should store the following via a user preferences service and keep those preferences in localStorage

  • The selected theme
  • Preferred external example viewer (Plunker, CodePen, Jsbin, etc.) (future enhancement)

This is a lower priority than main app content.

Design badge for "Experimental" API

Certain API / components will be marked as "Experimental". It should be very prominent in that component's page.

This is a low priority item for the rest of this year.

Dialog example should include code from dialog-result-example-dialog.html

The overview for the Dialog talks about using elements such as <md-dialog-content> and <md-dialog-actions>. However, no examples of actual code using these elements is visible, because that code would be in the dialog-result-example-dialog.html file (referenced in the .ts files in both the overview and the example), but the actual content of that html file is not visible anywhere.

feat: add a new "file an issue" button in components page

When a user is working with a component and spots a bug, they're probably having https://material.angular.io/components/component/{someComponent} open in their browser. Why not to add a direct github link for submitting a new issue for that component.
I can craft a PR if you think it's a good idea.

Implement Document Viewer component

This is a component that loads a static HTML document (generated from markdown) into itself, and then dynamically loads components into that static document based on certain placeholders.

The most common placeholder will be for a live example. API docs may also be loaded this way.

Examples should show all source files

Right now the example-viewer is hard-coded to show one of each html/css/ts file. This should show all of the files used for the examples.

The should follow a tooling update that changes the example manifest to be automatically generated instead of maintained by hand (#174)

Remove route redundancy for component page

The current route is

https://material.angular.io/components/component/checkbox

It instead should be

https://material.angular.io/components/checkbox

We can add a firebase rewrite rule to avoid breaking old links when we make the change.

Design API docs UX

This will cover the type of information under "API" on the material docs site.

One "API docs" page may contain one or more classes with descriptions for each class, method, and property (potentially plus types as well).

Components may additionally have parts of their API docs for @Inputs and @Outputs (we might just call theme properties and events)

image
(material1 version of this)

No mixin named md-core

ERROR in ./src/main.scss
Module build failed: ModuleBuildError: Module build failed:
undefined
        ^
      No mixin named md-core

A11y Screen Reader - Page structure challenges

Screen reader WCAG issues.

  1. Perceivable: Page structure lacks content relationships; (no region), (missing text label on ), (missing text label on ).
  2. Operable: Pressing Enter key on Link elements (like "COMPONENTS" and "GUIDES") provide no verbal feedback of cursor focus change to notify the blind user.
  3. Understandable: The page is simple but is missing Breadcrumb and proper page Title for orientation.
  4. Robust: Not tested.

Angular Material Accessibility Introduction.mp4: https://www.dropbox.com/s/rz2gtuhnbx9czus/Angular%20Material%20Accessibility%20Introduction.mp4?dl=0

Design Search

Not a top priority, but we will need to have an in-site search eventually. My current thinking is to add it to the top nav. Probably includes an autocomplete.

Also need to think about how to to show the results.

Bug: Wrong initial focus-overlay on a button in the sidenav

I have a sidenav with some md-button navigation buttons in it. By default, my navigation is closed.

The problem is when I trigger to show the navigation for the first time and hover somewhere on the sidenav it makes the first button with focus-overlay effect. Then when I hover on some of the other buttons the hover effect is still there for the first button. I have to click somewhere on the screen to remove the wrong effect.

Link with example of the bug: https://plnkr.co/edit/pNv9Bx4o1qQSF2bpOqyM?p=preview

Implement component view

Page for a single component.

Should use md-tab-nav-bar to go between "Overview", "API", and "Examples"

@tinayuangao we need to confirm the design before getting started on this

Add links for additional help/support resources

The docs site could use a page helping users find outlets to the community and where they can ask questions or provide support for others looking for help.

  • Google Groups
  • StackOverflow
  • Gitter

Sample App Example on Getting Started Page

I was just going through the Angular Material documentation at https://material.angular.io I noticed on Getting Started page there were few App Demo Links given at the end of the page. On clicking either of the links on Getting Started page for app demo these links redirect the user back to https://material.angular.io without showing any data and disabling all the links. Let me explain with the help of screenshots.

  1. Click on either of the links below. Through this screenshot I wanted to show that when we hover on the first link i.e. Material Sample App, it is not like that we are clicking on some wrong link checkout second screenshot in this step only
    image
    image
  2. It starts showing something like this
    image
  3. Now if you try to click on any of the links given in the navbar, it does not perform any of the action. It keeps on showing the page as shown in step 2
  4. If you press F5 i.e. reload that page without making any changes in the address we were redirected to it shows the starting page as shown
    image

Similarly, there is an issue with the second sample app link.

Reset scroll when switching between components

Bug, feature request, or proposal:

I propose reset the scroll position to the top when switching between components on the docs.

What is the expected behavior?

What is the current behavior?

It stays where you are. ie go to autocomplete scroll half way down then go to input and you are halfway down that page when you probably want to be at the top.

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U

https://material.angular.io/components/component/select

What is the use-case or motivation for changing an existing behavior?

Usability

Sample Angular Material projects link breaks site

When I go to https://material.angular.io/guide/getting-started and follow the links at the bottom of the page i get

Loading document...

and console errors.

TypeError: Cannot read property 'document' of undefined

and nothing else happens and to be able to continue to use the site I had to refresh the page.

Material Sample App
https://material.angular.io/guide/material2-app

Angular Connect 2016 Demo
https://material.angular.io/guide/leashed-in

EDIT: seems to be same as #105

Implement LiveExampleViewer

  • Dynamically loads a live-example component as the default view.
  • Can expand to show the source (ts, html, css) with syntax highlighting
  • Can open on Plunker
  • Themable (including the syntax highlighting) based on current material theme.

Design tracked in #2

I cannot scroll docs' main content in safari

2016-12-26 16 40 30

When I open any doc page, I cannot scroll right zone with content, I can scroll only left zone (with components list).

Env: macOS Sierra 10.12.2, Safari 10.0.2 (12602.3.12.0.1)

UPD. In Firefox left column (with menu list) and right column (with content) scrolls together (must scrolls separately instead).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.