Skip to content

Commit

Permalink
In HTML repr, display channel names on hover
Browse files Browse the repository at this point in the history
This aims to address a concern @mscheltienne voiced at
mne-tools#12583 (comment)

Now, the channel names can already be viewed by simply hovering
over the number of good or bad channels. The appearing overlay still lets the user know that by clicking, they can open the channel names in a popup window.
  • Loading branch information
hoechenberger committed May 24, 2024
1 parent 2db23cd commit acb6895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mne/html_templates/repr/_channels.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
<td class="repr-section-toggle-col"></td>
<td>{{ channel_type }}</td>
<td>
<button class="channel-names-btn" onclick="alert('Good {{ channel_type}}:\n\n{{ channel_names_good | safe }}')" title="Show good channel names">
<button class="channel-names-btn" onclick="alert('Good {{ channel_type}}:\n\n{{ channel_names_good | safe }}')" title="(Click to open in popup)&#13;&#13;{{ channel_names_good | safe }}">
{{ channels["good"] | length}}
</button>

{% if channels["bad"] %}
{% set channel_names_bad = channels["bad"] | map(attribute='name_html') | join(', ') %}
and <button class="channel-names-btn" onclick="alert('Bad {{ channel_type}}:\n\n{{ channel_names_bad | safe }}')" title="Show bad channel names">
and <button class="channel-names-btn" onclick="alert('Bad {{ channel_type}}:\n\n{{ channel_names_bad | safe }}')" title="(Click to open in popup)&#13;&#13;{{ channel_names_bad | safe }}">
{{ channels["bad"] | length}} bad
</button>
{% endif %}
Expand Down

0 comments on commit acb6895

Please sign in to comment.