gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
15.66k stars 1.01k forks source link

Various Improvements #1504

Open gildas-lormeau opened 3 months ago

gildas-lormeau commented 3 months ago
          **Just feedback, read only if you have time: Not the important**

1- by default the infobar icon, would be flashing for 3-5 seconds (switch between yellow and gray) and settles on Gray at the end to attract user attention.

Reason for the suggestion: When a file is shared, or when the user open the file in far future they will notice the infobar icon. I have a concern that I would forget about it and it is hard to notice. Maybe it is just me.

However, I would advise against this IF you think the code which result in flashing the infobar icon might break in future browsers when the file is opened. The idea of Singlefile is to save an archival version of the file for digital preservation, in my humble STOOPID opinion, thus avoiding things that might cause issues.

unrelated suggestions: 2- The time/date variables are too limited, not fully customizable, if it is customizable then I am too stoopid to figure it out:

Windows/Autohotkey style is easier for not so technical users like me.

3- in the infobar I wanted to add Notes, saved date, and page title, I used the code below:

Page title: {page-title} \n Saved on: Wed Jul 10 2024 01:14:48 GMT+0200 (Central European Summer Time) \n \n Notes:

but it is hard to add notes, so I suggest the window for infobar contect would be multiple lines and accept new line by pressing enter to add notes in several lines. image

4- Addition of a variable to add a link to SingleFile project in infobar and the version it was saved with. The Reason for this suggestion: It will help promote SingleFile, and also, have a record of which version of SingleFile was used to save the webpage.

5- Lastly, if Template of the infobar content left empty, it will save in this format Wed Jul 10 2024 01:14:48 GMT+0200 (Central European Summer Time) I tried my best, but I couldn't replicate it, I wanted to add, GMT+0200 (Central European Summer Time) And Wed Jul but I couldn't find any variable, I would appreciate it if you would tell me how to add the date in this format: 01:14:48AM 10/07/2024 GMT+0200 (Central European Summer Time) and in this format yyyy.mm.dd.hh.mmtt

Thank you for your hard work.

Originally posted by @StoopidoMan in https://github.com/gildas-lormeau/SingleFile/issues/1469#issuecomment-2219080931

gildas-lormeau commented 3 months ago

1 and 3 will be implemented in the version 1.22.52.

StoopidoMan commented 3 months ago

@gildas-lormeau Please, When the update is released post a comment, so I could test it

gildas-lormeau commented 3 months ago

@StoopidoMan I've just uploaded on the stores the version 1.22.53. It fixes some issues with the icon flashing (compared to the version 1.22.52). I also added a template function %datetime-custom which should meet your requirements hopefully. It's not the same API than the one you suggested, but it is based on a quite powerful standard API (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat). This new version should be available for download in the coming 24 hours in Chrome and Safari, and maybe this week in Firefox (it depends on the manual review by Mozilla).

gildas-lormeau commented 3 months ago

For the record. Here is an example in the zip file of saved page with the infobar and its flashing icon.

Example Domain (23_07_2024 15_46_48).html.zip

gildas-lormeau commented 3 months ago

Only 4 is not implemented (yet). Making the version available as a variable requires some work because this code resides in the project single-file-core which is not aware of the existence of the extension (and its version). I will add the variable with the URL of the project soon.

StoopidoMan commented 3 months ago

sorry for the late response, I am in pain, physically.

1- The info bar: Sadly for me it doesn't capture my attention, and if I was not aware of SingleFile I would probably not notice the infobar. The idea is that when the file is sent to someone who is not aware of SingleFile the infobar flashing would capture their attention.

I am not sure what to suggest because this kind of things requires a brainstorming session in a meeting. I will try to share some points:

3- in the infobar I wanted to add Notes, saved date, and page title, I used the code below:

image

I suggested adding a multi line field because a single short field limits me from adding comments/notes comfortably so a bigger field or expandable field would be great specially if adding new line by pressing enter is supported.

I am sorry.

gildas-lormeau commented 3 months ago

@StoopidoMan Just a quick answer about the infobar, I'll come back to the other points later. I've added an option Infobar > keep infobar open. The feature will be available in the next version. I think this will best answer the problem.

Here's an example in the ZIP file: Example Domain (30_07_2024 00_18_13).html.zip

By the way, I haven't had time to test this yet, but the "delay" values passed as %datetime-custom parameters must be in lowercase (e.g. short, long). Generally speaking, all values are case sensitive. You can also use the function multiple times to change the order.

StoopidoMan commented 3 months ago

@gildas-lormeau

Infobar > keep infobar open

I agree that is a very good idea, however I like to suggest some improvement:

1- With the original model, if you click somewhere random the infobar collapse to an infobar-icon, check the video below:

https://github.com/user-attachments/assets/d6e944c5-0276-433d-8199-4dfb988185a3

but this didn't happen with the html file sample you provided. I think the old way will satisfy the need of more users and it is more user friendly. Additionally, if possible to collapse the infobar to inforbar-icon on scroll would also be a good feature, so if the user click somewhere on the page or scroll the infobar would collapse to the infobar-icon.

2- I think adding a "minimize" or "collapse infobar" button similar to how the minimize button works in Windows OS will help the user experience. The reason for my suggestion: if I sent the html file to a not so tech-savvy user they will immediately see the minimize button and click it as it is intuitive to most. in my opinion.

3- Changing the color of open source URL icon to a standard blue links color, and would change to a standard purple link when already visited, would be more noticeable as a button than just being gray: image

did a quick google search and found these two links for your convenience: https://en.wikipedia.org/wiki/Help:Link_color https://stackoverflow.com/questions/4774022/whats-default-html-css-link-color

An answer from stackoverflow.com :link { color: #0000EE; } :visited { color: #551A8B; } :link:active, :visited:active { color: #FF0000; }

4- Moving the close, minimize, and open source URL buttons to the top part of the infobar: The reason for this suggestion is because I have a disability and for me when UI elements are not separated with UI dividers it somehow gets mixed up... It is hard to explain. check this link: https://app.uxcel.com/courses/ui-components-best-practices/basics-676 image

Here is a rough example of what I mean (I am no graphic designer) image

5- You could aslo add a 5 second timer and after that the infobar would collapse to infobar-icon, when opening the html file .

6- adding "Saved with SingleFile Vx.x" as a title of the infobar and when clicked on "Saved with SingleFile Vx.x" it would take you to a simple page with links to all major browsers extension market place and Github. The reason for this suggestion: A) The version of Singlefile matters because not all version save the webpage in the same matter. B) it helps promote the project when the file is shared C) the person who recieves the .html file will know that the infobar is not part of the webpage and I believe if this is added then keep infobar openshould be the default option. Also you can temporarily just add "Saved with SingleFile"

7- about %datetime-custom it really is beyond my comprehension, I really REALY want to add custom date in file name and custom date with GMT value in infobar content like 2024.07.30@10:55:53 PM GMT+0200 (Central European Summer Time) image

Thank you for your hard work. and sorry if I was stoopid