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

Replace overridable icon paths with overridable icon components #324

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

pichfl
Copy link
Contributor

@pichfl pichfl commented Dec 10, 2021

Makes better use of Ember structure and allows users to replace the icons with more complex SVGs or even emoji. The HTML structure for the message component could be simplified further, but a dynamic {{component}} helper invocation would be difficult to use with Embroider, so this is actually more sensible at the time.

I already redrew and adjusted the icons so they fit a common theme and each type has it's own icon.

  • success: checkmark ✅
  • info: i in a circle ℹ️
  • warning: ! in a triangle ⚠️
  • error: ! in a square 🟥

By doing the type comparison inside the component class, I was able to drop the included (but undocumented) {{equal}} helper from the project, in fact this might have been unused for some time now.

Further refactoring of the DOM structure is advised, but will happen in the next PR.

This can replace #268

Copy link
Owner

@mansona mansona left a comment

Choose a reason for hiding this comment

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

Looks amazing 🎉

@pichfl pichfl force-pushed the icon-component branch 5 times, most recently from 13d478e to 853a492 Compare December 15, 2021 11:38
@mansona mansona merged commit f20fcdd into mansona:master Dec 15, 2021
@pichfl pichfl deleted the icon-component branch December 15, 2021 16:14
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