google / material-design-lite

Material Design Components in HTML/CSS/JS
https://getmdl.io
Apache License 2.0
32.26k stars 5.04k forks source link

Feature Request : Pagination #1847

Open janpieterz opened 8 years ago

janpieterz commented 8 years ago

In the specs they never mention the pagination very clearly, but I have found it hidden and was looking for the implementation here.

I think the reasons for it are quite clear, certainly with the displayed usage in a datatable the use is beneficial. This does sound like something the official spec either still needs to be written out for, or the displayed image on the website is not confirming to a publicly known spec.

https://www.google.com/design/spec/components/data-tables.html#data-tables-tables-within-cards

futurliberta commented 8 years ago

Something like this ? http://codepen.io/jfily/pen/RWYQgx

Garbee commented 8 years ago

To be clear, are you requesting pagination in Data Tables or a singled-out pagination component for general usage?

janpieterz commented 8 years ago

@jfily indeed, something like that.

@Garbee to be honest, it could be either way, although I would personally see the component an sich beneficial to the total library, I could only find it in the data table spec, so I'd not be sure what the thoughts of the design team are (as in: is that the design for all pagination or just for the data table pagination.

Garbee commented 8 years ago

That is just for the data table component itself. As it should belong in the footer of the table area per the spec.

Marking this as a feature request that needs MD guidance since you'd like it to be a standalone component. We have no guidance on how to handle pagination globally.

Currently what I've been recommending to others is just use buttons and give them a border-radius to round them into full circles. Android uses simple circles for their general pagination, so at least that gets you somewhere.

manjufy commented 7 years ago

Boostrap has a default pagination component part of their library (http://getbootstrap.com/components/#pagination). Why not go with the same approach.

I'm using MD (https://getmdl.io/) with PHP Laravel framework. Sad to say that Laravel default comes with Boostrap and most of the components are embedded to the framework.

I do not see pagination component part of MD, would be great if they could add and move up in the priority list. Glad to say that I'm sticking with MD design with Laravel however need to customise / re-invent some of the components like pagination.

Garbee commented 7 years ago

Just because Bootstrap or here has something doesn't mean we need to have that functionality. MDL (now MDC for V2) is not a framework but a UX library of MD components. If the MD Spec doesn't have it, other than one or two minor things that are kinda specified-by-default like badge, then it isn't something we intend on building.

The current recommended hack for pagination is to just use flat button styling, rounded to circles, and raise the active one. Coloring is whatever you want. It is a little bit of work, but overall pretty easy to implement within your apps if needed.

manjufy commented 7 years ago

@Garbee I totally agree :-). Thanks for the clarification. Also thanks for suggestion for implementing pagination, that's helpful :-).

nipunasudha commented 7 years ago

But what is the point of not offering a pagination component?

Garbee commented 7 years ago

The previous discussion in the thread explains why we are not offering stand-alone pagination functionality. Would you like some more clarification on any point in particular?

kartikv11 commented 7 years ago

I had made a quick Pagination component using MD (https://getmdl.io/). You can check component here, might be of some use : https://www.npmjs.com/package/ember-cli-simple-pagination