Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: properly align lists within dialogs #4825

Closed
rolandjitsu opened this issue May 26, 2017 · 5 comments
Closed

feat: properly align lists within dialogs #4825

rolandjitsu opened this issue May 26, 2017 · 5 comments
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs: discussion Further discussion with the team is needed before proceeding P4 A relatively minor issue that is not relevant to core functions

Comments

@rolandjitsu
Copy link

Bug, feature request, or proposal:

Feature

What is the expected behavior?

According to the Material specs, there are Simple Dialogs, which allows for the use of lists within a dialog. Lists in dialogs should be properly aligned (either remove padding on dialog when there's lists inside them or the padding on the list itself if it's a child of a dialog).

What is the current behavior?

Currently lists look a little odd in a dialog.

What are the steps to reproduce?

Render a simple dialog with the following content:

<md-nav-list>
    <h1 md-subheader>Test</h3>
    <a *ngFor="let item of items; trackBy" md-list-item (click)="goToItem(item)">
        <h2 md-line>{{item.name}}</h2>
    </a>
</md-nav-list>

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

Since the specs allow for this, it would be a good idea to support it.

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

Angular 4.1.3
Material 2.0.0-beta.6
TypeScript 2.3.3
Mac OS X 10.12.4

Is there anything else we should know?

@willshowell
Copy link
Contributor

When #4722 lands, you should be able to do something like,

comp.ts

this.dialog.open(MyListDialogComponent, { panelClass: 'list-dialog-panel' })

global.css

.list-dialog-panel .mat-dialog-container {
  padding: 0;
}

Though I'd also be curious whether this is something that should be supported out of the box.

@rolandjitsu
Copy link
Author

@willshowell since it's a spec, it should probably be supported out of the box, or so I'd like 😄

@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions labels May 31, 2017
@patmilano
Copy link

patmilano commented Aug 3, 2017

Hi @willshowell I am only posting here because this is mostly related to trackBy. What would you do in this situation?

I am implementing this plnkr (that I believe you wrote) and am running into issues with it.

@jelbourn
Copy link
Member

Going to close this since it looks obsolete based on the 2018 Material Design spec update.

Aside from that, though, I don't see a good way to support this from an API standpoint. The default dialog experience has padding, and adding some kind of configuration or alternate method to change that seems more complicated than customizing the CSS.

@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 9, 2019
@mmalerba mmalerba added the needs: discussion Further discussion with the team is needed before proceeding label Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs: discussion Further discussion with the team is needed before proceeding P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

6 participants