aboutcode-org / scancode.io

ScanCode.io is a server to script and automate software composition analysis pipelines with ScanPipe pipelines. This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ Google Summer of Code, nexB and others generous sponsors!
https://scancodeio.readthedocs.io
Apache License 2.0
115 stars 85 forks source link

scantext: what details should be shown in license_detail_dropdown #523

Open lf32 opened 2 years ago

lf32 commented 2 years ago

Currently every match has the possible details that can be shown.

[{'end_line': 3,
  'is_license_intro': False,
  'is_license_notice': False,
  'is_license_reference': True,
  'is_license_tag': False,
  'is_license_text': False,
  'license_expression': 'apache-2.0 OR mit',
  'licenses': [{'category': 'Permissive',
                'homepage_url': 'http://www.apache.org/licenses/',
                'is_exception': False,
                'is_unknown': False,
                'key': 'apache-2.0',
                'name': 'Apache License 2.0',
                'owner': 'Apache Software Foundation',
                'reference_url': 'https://scancode-licensedb.aboutcode.org/apache-2.0',
                'scancode_data_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/apache-2.0.yml',
                'scancode_text_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/apache-2.0.LICENSE',
                'short_name': 'Apache 2.0',
                'spdx_license_key': 'Apache-2.0',
                'spdx_url': 'https://spdx.org/licenses/Apache-2.0',
                'text_url': 'http://www.apache.org/licenses/LICENSE-2.0'},
               {'category': 'Permissive',
                'homepage_url': 'http://opensource.org/licenses/mit-license.php',
                'is_exception': False,
                'is_unknown': False,
                'key': 'mit',
                'name': 'MIT License',
                'owner': 'MIT',
                'reference_url': 'https://scancode-licensedb.aboutcode.org/mit',
                'scancode_data_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/mit.yml',
                'scancode_text_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/mit.LICENSE',
                'short_name': 'MIT License',
                'spdx_license_key': 'MIT',
                'spdx_url': 'https://spdx.org/licenses/MIT',
                'text_url': 'http://opensource.org/licenses/mit-license.php'}],
  'match_coverage': 100.0,
  'matched_length': 4,
  'matched_text': 'Apache-2.0\r\n\r\nMIT',
  'matcher': '2-aho',
  'mid': 0,
  'referenced_filenames': [],
  'rule_identifier': 'apache-2.0_or_mit_48.RULE',
  'rule_length': 4,
  'rule_relevance': 99,
  'rule_text_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_48.RULE',
  'score': 99,
  'start_line': 1}]

@tdruez could you please tell me what details and in what order the details should be shown?

x

tdruez commented 2 years ago

@pombredanne ^

lf32 commented 2 years ago

Also you suggested

The "View more details" modal does not provide much more interesting data than the dropdown. We should improve the dropdown to have links like the modal, and probably get rid of the modal.

You mean we need to get rid of modal completely or instead of having a model for view more details(above) the app will be having modal triggers at license keys i.e, for each key in keys section.

pombredanne commented 2 years ago

IMHO we can keep the hover only as long as we can copy text from it too As for the content, we should have all the data available for a license match.