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

Make all icons compatible with FontAwesome 5 #270

Merged
merged 3 commits into from
Nov 23, 2018

Conversation

pmusaraj
Copy link
Contributor

@pmusaraj pmusaraj commented Nov 8, 2018

In the upcoming Discourse release, FontAwesome 4.7 font icons will be replaced by FA5 and SVGs. This PRs makes this plugin compatible with these changes in Discourse core. (I will write a guide on Meta shortly and update this PR's description with a link.)

Copy link
Owner

@gdpelican gdpelican left a comment

Choose a reason for hiding this comment

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

Thanks @pmusaraj! I've just left a couple questions here, mostly for my own understanding of what the changes are.

.babble-unread--sidebar { right: 0; }
}
&--right {
right: -10px;
border-radius: 100px 0 0 100px;
.widget-button {
Copy link
Owner

Choose a reason for hiding this comment

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

Hm why do we need these css changes to widget-button? Could you screenshot it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without it, the hover on the button was square for me on Chrome. Screenshot of the branch without this CSS rule:

image

@@ -4,7 +4,7 @@ en:
site_settings:
babble_enabled: "Enable Babble Shoutbox plugin."
babble_placeholder: "Leave blank for default placeholder text in empty chat textarea. Or enter your custom text here."
babble_icon: "Font Awesome code (fa- omitted) for the Babble icon in the upper right corner. See http://fontawesome.io/cheatsheet/ for a list of icons."
babble_icon: "Font Awesome code (fa- omitted) for the Babble icon in the upper right corner. See http://fontawesome.io/cheatsheet/ for a list of icons. You might have to add the icon to the \"svg icon subset\" site setting as well."
Copy link
Owner

Choose a reason for hiding this comment

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

Hmmm we shouldn't have to tell the user this. Is there a way to dynamically adjust which icons are svg? Is there a fallback / what happens if we don't register these as svg icons?

Also, I don't see a svg_icon_subset setting on the latest discourse; could you point me at the PR where it will be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There currently isn't a way to do this for a plugin setting, though there is a way for the plugin to register an icon. Hmm, I will see if we can cover that in core, it should be doable.

Also, more details about the icon change here: https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643

And the branch with these changes is here: https://github.com/discourse/discourse/tree/fontawesome5

@gdpelican
Copy link
Owner

@pmusaraj Does this require changes in the fontawesome branch to work correctly, or can I merge it now?

@pmusaraj
Copy link
Contributor Author

Don't merge it yet, I think some of the CSS isn't backwards-compatible.

@pmusaraj
Copy link
Contributor Author

Sorry for the delay, this is good to merge now, it doesn't break current functionality.

Note also that any icon can be used in the plugin setting UI, and Discourse will automatically include that icon in the SVG subset.

@gdpelican gdpelican merged commit 97e021e into gdpelican:master Nov 23, 2018
@gdpelican
Copy link
Owner

Thanks @pmusaraj !

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.

2 participants