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

Fix sidebar panels fail to connect to each other occasionally (maybe has to do with emojis in titles?) #182

Merged

Conversation

tntmarket
Copy link
Contributor

@tntmarket tntmarket commented Nov 26, 2020

I ran into a bug where a certain sidebar page wasn't forking new pages off of it. Opened links just were just disconnected. It only happened when forking from that particular sidebar page though.

I narrowed it down to Cytoscape mistakenly thinking that the edge had already been drawn. (It refuses to draw a duplicate edge in this case).

When I checked for the duplicate edge in the debugger, I saw that the Cytoscape filter was selecting the incorrect edges:

// Try to look for edges from Foo -> Bar
this.cy.$(`edge[source = "Foo"][target = "Bar"]`).target().id() // "Baz"
// It found an edge that didn't even go to Bar

It might've had something to emojis being in the title. I switched it to explicitly filtering and comparing ids, which seemed to fix the problem.

@tntmarket tntmarket changed the title Fix sidebar panels failing to connect to each other occasionally (maybe has to do with emojis in titles?) Fix sidebar panels fail to connect to each other occasionally (maybe has to do with emojis in titles?) Nov 26, 2020
@sonarcloud
Copy link

sonarcloud bot commented Nov 26, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Stvad Stvad merged commit 3a76660 into roam-unofficial:master Nov 27, 2020
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