myxvisual / react-uwp

📱⌨ React Components that Implement Microsoft's UWP Design & Fluent Design.
https://react-uwp.com
MIT License
1.18k stars 78 forks source link

Dialog component availability? #11

Closed renshenhe closed 7 years ago

renshenhe commented 7 years ago

https://github.com/myxvisual/react-uwp/tree/master/src/Dialog Seems available in the source code but no documentation or usable. Is this a stalled component? Current ContentDialog isn't very versatile since content takes a string and using contentNode without content leaves a large gap.

myxvisual commented 7 years ago

@renshenhe Thank you for your feedback, I suggest that now do not use Dialog, need to continue to improve this component, if I set the padding properties can be controlled, the effect should be better, I would like to hear your voice.

myxvisual commented 7 years ago

@renshenhe This project will support css-in-js and inline-style both styles in the near future, some of the bugs that are not very serious will resolved after the branch merge, because it will change most of the code.

renshenhe commented 7 years ago

@myxvisual Sorry I could not respond sooner, been busy.

The ContentDialog would work fine as a temporary Dialog component if content prop accepted reactNode instead of string or access to it's attributes/styles. I am unsure whether there was intention in making it have a minimum height or accepts a string only so I cannot comment on it's design. Personally I would prefer a Dialog component with an empty body that is controlled visibly through props and onBlur but I have only glanced at the source code of ContentDialog so my assessment could be lacking.

I am looking forward to the reimplementation using css-in-js as inline-style leaves much wanting and a messy browser inspections.

So far the library has been pleasant to work with, though I have many personal preferences when it comes to the current design of the library:

No need to take my suggestions, the library is great, but these are just things I found lacking when rewriting my app with react-uwp.

Thanks for listening!

myxvisual commented 7 years ago

@renshenhe Thanks for useful advice.

myxvisual commented 7 years ago

@renshenhe i already update ContentDialog to Docs, you can try some new API to build your custom UI, the Tabs is more powerfull then before.

renshenhe commented 7 years ago

@myxvisual What changed exactly with ContentDialog? I couldn't find anything significant in the recent commits. The issue I have with ContentDialog is that content property has a minimum height which makes contentNode have a large gap above it. Any reason why content can't just accept a react node?

myxvisual commented 7 years ago

@renshenhe hi, now ContentDialog is support custom padding props, it could help you solve your requirement? The ContentDialog Docs

renshenhe commented 7 years ago

@myxvisual It was never the padding issue, it was the min-height: 160px on content-dialog-titleWrapper that meant if contentNode would always have a 160px top gap if no values were passed to title or content. My requirements would simply be removing title and content and just having contentNode so the component would be more customizable.

If ContentDialog was designed for a specific purpose than that's fine but since the library currently does not have a stand alone Dialog component which leaves a lot to be desired.

myxvisual commented 7 years ago

@renshenhe sure, now i know what you want, i will continue to develop the Dialog component.

myxvisual commented 7 years ago

@renshenhe hi, the Dialog is available at v1.1.2.

myxvisual commented 7 years ago

@renshenhe If this update has solves your needs, you can close this issue, thanks.

renshenhe commented 7 years ago

@myxvisual thanks for the implementation, really active commitment! I haven't gotten a chance to dive into the new Dialog component as much of my current usage is ContentDialog and removing min-heigh from title-wrapper at the moment.

I have taken a slight glance at it and seems far more customizable so it looks good!