prateekbh / preact-material-components

preact wrapper for "Material Components for the web"
https://material.preactjs.com
MIT License
552 stars 81 forks source link

Material ItemMeta text-only #1337

Open fopina opened 4 years ago

fopina commented 4 years ago

List.ItemMeta only supports icons though ItemMeta in material design allows for text only.

I can make a PR but not sure how to handle non-breaking changes. Different component (ItemMetaText?) or a bool prop with no-icon which defaults to false (so that default behavior is the existing one)?

prateekbh commented 4 years ago

Hi Yes please make a PR to this https://github.com/prateekbh/preact-material-components/blob/2.0/packages/list/src/item/graphic.tsx

fopina commented 4 years ago

thanks for the quick response @prateekbh where is the branch/tag 1.6.0 so I can start by changing that one (as it's the one I use in my app)? Then I can do it for v2-alpha as well

It seems 1.5.8 and 1.6.0 are available in npmjs but not here in github...

prateekbh commented 4 years ago

The PR should be to branch 2.0

fopina commented 4 years ago

I’ll make the PR on branch 2, but I need to make the changes to 1.X as well, as that’s what I’m using. Though I don’t see a 1.6.0 tag...

cromefire commented 4 years ago

1.X is in master

fopina commented 4 years ago

So #1338 and #1339 done to cover 1.x and 2.0. I've opted for a new component ItemMetaText over a flag in the existing one as that'd require more changes (break existing inheritance) and I don't think a property text with default false or icon with default true (to keep retro-compatibility) would make much sense... but let me know your thoughts and I can update

fopina commented 4 years ago

And, sort of off topic, I was trying to build the tarball for my branch such as the one published in npmjs, but I can't find the command (new to npm, preact, etc) nor it seems documented. And as it is not published with travis, can't find it there either... npm run build puts quite a few items in the current directory, not sure how to pack only what matters (to make it only 2.6M in size as the published one)

cromefire commented 4 years ago

Run yarn build and then yarn pack (we use yarn)

fopina commented 4 years ago

Thanks @cromefire got my tarball now (quick responses!)

1.X is in master

Regarding this, https://github.com/prateekbh/preact-material-components/blob/master/package.json#L3 so no idea where to get the version 1.6.0 that is available in npmjs...

cromefire commented 4 years ago

@prateekbh You published that right?

prateekbh commented 4 years ago

That is master, just that I didn't bump the version here