constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
385 stars 59 forks source link

Fix recent graphs screenshots not being accurate #2201

Open Quasar985 opened 2 weeks ago

Quasar985 commented 2 weeks ago

Prerequisites

Description of the Change

Fixed bug that would cause the screenshots for recent graphs to all be the same if "save all" was used. Now, if this happens, each graph that is saved has the correct screenshot for the "recent graphs" sections.

Alternate Designs

N/A

Why Should This Be In Core?

N/A

Benefits

Screenshots for recent graphs are now accurate, minimizing confusion.

Possible Drawbacks

None.

Verification Process

  1. Open Consty
  2. Open a few existing graphs, or create multiple new graphs.
  3. Modify all of them, then click File -> Save All
  4. Close Consty
  5. Re-Open Consty
  6. Look at Welcome Page
  7. The graphs that were saved should appear in the recent graphs section, and observe their preview screenshots are accurate to each graph

Applicable Issues

https://github.com/constellation-app/constellation/issues/2125

mimosa2 commented 1 week ago

I have tested with 5 graphs (edited and saved) and opening Consty the first time all appeared correctly on the welcome page. I then opened 2 graphs from the welcome page and edited again and saved. Re-opening Consty displayed one of the edited graph correctly but the second one displayed as a black square. The screenshot saved as black square although the edited graph opened correctly.

Quasar985 commented 1 week ago

I have tested with 5 graphs (edited and saved) and opening Consty the first time all appeared correctly on the welcome page. I then opened 2 graphs from the welcome page and edited again and saved. Re-opening Consty displayed one of the edited graph correctly but the second one displayed as a black square. The screenshot saved as black square although the edited graph opened correctly.

I'll take a look. The black square happens when the screenshot is taken before the graph was rendered on screen, so it sounds like a timing issue I've got to fix.

sonarcloud[bot] commented 4 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
82.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud