codalab / codabench

Codabench is a flexible, easy-to-use and reproducible benchmarking platform. Check our paper at Patterns Cell Press https://hubs.li/Q01fwRWB0
Apache License 2.0
65 stars 26 forks source link

Submissions tab - select all #1358

Open ihsaan-ullah opened 7 months ago

ihsaan-ullah commented 7 months ago

When you select all Rerun submisions and Delete submissions are disabled

Screenshot 2024-03-06 at 6 03 27 PM

When you deselect one item, buttons are clickable

Screenshot 2024-03-06 at 6 03 36 PM

When you select all again, the buttons are still clickable

Screenshot 2024-03-06 at 6 03 46 PM
Didayolo commented 6 months ago

Strange behavior indeed. I guess it was done on purpose but it does not really makes sense.

Didayolo commented 5 months ago

See this file: https://github.com/codalab/codabench/blob/develop/src/static/riot/competitions/detail/submission_manager.tag

        <button type="button" class="ui button right floated" disabled="{checked_submissions.length === 0}"
                onclick="{delete_selected_submissions.bind(this)}">
            <i class="icon trash alternate"></i>
            Delete Submissions
        </button>
            <th if="{opts.admin}">
                <div class="ui checkbox" onclick="{select_all_pressed.bind(this)}">
                    <input type="checkbox" name="select_all">
                    <label>All</label>
                </div>
            </th>

For some reason the "All" button does not increase the number of checked_submissions(condition disabled="{checked_submissions.length === 0} stays false).