clearlydefined / clearlydefined/website

Improvement to LicensePicker component

Open
#1,013 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
32
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Originally mentioned in #955

The current implementation of LicensePicker component has some major functionality and usability issues...

1. only one radio button can be selected at any time:

![211380438-a703de4f-d8be-4890-856d-6bae92c6f2ed](https://user-images.githubusercontent.com/31491646/211639989-81b5154a-ebf5-4950-8319-ca56e3726b4d.png)

2. if you repetitively hit "add group" and create multiple empty groups, in some cases I found you cannot delete them after:

![211381162-139c69ac-c228-4103-a243-d7babe4b2746](https://user-images.githubusercontent.com/31491646/211640109-65d97582-45db-4b90-b020-9b9e7dd01986.png)

3. in more complex expressions with multiple groups, the top radios change the middle most logical operator which may be confusing for some:

![image](https://user-images.githubusercontent.com/31491646/211643695-10c545f5-7bb7-4fc9-b5e6-233882f05887.png)

If we look at the original implementation, it functioned much the same but had some UI features that made it more user-friendly IMO:

![51443465-0b35da80-1c9e-11e9-8086-02d802b71308](https://user-images.githubusercontent.com/31491646/211662586-2508a55f-0085-4062-8c50-dfc3b1ff7639.png)

Specifically:

- borders around each group tells you what controls go with which group (even the buttons at very top are clear as to their effect)
- buttons instead of radio boxes (even if these are radios "styled" as buttons, they still function independently)
- not sure if the behavior described in point 2 also affected the original implementation, but it does occur in this one
- there appeared to be [some syntax checking](https://github.com/clearlydefined/website/issues/178) for the expression, not sure if this is happening in the current implementation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.