Skip to content

Clarify download debug progress message#4713

Merged
Kebap merged 2 commits intoMudlet:developmentfrom
vadi2:clarify-download-message
Feb 2, 2021
Merged

Clarify download debug progress message#4713
Kebap merged 2 commits intoMudlet:developmentfrom
vadi2:clarify-download-message

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Jan 29, 2021

Brief overview of PR changes/additions

Saw this message and had no idea what it means:

image

Turns out it was talking about download progress :)

Motivation for adding to Mudlet

Clearer debug message

Other info (issues closed, discussion etc)

@vadi2 vadi2 requested a review from a team as a code owner January 29, 2021 15:56
@vadi2 vadi2 requested review from a team January 29, 2021 15:56
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jan 29, 2021

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

raiseDownloadProgressEvent(L, urlString, bytesDownloaded, totalBytes);
if (mudlet::debugMode) {
TDebug(QColor(Qt::white), QColor(Qt::blue)) << "\n" << bytesDownloaded << "/" << totalBytes << " for file "
TDebug(QColor(Qt::white), QColor(Qt::blue)) << "\n" << bytesDownloaded << "/" << totalBytes << " bytes downloaded for file "
Copy link
Copy Markdown
Member

@SlySven SlySven Jan 30, 2021

Choose a reason for hiding this comment

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

Do we need the \n in that line as that is separating this line from the preceding message generated by the raiseDownloadProgressEvent(...) or can we not guarantee that that text will be there? If we cannot perhaps we should use:

Suggested change
TDebug(QColor(Qt::white), QColor(Qt::blue)) << "\n" << bytesDownloaded << "/" << totalBytes << " bytes downloaded for file "
TDebug(QColor(Qt::white), QColor(Qt::blue)) << "\nDownload progress: " << bytesDownloaded << " of: " << totalBytes << " bytes for file: "

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

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

How about something else that will stand alone better?

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 31, 2021

It's a bit more verbose and doesn't fit with the initial style of the message:

image

Don't think I want to overhaul all of them to be more verbose

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Feb 2, 2021

It's a bit more verbose and doesn't fit with the initial style of the message:

IMHO it is not so bad - and what if there are several large downloads going on. Does that message only show up at the end or after each "chunk" is received? If the latter then - depending on the size of the chunks - it might work quite well - or be horrible spammy... 😜

You could always change the beginning from:

- "Download progress:"-
+ "DOWNLOAD:"

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Feb 2, 2021

I think we should keep it simple as it is. This PR is a super simple one fixing a problem, there was not enough info in the original message, but the message itself is fine.

Copy link
Copy Markdown
Contributor

@Delwing Delwing left a comment

Choose a reason for hiding this comment

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

I am aware that message can be spamy, but if you go to debug console while downloading file... this might be the reason :)

@Kebap
Copy link
Copy Markdown
Contributor

Kebap commented Feb 2, 2021

Hooray for bikeshedding!

Let's review the texts in .. text maybe? Before jumping into code.
What would you like to read in debug window?

STATUS QUO:

  • downloadFile: script is downloading from URL
  • A/B for file URL

(Where URL and A and B are to be filled with variable values)
Agree, the second text seems outrageous and needs change!

VADI1:

  • downloadFile: script is downloading from URL
  • A/B bytes downloaded for file URL

This adds the hint "download" but still seems a bit arbitrary to me.

SLYSVEN1:

  • downloadFile: script is downloading from URL
  • Download progress: A of: B bytes for file: URL

I like the idea. Probably the : after of was a typo?

SLYSVEN2:

  • downloadFile: script is downloading from URL
  • DOWNLOAD: A of: B bytes for file: URL

This is going a bit further off-road and tries to close up to LUA: messages maybe?

Here is my take: Let's name the function in the second line again! Also less verbose.

KEBAP1:

  • downloadFile: script is downloading from URL
  • downloadFile: A/B bytes ready for URL

..or to be even less verbose in the first line as well:

KEBAP2:

  • downloadFile: start download from URL
  • downloadFile: A/B bytes ready for URL

@Delwing
Copy link
Copy Markdown
Contributor

Delwing commented Feb 2, 2021

I'd vote for KEBAP2

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Feb 2, 2021

To be honest there's a lot more other things that need doing, I don't have the energy for this. I just fixed a nonsensical message to make sense; if you'd like to change it entirely let's open up a separate discussion for this. Otherwise we won't go anywhere and the message still don't make sense in the release, is that a win?

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Feb 2, 2021

TBH In SlySven2 I was thinking of the "LUA" messages. And in both that and the prior one the of: was intentional as it was introducing the second (of two numbers). I am not sure how widely using / as a separator is understood compared to of - if others feel it is better then fair enough.

I cannot recall the exact behaviour but I have a nasty suspicion that the second number is often not available in many download cases - so it might be simpler to only bother showing it if it is more than the first anyhow.

I didn't realise this might be considered bikeshedding (and I didn't realise that was the definition - or that it had that negative a connotation!)

Since we have a review process for everything - it is not surprising that we have different views - the input from others can avoid us merging in something that doesn't have some sort of consensus - KEBAPs is so-so I guess but "of" (for the file) is even shorter than "ready for" and doesn't necessarily imply that the file is complete.

Now we have collected up these deckchairs then Vadim can tell/show us whether there is any change in his decision, we can rubber-stamp it and we can get on and steer this vessel away (hopefully) from the large chunks of ices out there.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Feb 2, 2021

Let's go with KEBAP2 then, we are more or less aligned on it.

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

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

Lets suck this and crash and burn see.

@Kebap Kebap merged commit 8cf869e into Mudlet:development Feb 2, 2021
@vadi2 vadi2 deleted the clarify-download-message branch February 14, 2021 18:37
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
* Clarify download progress message

Co-authored-by: Kebap <kebap_spam@gmx.net>
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.

4 participants