How can I manually add suggestions in code reviews on GitHub? - github

In GitHub it's possible to suggest code changes through inline comments in pull requests. But I always get the following error message: "suggestions cannot be applied while viewing a subset of changes".
Is there also a way to manually suggest changes in a comment?
Example: screenshot of problem

Besides the button you can also actually use syntax to make a suggestion. You can do it like:
```suggestion
this is my new suggestion
```

How-to code suggest to multiple lines
Apply a code suggestion to multiple lines by highlight dragging the code lines. Starting drag to the right of the line numbers where the comment plus icon appears.
Verify by seeing "Commenting on lines +129 to +145" (or similar) text indicating the multiple line range you are commenting on.
Now the code suggestion will replace more than one line!

Related

What is the purpose of faded text in VS code?

In VS code (for my Javascript file), the text sometimes fades when I edit my code. Does anyone know what this means? I have researched it online, but can't find its purpose. I know arguments and variables in functions fade out until they are written in the function, but I haven't seen it before for entire functions.
I've included all my installed extensions in the picture in case one of these is doing the fade. I can also include all my code if I did not provide enough information. Thank you!
Edit: to clarify, the faded text I am speaking of is the entire function placeInTable(y,x) I am not speaking of the commented code.
EDIT: answered about the commented part first, not reading the entire question
The function is faded because it hasn't been called, so no actions inside it have been executed.

Trigger featherlight.js by clicking image without <a> element

Is there a way to get featherlight.js to trigger on an image itself, as opposed to a surrounding link?
For example, I'm trying this:
$('img.pop').featherlight($(this));
But getting an error:
a.cloneNode is not a function
Should not be a problem. The problem is probably what is this in your code above. That's why my advice to anyone ever reporting a problem is to produce a working example.

GitHub Gist CSS

I've embedded a GitHub Gist in a website for the first time, and am having some issues with how it appears. It seems like something in my Hugo theme's CSS is adding space above line 1 and below line 13.
The problematic display can be seen here.
Anyone have thoughts on how I could remove that space? I've never see a Gist render like this before for, nor can I find any questions on here that get at what I am seeing.
Thanks for your help!
gist-embed adds a class of data to the table container. It is used to customize the look of the embedded gist. Adjust your CSS selectors to fix the problem. I am sure you are inadvertently styling the data class directly, when in actuality you want to style a compound selector article.data.
Revisit your CSS code and adjust your selectors to reflect what you desire.

Items in Plones TinyMCE content browser are overlayed in album view - how to tackle this?

I do not know if this is a bug or rather stems from any customizations. I would like to know how to tackle this problem:
If I click on "add image" or "Link" in Plone's "Content Browser" the default view mode is "Album". In this mode the items are layed above each other, i.e. after 4 items the next items do not seem to be put into a new column.
See the screenshot:
Plone version is 4.3.2. How can I fix this? Pointers (relevant files, parts of code) welcome.
I have seen this happen too, depending on what I did with styling and skins. TinyMCE uses a grid system for showing these images and this needs the columns.css file from plonetheme.sunburst. I only now realize that this actually already goes wrong in the way you describe when you use standard Plone 4.3.2 and choose the classic theme as skin.
Ah, but it only fails because there is a typo in the columns.css that is shipped with plonetheme.classic, which actually includes the grid css as well. You can customize this file in portal_skins and fix the error. The problem is a line that is meant as a comment.
Change this line:
The 16-column Deco Grid System.
into this line:
/* The 16-column Deco Grid System.

Why some code statements appears one-symbol-per-row in xcode?

Sometimes when I'm viewing existing code, some fragments appear very odd: one symbol per row with alignment to left. For example, I have opened some code of some framework and I saw that weird formatting in some fragments. I have checked that those lines do not contain tabs or spaces. So, what might be a cause? I would be cool to hear from you that you have experienced that too, so please mark a question or post to comments.
UPDATE: here's the screen:
That looks like a bug that you need to report to Apple.