Issue #7083: Icon browser/picker in core#5237
Issue #7083: Icon browser/picker in core#5237docwilmot wants to merge 28 commits intobackdrop:1.xfrom
Conversation
|
Related to: backdrop/backdrop-issues#7083 |
Rename the icon_get_all_details() parameter from $icon_key to $icon_name and update internal variable names.
|
I've committed a temporary change to path |
| else { | ||
| ${$param} = $config->get('icon_browser_' . $param); | ||
| } | ||
| } |
There was a problem hiding this comment.
To get back the token here (after the loop):
$_GET['token'] = backdrop_get_token('icon-browser-endpoint');
I'm not sure if that is the right approach, I only saw that this seems to fix the problem with filters wiping out the access token.
| ${$param} = $config->get('icon_browser_' . $param); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
In theory - with the same trick - you could get the path (query "q") back here without fiddling in JavaScript.
$_GET['q'] = 'icon-browser/dialog';
Not sure, either, if this is the proper way. It seems to work.
| "icon_browser_style": "any", | ||
| "icon_browser_keyword": "", | ||
| "icon_browser_size": "medium", | ||
| "icon_browser_include_brands": 0, |
There was a problem hiding this comment.
I belief, some of the latest changes in this PR might make some of these config items obsolete.
And TBH, I'm not sure if we need all of them. And if so, if it has to be config (or rather hook). And even if it's config - if those items have to go into the - always loaded - system.core.json or some other file.
Only brainstorming here. 😉
There was a problem hiding this comment.
You're right, got rid of all config entries.
| height: 36px; | ||
| } | ||
| .ui-dialog.icon-browser-dialog { | ||
| max-width:75%; |
There was a problem hiding this comment.
Switching to vw (viewport width) here with max-width would make this dialog mobile friendly.
% doesn't work, as the dialog has position "fixed", vw also works with position absolute/fixed/whatever... 😉
There was a problem hiding this comment.
Interestingly, I see no difference in behaviour between vh and % on my local (Chrome) but changed it anyway.
There was a problem hiding this comment.
You can see the difference on smaller screens or when resizing the browser window.
% does not resize the dialog, but vw makes it so the dialog isn't wider than the browser window, which would required to scroll horizontally to see all content. 😉
You made it 65vw, BTW (not 75).
|
Tugboat has finished building a preview for this pull request! Website: https://pr5237-ina3t5vmb6zn5wpklwgtmcfhs8lwsza2.tugboatqa.com/ This preview will automatically expire on the 20th of June, 2026. |
Fixes backdrop/backdrop-issues#7083