Closed (fixed)
Project:
Cloudflare Stream
Version:
8.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2021 at 16:33 UTC
Updated:
6 Apr 2022 at 11:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
mohit.bansal623 commentedPlease review the merge request.
Comment #5
tim-dielsPlease see reviews. Needs work.
Comment #6
mohit.bansal623 commentedUploading the patch.
Comment #7
mohit.bansal623 commentedComment #8
tim-dielsPlease visually review what you have done. I think you removed spaces that were needed for better readability.
Comment #9
mohit.bansal623 commentedI have only removed that space which is needed and detected by codesniffer.
Comment #10
tim-dielsIt's good that you try to remove the whitespace, but the whitespace is added for visibility purposes. If you would go to the UI where these settings are, you would note the difference after your patch which is not desirable.
It is not just blindly changing text.
This should be
'@muted' => $this->getSetting('muted') ? $this->('muted') . ', ' : '',This should be
'@controls' => $this->getSetting('controls') ? ', ' . $this->('controls visible') : '',Comment #11
mohit.bansal623 commented@tim-diels - Got your point. Thanks for your valuable feedback.
But if I tried your solution then it prompted with another error -
Do not concatenate strings to translatable strings, they should be part of the t() argument and you should use placeholders
So what I did now, I have given one space after @muted in line no 126. Hope that works well.
Comment #12
tim-dielsAnd again I ask to test this visually and not only change the code. This gives not the correct output when testing with not muted and muted, gives us extra space.
@mohit.bansal623 You're correct on the CS for concatenation.
We'll have to look for another way to display the summary. Suggestions are welcome.
My suggestion is to not display the values in a single line, but break this up over multiple lines like Drupal does for most of its fields.
Comment #13
tim-dielsBefore changes:

Example:

After changes:

The text can maybe chosen better.
Comment #14
pjbaertThanks @tim-diels for your update. I like the way you're going with this solution.
I tested this patch & started fiddling around with the copy.
Find attached my patch.
What are your thoughts?
Comment #15
mohit.bansal623 commentedThis looks good @pjabert. We can display like this.
Comment #16
tim-dielsThanks for the follow up. It's much better indeed than what we now have. For me this is good to go.
Comment #18
pjbaertWhat a team effort! Pushed to 2.x branch. Thanks for the help!