Skip to content

[audit] overlay extra classes  #6372

Closed
Closed

Description

@willshowell

Bug, feature request, or proposal:

Suggesting library-wide audit

Currently

Overlay components all accept extra classes differently:

Ideally

Consistent NgClass compatibility would be awesome. If not possible, string | string[] support would be good.

Additionally, consistent naming would be nice. Snackbar uses extraClasses, whereas select uses panelClass. Also, select and dialog both use panelClass, but the class is added to different elements.

Activity

  1. added
    P3
    on Aug 16, 2017
  2. jelbourn commented on Aug 16, 2017

    @jelbourn
    Contributor

    Agreed, they should all be consistent. I would want to use panelClass everywhere

  3. amcdnl commented on Sep 24, 2017

    @amcdnl
    Contributor

    @jelbourn - So to clarify, update all the inputs to panelClass with NgClass as the interface? Do we need to deprecate as well?

  4. jelbourn commented on Sep 26, 2017

    @jelbourn
    Contributor

    The template-based components can have NgClass mechanics, but dialog.snack-bar would just stay as strings because there's no binding context

  5. jelbourn commented on Sep 26, 2017

    @jelbourn
    Contributor

    Also this would be a good candidate for a mixin

  6. amcdnl commented on Sep 30, 2017

    @amcdnl
    Contributor

    @jelbourn -

    1. I played around with a mixin but the implementations varied so much, it was tricky. I ended up making a utility parser instead.
    2. Do you want me to rename matTooltipClass to matPanelClass or just leave it for that one?

    Before I make a PR up, can you give this a once over and see if this is on track with what you were thinking? https://github.com/amcdnl/material2/tree/overlay-class-6372

  7. jelbourn commented on Oct 1, 2017

    @jelbourn
    Contributor

    Tooltip can stay as matTooltipClass

  8. jelbourn commented on Oct 1, 2017

    @jelbourn
    Contributor

    If you make a PR it's easier to leave comments; you can mark it as WIP

  9. jelbourn commented on Oct 1, 2017

    @jelbourn
    Contributor

    One thing I will say is that we don't want to add additional cdk packages for utility methods; each one is a public API that a user would potentially need to know about (such as when adding to a systemjs config)

  10. josh18 commented on Oct 27, 2017

    @josh18

    Would it make sense (maybe in another issue / PR) to add a similar input for the .cdk-overlay-container element?

    I guess another option would be to have only one class at the top (.cdk-overlay-container) and then devs can use nested styles to control all parts of the overlay. With the current implementation I don't think there is any way to edit an overlay background from a component?

  11. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions