Skip to content

Replace overridable icon paths with overridable icon components - #324

Merged
mansona merged 1 commit into
mansona:masterfrom
pichfl:icon-component
Dec 15, 2021
Merged

Replace overridable icon paths with overridable icon components#324
mansona merged 1 commit into
mansona:masterfrom
pichfl:icon-component

Conversation

@pichfl

@pichfl pichfl commented Dec 10, 2021

Copy link
Copy Markdown
Contributor

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

@mansona mansona left a comment

Copy link
Copy Markdown
Owner

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