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
UI_CONTROL_MULTI_SELECT does not work as expected #12832
Comments
I'm not 100% sure I get what you mean but yes it is not ideal and it is kind of by design like this. This is simple the multi select we get from materializecss. In the coming up 1.0.0 they improved it a little bit see second example here: https://materializecss.com/select.html but still not ideal. There is not too much we can do I guess unless we embedded another UI library just for this. At some point we will maybe rather remove this feature (maybe in Matomo 4) and ask users to use the new multi tuple instead. I think you may rather want to use the new multi tuple feature see https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/Morpheus/templates/demo.twig#L362 . You can use it like this: $this->makeSetting('fooBar', array(), FieldConfig::TYPE_ARRAY, function (FieldConfig $field) {
$field->title = 'Foo Bar';
$field->description = 'Optionally set one or multiple custom dimensions in scope visit.';
$field->uiControl = FieldConfig::UI_CONTROL_MULTI_PAIR;
$field1 = new FieldConfig\MultiPair('Language', 'languageCode', FieldConfig::UI_CONTROL_SELECT);
$field->uiControlAttributes['field1'] = $field1->toArray();
}), |
I’m not entirely sure if it is by design that it is impossible to select an entry as always others get selected and removed kind of randomly (Gallicanian and Greek in the above video) and even others get highlighted in the drop down. But the new multi tuple feature seem even more user friendly than an correctly working multiselect. |
Lets remove this UI control in Matomo 4 |
Hello, I had the same problem and I've found a solution for this one. But first, I would like to say that this problem is probably caused by the old version of the materialize. How to fix But when we add the class, the label stay behind the selector like that: We can fix this making a custom css. See https://developer.matomo.org/guides/working-with-piwiks-ui. Here's my custom css for that: The 'for' attribute in the label is the value of the $name variable. Final result: We can add any style for the select (and javascript). |
cheers @liquidlx feel free to issue a PR for that. Otherwise in Matomo 4 we're planning to upgrade to latest version of materializecss which maybe fixes the issue as well but we're not sure. |
guess that one needs to wait until #14082 is done. Or shall we update materializecss upfront? |
I think maybe @diosmosis already started some work on this? |
We wouldn't want this in 3.X @diosmosis We can then see if the issue will be fixed automatically maybe. |
👍 closing it for now |
I just wrote a plugin which allows switching between languages quickly. For this I created a
UI_CONTROL_MULTI_SELECT
with all languages (the same can be reproduced with https://plugins.matomo.org/RestrictLanguageSelection as I am using the same selector)I can't really describe it (it feels a bit like
Lights Out
), so here is a video of a try to add French to German:high quality
The text was updated successfully, but these errors were encountered: