SandDance icon indicating copy to clipboard operation
SandDance copied to clipboard

Styling not included when spinning up example app

Open johanbook opened this issue 4 years ago • 5 comments

I tried spinning up the example in https://github.com/microsoft/SandDance/blob/master/packages/sanddance-explorer/README.md using a Create-React-App template, but all styling seems to be missing. Have missed something or is the supplied example incomplete?

johanbook avatar Feb 01 '21 10:02 johanbook

I tried importing the following css import "@msrvida/sanddance-explorer/dist/css/sanddance-explorer.css" which improved it significantly better, but still not as expected, see screenshot.

2021-02-01-112742_1920x1080_scrot

johanbook avatar Feb 01 '21 10:02 johanbook

I think this still is a CSS issue. Giving the explorer component a specific height causes the sidebar to show up:

.sanddance-explorer {
    height: 1000px;
}

Buroni avatar Feb 08 '21 08:02 Buroni

That fixed it, thanks @Buroni! It would be great if this info could be added to the docs as it seems it is needed to get the app to render properly

johanbook avatar Feb 11 '21 08:02 johanbook

Thanks @Buroni 🥇 @johanbook - we didn't make any assumptions on how consumers will size their component. We are open for pull requests, if you'd like to add this info the readme :)

danmarshall avatar Feb 11 '21 08:02 danmarshall

@danmarshall It may be worthwhile to give .sandance-explorer height: 100% by default, so that it takes up the height of whatever container a user puts it in rather than collapsing to the height of the legend. This would be expected default behaviour in my opinion. I'm happy to submit a PR.

Buroni avatar Feb 12 '21 10:02 Buroni

Thanks @Buroni - PRs appreciated :)

danmarshall avatar Jan 13 '23 00:01 danmarshall