Skip to content

Issue #7083: Icon browser/picker in core#5237

Open
docwilmot wants to merge 28 commits intobackdrop:1.xfrom
docwilmot:icon-picker
Open

Issue #7083: Icon browser/picker in core#5237
docwilmot wants to merge 28 commits intobackdrop:1.xfrom
docwilmot:icon-picker

Conversation

@docwilmot
Copy link
Copy Markdown
Contributor

@backdrop-ci
Copy link
Copy Markdown
Collaborator

Related to: backdrop/backdrop-issues#7083

@docwilmot
Copy link
Copy Markdown
Contributor Author

I've committed a temporary change to path admin/structure/file-types/settings where replaced the token browser link with the new icon browser link, for testing, because there isn't anywhere in core with that link as yet.

else {
${$param} = $config->get('icon_browser_' . $param);
}
}
Copy link
Copy Markdown
Member

@indigoxela indigoxela Apr 18, 2026

Choose a reason for hiding this comment

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

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);
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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. 😉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, got rid of all config entries.

height: 36px;
}
.ui-dialog.icon-browser-dialog {
max-width:75%;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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... 😉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interestingly, I see no difference in behaviour between vh and % on my local (Chrome) but changed it anyway.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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).

@dragonbot
Copy link
Copy Markdown
Collaborator

Tugboat has finished building a preview for this pull request!

Website: https://pr5237-ina3t5vmb6zn5wpklwgtmcfhs8lwsza2.tugboatqa.com/
Username: admin
Password: 98e64f234ff7

This preview will automatically expire on the 20th of June, 2026.

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.

Icon browser/picker in core

4 participants