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

Weird broadcasted form of multi symbols of calendar module. #3267

Open
eouia opened this issue Nov 12, 2023 · 4 comments
Open

Weird broadcasted form of multi symbols of calendar module. #3267

eouia opened this issue Nov 12, 2023 · 4 comments
Assignees

Comments

@eouia
Copy link
Contributor

eouia commented Nov 12, 2023

I remember it was not so, but multiple symbols are broadcasted weirdly at some point.

When I set some symbols in a calendar like this;

symbol: ["file", "calendar"],

The expected broadcasted data(And the historical format what I remember) would be like this; (with defaultSymbolClassName)

symbol: ["fa fa-fw fa-file", "fa fa-fw fa-calendar"],
// Array(2)

Bur really broadcasted would be;

symbol: ["fa fa-fw fa-file, fa fa-fw fa-calendar"],
// Array(1)

Is this intentionally designed so? Or just an unexpected accident?

@rejas
Copy link
Collaborator

rejas commented Nov 18, 2023

Thanks for the report (and sorry for the late replay). Can you pinpoint when this behaviour changed?

@sdetweil
Copy link
Collaborator

I am fixing things in calendar now.. @eouia can u answer @rejas

@sdetweil
Copy link
Collaborator

I see the bug, checking on how to fix

@sdetweil
Copy link
Collaborator

so, here is my proposed change

	getCalendarPropertyAsArray (url, property, defaultValue) {
		let p = this.getCalendarProperty(url, property, defaultValue);
		if (property === "symbol" || property === "recurringSymbol" || property === "fullDaySymbol") {
			const className = this.getCalendarProperty(url, "symbolClassName", this.config.defaultSymbolClassName);
			if(p instanceof Array)       //  add
				p.push(className) // add
			else   // add
				p = className + p;  // old code assumed property was string
		}

		if (!(p instanceof Array)) p = [p];
		return p;
	},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants