codecharta icon indicating copy to clipboard operation
codecharta copied to clipboard

`ccsh` CSVimporter produces almost empty AttributeDescriptors, which break tooltip logic in the Visualization

Open phanlezz opened this issue 8 months ago • 0 comments

CSVimporter produces almost empty AttributeDescriptors, disrupts UI in visualization

Expected Behavior

<GIVEN> cc.json generated by CSVimporter

WHEN loading it into the front end

THEN I would expect to get default metric description (e.g. in the legend), as the parser does not provide extended metadata

ℹ️ Key Point: Default Metric Descriptions won't get used, altho they are more excessive in this case ℹ️

Actual Behavior

The empty strings from the AttributeDescriptors get used to build titles, tooltips, etc.

Screenshots

grafik

grafik

Dev Comments

We put the direction in the AttributeDescriptors, but every other field is empty. Because the Visualization assumes that there is a description if there is an entry in the AttributeDescriptors Map, it builds up the title etc. from empty strings.

  1. We could change the behavior in the analysis, so that the Descriptors won't be included in CSVimporter (directions would be missing)
    • To mitigate that issue, we could evaluate moving the direction to attributeTypes instead of AttributeDescriptions.
  2. We could include an empty string check in the Visualization, so that it is able to fall back to the metricTitles.ts to build UI elements

Steps to Reproduce the Problem

  1. Use the CSVimporter (tested with the golden_test example file)

actual_csvimport.cc.json Caution: The MCC entry got already removed for testing purposes!

  1. Load into visualization
  2. Check legend panel

Specifications

  • is released in online-demo: yes
  • CodeCharta Version: 1.126.0
  • OS: Windows (irrelevant)
  • Browser: Firefox (irrelevant)

phanlezz avatar Jun 14 '24 10:06 phanlezz