Skip to content

Improve kiwix-serve download widget UI#1240

Open
yummyash wants to merge 2 commits intokiwix:mainfrom
yummyash:improve-download-widget-ui
Open

Improve kiwix-serve download widget UI#1240
yummyash wants to merge 2 commits intokiwix:mainfrom
yummyash:improve-download-widget-ui

Conversation

@yummyash
Copy link

@yummyash yummyash commented Nov 5, 2025

download

  • Reorder download options: direct → torrent → magnet → checksum
  • Add visual separation with margin and border before checksum section
  • Improve styling with icons, hover effects, and better spacing
  • Enhance UX with consistent button design and visual feedback

Fixes kiwix/kiwix-tools#775

- Reorder download options: direct → torrent → magnet → checksum
- Add visual separation with margin and border before checksum section
- Improve styling with icons, hover effects, and better spacing
- Enhance UX with consistent button design and visual feedback

Fixes kiwix#775
@kelson42
Copy link
Collaborator

kelson42 commented Nov 5, 2025

@yummyash Can you please put a screenshot in the description?

- Reorder download options: direct → torrent → magnet → checksum
- Add visual separation with margin and border before checksum section
- Improve styling with icons, hover effects, and better spacing
- Enhance UX with consistent button design and visual feedback

Fixes kiwix#775
@yummyash
Copy link
Author

yummyash commented Nov 5, 2025

check the new one
@kelson42

@kelson42
Copy link
Collaborator

kelson42 commented Nov 5, 2025

@yummyash Thx for your quick PR and for having improved a bit more than that. I like it I will assign reviewers and this will take a bit from now to gather feedbacks, maybe polish and merge.

@rgaudin general review welcome
@veloman-yunkan technical review welcome
@siemsie design/ux review welcome

@yummyash
Copy link
Author

yummyash commented Nov 5, 2025

hey @rgaudin @veloman-yunkan @siemsie can you please verify erarly as possible beacuse i want the confirmation mail as early as possible

@rgaudin
Copy link
Member

rgaudin commented Nov 5, 2025

@yummyash thank you!

  • Can we see it in context? AFAIK it's a popup but the screenshot doesn't look like it: no closing button, extends all the way to the bottom.
  • Will this be the width of a card as it currently is?
  • We've lost the file size information.
  • What's the deal with the checksum? Showing a truncated part of it makes no sense. Showing it all could make sense if there's a copy-to-clipboard button… but it's a very long string example.
  • If we want to show it, there's additional code to write which requires an additional request.
  • I think it would make sense to be explicit and tweak the behavior a bit:
    • Download ZIM file (6.36 GiB)
    • Download torrent file
    • Magnet [Copy]
    • Checksum (SHA-256) [Copy]
    • // Copy on sha-256 would trigger the request and send to pasteboard. Magnet would get a pasteboard shortcut as well
  • the icons are visually bad looking: aliased.
  • the icons' meaning is incorrect. Using the magnet for BT is wrong, the lock on SHA without explanation is misleading
  • I don't like the yellow/alert color on checksum. It should feel scary.
  • I think we should have a link there pointing to some online doc/help about what it is and how to use it.

@kelson42 I saw the ticket requesting specifically the order change, I was surprised we're not pushing torrents first TBH.

@kelson42
Copy link
Collaborator

kelson42 commented Nov 5, 2025

the icons are visually bad looking: aliased.
the icons' meaning is incorrect. Using the magnet for BT is wrong, the lock on SHA without explanation is misleading

Yes, I didn't saw that at first look, but we should stick to the icon we had already chosen IMHO. At least for direct/bt/magnet.

The lock is a symbol for security, IMO this is appropriate but I have no reference documentation to support my statement.

@kelson42
Copy link
Collaborator

kelson42 commented Nov 5, 2025

@kelson42 I saw the ticket requesting specifically the order change, I was surprised we're not pushing torrents first TBH.

In a way would make sense, but I still prefer to put HTTPS first because:

  • less surprising for users (most users have no clue what is BT)
  • BT is adapted for large files and we publish more and more smaller files. Might even be that in most cases BT is a bit overkill

@siemsie
Copy link

siemsie commented Nov 5, 2025

It's easier for me to draw something up based on what I see above and the feedback rather than leave a trail of notes/ideas. To be seen what width makes sense and what fits at what size (for example the SHA code)... We can take up a little more space on the screen... I suggest going a little more in this direction:
Screenshot 2025-11-05 at 14 46 17

Comment on lines +169 to +193
<script>
// Add functionality to checkboxes
document.addEventListener('DOMContentLoaded', function() {
const checkboxes = document.querySelectorAll('.option-checkbox');

checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
const link = this.closest('.download-option').querySelector('a');
if (this.checked) {
link.style.opacity = '1';
} else {
link.style.opacity = '0.6';
}
});

// Set initial state based on checkbox
const link = checkbox.closest('.download-option').querySelector('a');
if (checkbox.checked) {
link.style.opacity = '1';
} else {
link.style.opacity = '0.6';
}
});
});
</script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is contrary to the filename - this HTML page is supposed to be displayed in browsers not supporting Javascript.

I didn't review the rest of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve a bit kiwix-serve download widget UI

5 participants