Skip to content
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

Adding StyleClass to VisualElement #209

Merged
merged 5 commits into from
Oct 15, 2018

Conversation

davidglassborow
Copy link

see #205

@davidglassborow davidglassborow changed the title Adding StyleClass to VisualElement [WIP]: Adding StyleClass to VisualElement Oct 10, 2018
@davidglassborow davidglassborow changed the title [WIP]: Adding StyleClass to VisualElement Adding StyleClass to VisualElement Oct 10, 2018
@TimLariviere
Copy link
Member

TimLariviere commented Oct 10, 2018

Well done!
Do you know if there's some limitation with changing/removing css?

I tried some cases with the AllControls app, but it doesn't seem to update correctly. (after clicking a new button to switch styles)

  • "cssCallout" changed to "cssRed" (.cssRed { color: Red; })
  • "cssCallout" changed to ""

They don't update visually, even though the control itself is properly updated

@davidglassborow
Copy link
Author

Maybe an XF bug ? Looking at xamarin/Xamarin.Forms#3824, maybe related. Same issue seems to exist with StyleId.

CSS is pretty new in XF, so maybe we can assume a XF limitation for the moment ?

Doesn't affect my use case for the moment so I'm keen to get this merged and nuget updated if your happy ?

@dsyme
Copy link
Collaborator

dsyme commented Oct 12, 2018

The styleClass parameter should be added for each of the three extensions, e.g. here https://github.com/fsprojects/Fabulous/blob/master/extensions/Maps/Xamarin.Forms.Maps.fs#L32

It's annoying to have to do this but not too hard.

@dsyme
Copy link
Collaborator

dsyme commented Oct 12, 2018

Looks like the Unix build is failing, I'm not totally sure why

@TimLariviere
Copy link
Member

Yes, noticed it as well.
It fails for a different reason each time (aapt missing, missing NuGet package, etc.), but most of the times it works.

@davidglassborow
Copy link
Author

Thanks @dsyme I've added styleClass to the 3 extensions as well. Fingers crossed CI is happy :-)

@davidglassborow
Copy link
Author

CI / Paket failing for some reason. That package is available on nuget so no idea why travis is failing.

Paket failed with
-> Could not download OpenTK.GLControl 3.0.1.
-> Couldn't get package details for package OpenTK.GLControl 3.0.1 on https://api.nuget.org/v3/index.json.

@TimLariviere
Copy link
Member

NuGet is currently having troubles: https://status.nuget.org/

Copy link
Member

@TimLariviere TimLariviere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue I mentioned is tracked here: xamarin/Xamarin.Forms#2678

@TimLariviere TimLariviere reopened this Oct 13, 2018
@dsyme dsyme merged commit 2d570a4 into fabulous-dev:master Oct 15, 2018
@davidglassborow davidglassborow deleted the styleClass branch October 15, 2018 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants