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

Filtering by license category #30

Open
AyanSinhaMahapatra opened this issue Feb 9, 2023 · 3 comments
Open

Filtering by license category #30

AyanSinhaMahapatra opened this issue Feb 9, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@AyanSinhaMahapatra
Copy link
Member

We need a filtering feature for the license list view, this could help looking up licenses for a particular category.

Alternatively it could also help if the search supported searching in specific license attributes, i.e. search by category/name/license-key. This is related to #16

@AyanSinhaMahapatra AyanSinhaMahapatra added the good first issue Good for newcomers label Feb 9, 2023
@tdruez
Copy link
Contributor

tdruez commented Feb 15, 2023

@AyanSinhaMahapatra you can already filter by category by clicking on any category labels from the category column.

Alternatively it could also help if the search supported searching in specific license attributes, i.e. search by category/name/license-key

The search is already looking into all those attribute, this is actually how the category filtering is currently implemented.

@AyanSinhaMahapatra
Copy link
Member Author

Yes but these is not limited to just the category field: see https://scancode-licensedb.aboutcode.org/?search=CLA it searches across all the attributes, which does not give us just the licenses with category CLA.

Maybe there should be a drop down beside the search only for specific attributes, or globally, and then pull up search results based on that?

@m-g-rathod
Copy link

Currently for querying the Datatable in scancode-toolkit\src\licensedcode\templates\license_list.html we have :
table.search().draw() function in js which queries the entire datatable.

So to apply the search only on category coulmn we can have:
table.columns([3]).search().draw()

However, I think this is a temporary solution because then if a user wants to apply the search on other columns instead of category then we have to again change the columns() argument.

I agree the idea of displaying a drop-down box beside the search bar so that the user can choose the column he want to apply his search for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants