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

Switch to Material UI #506

Open
adamdriscoll opened this Issue Dec 6, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@adamdriscoll
Copy link
Member

adamdriscoll commented Dec 6, 2018

@AlonGvili and I have been floating the notion of replacing Materialize CSS with Material UI. Some benefits of this migration:

  • React-based library integrates well with UD as it is React-based
  • Material UI offers more built in components
  • Material UI contains a theme provider

As an example of how well it integrates into UD, I made a small patch to the existing UD code-base to include Material-UI and adjust how UDElement works a bit (a hack for now).

From there I was then able to use the Material UI element directly in UD with New-UDElement.

Start-UDDashboard -Content {
    New-UDDashboard -Title "Material UI Test" -Content {

        $Style = @{
            margin = 12
        }

        New-UDElement -Tag 'MU-Button' -Attributes @{
            variant = "contained"
            style = $Style
            onClick = {
                Show-UDToast -Message 'Default' -Position topLeft
            }
        } -Content { "Default "}
        New-UDElement -Tag 'MU-Button' -Attributes @{
            variant = "contained"
            style = $Style
            color = 'primary'
            onClick = {
                Show-UDToast -Message 'Primary'  -Position topLeft
            }
        } -Content {
            "Primary"
        }
    }
} -Port 10001 

The event handlers even work!

material-ui

This will likely be UD 3.0 work as I'm sure there will be breaking changes moving from one UI framework to another.

Please review Material UI, chime in and let us know what you think!

PS: This will not affect UDChart, UDMonitor or UDNivoChart.

@adamdriscoll adamdriscoll added this to the 3.0.0 milestone Dec 6, 2018

@ArtisanByteCrafter

This comment has been minimized.

Copy link

ArtisanByteCrafter commented Dec 8, 2018

I love the possibilities here. Do you know offhand if all of the existing features would be available using this new framework, or would we need to plan deprecations of certain things? (charts/grids/monitors/whatever)

Porting or re-coding these objects is fine, I'd just hate to have to remove existing functionality if they are not offered in Material-UI.

@adamdriscoll

This comment has been minimized.

Copy link
Member Author

adamdriscoll commented Dec 8, 2018

Charts, monitors, grids will all still be there. Some things might look a little different (like tables) but we hope to limit the breaking changes as much as possible.

@AlonGvili

This comment has been minimized.

Copy link
Contributor

AlonGvili commented Dec 8, 2018

@artvandelay440 and you have new things like icon buttons with badge options, search field option in AppBar and so on..

image

@dtnyc9005

This comment has been minimized.

Copy link

dtnyc9005 commented Dec 8, 2018

SICK.... love to see all this come to UD, awesome work guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment