Git Product home page Git Product logo

Comments (7)

benlower avatar benlower commented on June 19, 2024 1

We're taking a look at this.

from extensions-api.

tjallingt avatar tjallingt commented on June 19, 2024

Great to hear! This would allow me to strip a really ugly hack out of my extension code 😅

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

@tjallingt What is the locale of you Desktop instance set to? If it's not en-US, can you try reproducing with it set to en-US?

from extensions-api.

tjallingt avatar tjallingt commented on June 19, 2024

My locale is set to en-US:

capture2

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

OK, It does have to do with your machine's locale and therefore how Tableau is displaying the parameter. With my os language set to English, I could not reproduce this ('0.1' showed 10.00% in the param), but then I changed my os language to French and that changed how Tableau was displaying the value in the param to 10,00% (similar to your screenshot). Now, I have to pass in '0,1' for it to work and '0.1' throws an error.

So in a way that feels consistent, but I also repro'd what you said about param.currentValue returning '0.1' even when the param is using commas for delimeters. So that is inconsistent and we also have to make sure the allowableValues gives you the right info to know what to pass in.

Thanks for letting us know about this.

from extensions-api.

tjallingt avatar tjallingt commented on June 19, 2024

Hey @Kovner thanks for your response, great to hear you figured out what is causing this strange behaviour 👍

So i see two bugs and a feature request here, the bugs (as i see it):

  • the allowableValues is giving me a value that does not match what changeValueAsync expects
  • the locale returned by tableau is somehow not the locale that is actually used for localisation of the data (if my locale was causing this problem why did tableau report my locale to be en-us?)

The feature request concerns the fact that obviously string representations of numeric values are not perfect (especially when casting is made difficult by different localisations of the same value). It would be great if allowableValues and changeValueAsync would just use floating point numbers for percentages.

I'm assuming the reason the extension API is spitting out strings is somehow tied to how Tableau is handling this data internally so there might not be a quick fix for that but perhaps the extension api could supply us with a localisation method that takes care of correctly formatting percentages for changeValueAsync (and all the other places values are expected to be localised of course)

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

Yep, I agree with all of that. We'll look into it soon, but I'm not sure whether any related fixes will be in v1 of Extensions API or post-v1. And if it's post-v1, we'll have to be sure to not make breaking changes.

from extensions-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.