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

Yottagrams? #16

Open
vaughn-taylor opened this issue Aug 24, 2020 · 2 comments
Open

Yottagrams? #16

vaughn-taylor opened this issue Aug 24, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@vaughn-taylor
Copy link

Is your feature request related to a problem? Please describe.

I noticed you had controlling units in your roadmap, but I'm wondering when you may be able to push that out?

Describe the solution you would like

Clearly, Yottagrams is not going to be used often, so it would be nice to be able to suppress units that are silly.

Describe alternatives you have considered

I'm fine with a config file to handle this –– I don't need this to be built in to the Control Panel

Additional context

Femtogram? Is that a thing? ;)

@vaughn-taylor vaughn-taylor added the enhancement New feature or request label Aug 24, 2020
@khalwat
Copy link
Contributor

khalwat commented Oct 18, 2022

It uses this library: https://github.com/PhpUnitsOfMeasure/php-units-of-measure

...and asks each of the classes what units are supported. So some kind of filter would need to be added to then remove those units that you're not interested in.

@devilleandlear
Copy link

Is your feature request related to a problem? Please describe.

I noticed you had controlling units in your roadmap, but I'm wondering when you may be able to push that out?

Describe the solution you would like

Clearly, Yottagrams is not going to be used often, so it would be nice to be able to suppress units that are silly.

Describe alternatives you have considered

I'm fine with a config file to handle this –– I don't need this to be built in to the Control Panel

Additional context

Femtogram? Is that a thing? ;)

As a workaround you could use Control Panel JS to remove the options on the frontend.

var selectObject = document.getElementById("fields-spanunits");
if (typeof(selectObject) != 'undefined' && selectObject != null)
{
    for (var i=0; i < selectObject.length; i++) {
        if (selectObject.options[i].value == 'Ym') selectObject.remove(i);
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants