Skip to content

calendar: allow custom events to override symbol class - #4257

Merged
KristjanESPERANTO merged 2 commits into
MagicMirrorOrg:developfrom
Antra:calendar-custom-event-symbol-class
Sep 4, 2026
Merged

calendar: allow custom events to override symbol class#4257
KristjanESPERANTO merged 2 commits into
MagicMirrorOrg:developfrom
Antra:calendar-custom-event-symbol-class

Conversation

@Antra

@Antra Antra commented Sep 4, 2026

Copy link
Copy Markdown

Adds an optional symbolClassName property to calendar custom events.

When specified, the custom event's symbol class takes precedence over the calendar-level symbolClassName. If it isn't specified, the existing calendar configuration/default behavior is preserved.

For example:

{ keyword: "Tesla", symbolClassName: "fab fa-fw fa-", symbol: "tesla", color: "Blue" }

Added an E2E test covering a custom event with a custom symbol class.

Also verified the Tesla icon works in a real MagicMirror installation.

@sdetweil sdetweil left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice..

on the testcase, it tests that the override works, but doesn't test that it is not applied when not matched.
could you add that to the test.

not in this PR, but would you create a PR for the documentation too?

@Antra

Antra commented Sep 4, 2026

Copy link
Copy Markdown
Author

@sdetweil Good point! I’ve added the negative case using the existing CustomEvent/dice example, so the test now verifies that the custom symbolClassName is only applied to matching events.

I'll create a separate PR for the documentation.

@sdetweil sdetweil left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

@sdetweil

sdetweil commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Awesome. Thanks

@Antra

Antra commented Sep 4, 2026

Copy link
Copy Markdown
Author

There is a PR in the documentation repo now as well:
MagicMirrorOrg/MagicMirror-Documentation#408

@KristjanESPERANTO
KristjanESPERANTO merged commit bb38997 into MagicMirrorOrg:develop Sep 4, 2026
13 checks passed
@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

Thanks @Antra 😃

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.

3 participants