Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

[docs] Improve MediaChange documentation #598

Closed
aciccarello opened this issue Feb 5, 2018 · 7 comments
Closed

[docs] Improve MediaChange documentation #598

aciccarello opened this issue Feb 5, 2018 · 7 comments
Assignees
Labels
best practices docs help wanted The team would appreciate a PR from the community to address this issue P2 Issue that is important to resolve as soon as possible
Milestone

Comments

@aciccarello
Copy link

Bug, feature request, or proposal:

Docs request

What is the expected behavior?

MediaChange properties should be JSDoc annotated. Additionally, the wiki page should clearly explain how to use the MediaChange interface.

What is the current behavior?

MediaChange properties have no JSDoc documentation. The ObservableMedia wiki page does not describe any of the properties of MediaChange.

What are the steps to reproduce?

View MediaChange src and ObservableMedia wiki.

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

Developer ease of use/clarity

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

My understanding is that the changes object doesn't actually contain helpful information other than mqAlias and usually media.isActive() should usually be used for logic checks.

@CaerusKaru
Copy link
Member

Part of #46 and #569, but we'll make sure to take care of this specifically, too.

@CaerusKaru CaerusKaru self-assigned this Feb 5, 2018
@CaerusKaru CaerusKaru added this to the v5.0.0-beta.15 milestone Feb 5, 2018
@CaerusKaru CaerusKaru added the P2 Issue that is important to resolve as soon as possible label Feb 10, 2018
@adamdport
Copy link

adamdport commented Feb 27, 2018

The docs should call out explicitly that mqAlias can only be sm, lg, etc, whereas media.isActive() can use gt-sm, lt-lg, etc. I got hung up trying to use the former and thought I needed change.mqAlias === 'md' || change.mqAlias === 'lg' || change.mqAlias === 'xl'

@CaerusKaru CaerusKaru added the help wanted The team would appreciate a PR from the community to address this issue label Mar 14, 2018
@CaerusKaru CaerusKaru modified the milestones: 7.0.0-beta.20, Backlog Nov 29, 2018
@CaerusKaru CaerusKaru changed the title Improve MediaChange documentation [docs] Improve MediaChange documentation Dec 13, 2018
@CaerusKaru
Copy link
Member

Added it to the Wiki here. Will add JSDoc in a follow-up PR.

@CaerusKaru
Copy link
Member

JSDoc PR: #920

@micobarac
Copy link

micobarac commented Feb 5, 2019

Documentatation seems to be incorrect.

It states that:

mqAlias - e.g. gt-sm, md, gt-lg, defaults to ''

But:

mqAlias doesn't work for gt-sm, gt-md, ...!!!

@CaerusKaru
Copy link
Member

It will in the next release, which should be out within the next couple weeks. If you use the nightly builds, the fix is already committed.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
best practices docs help wanted The team would appreciate a PR from the community to address this issue P2 Issue that is important to resolve as soon as possible
Projects
None yet
Development

No branches or pull requests

4 participants