Skip to content

Conversation

@Guido07111975
Copy link
Collaborator

Description

This minor PR fixes a double box-shadow (border-bottom) when the "block-related functions" notification is displayed as last row at the Plugins page.
For some reason not clear to me the already present styling does not target this notification.
Changing last-child into last-of-type fixes this.

How has this been tested?

Local install.

Screenshots

Before

Double box-shadow - border-bottom - before

After

Double box-shadow - border-bottom - after

Types of changes

  • Bug fix

@KTS915
Copy link
Member

KTS915 commented Sep 8, 2025

There is no bug here. It's like that because it's separating itself off from the bar that contains the checkbox.

@KTS915 KTS915 added the status: wontfix This will not be worked on or feature request declined. label Sep 8, 2025
@Guido07111975
Copy link
Collaborator Author

I respectfully disagree, please check the regular plugin update notification in case it's the last row (border-bottom / box-shadow is removed from the last td):

Border-box-shadow

@KTS915
Copy link
Member

KTS915 commented Sep 22, 2025

I'm not sure what your last comment is designed to show. Even when there's no update listed for the last plugin, there's a clear difference in the border between that plugin and the checkbox.

@Guido07111975
Copy link
Collaborator Author

Do we understand eachother correctly?
I mean the double line, it should be a single line:

border-shadow bottom

@KTS915
Copy link
Member

KTS915 commented Sep 22, 2025

Yes, we understand each other. And, no it shouldn't be. As I say, it's there to differentiate itself from the area below, which is also done even when there is no update (albeit the differentiation then uses a slightly different method).

@Guido07111975
Copy link
Collaborator Author

Guido07111975 commented Sep 23, 2025

Have removed my previous comments, because of info underneath:

I understand what you mean now; 2 lines because separate boxes.
My PR in fact removes the third line. Similar to how WP does it.

I think the CP "block-related functions" tr isn't always targeted by the current CSS, because a script tag is added after each CP "block-related functions" tr. So all tr's after that script tag aren't targeted by the current CSS.

Changing last-child into last-of-type fixes this.

@KTS915
Copy link
Member

KTS915 commented Oct 5, 2025

The current CSS is targeting the element correctly so far as I can see:

Screenshot at 2025-10-05 15-29-31

Perhaps there's something else happening on your site, @Guido07111975 ?

@Guido07111975
Copy link
Collaborator Author

It only happens with the "block-related functions" tr, did you test with that?

@KTS915
Copy link
Member

KTS915 commented Oct 5, 2025

I'm not sure what you mean. I have Blocks Compatibility switched on.

@Guido07111975
Copy link
Collaborator Author

Only happens if the "block-related functions" is the last one in the list.
Tried to explain why, in a previous reply. Caused by a script tag that is added. That script tag kind of breaks the tr list, resulting in the CSS not being able to target any tr after that script tag. So if there's more than one "block-related functions" tr, the last one is not being targeted with the CSS.

image

@KTS915
Copy link
Member

KTS915 commented Oct 5, 2025

I understand everything except what you mean by "block-related functions". As you can see, there's no script tag in the way on my site with Blocks Compatibility on.

@Guido07111975
Copy link
Collaborator Author

You may have turned it on, but do you also have the "block-related functions" notification at your plugins page?

Maybe I should close this, as it only happens when having more than one "block-related functions" ánd one of them is the last one in the tr list. So will not happen often.

@KTS915
Copy link
Member

KTS915 commented Oct 5, 2025

You may have turned it on, but do you also have the "block-related functions" notification at your plugins page?

No. Why would I?

@Guido07111975
Copy link
Collaborator Author

Only happens if a plugin has block related functions. Guess you don't have such a plugin installed. And I understand why.

@Guido07111975
Copy link
Collaborator Author

My last try to make myself clear.
With a minor tweak you can make the "block-related functions" tr display at plugin page without having to install a plugin containing block-relating functions:

  1. Settings > Reading: set Blocks Compatibility at Troublehooting.
  2. Remove line 55-57 from file class-wp-compat.php.
  3. Go to the Plugins page: each plugin now has the "block-related functions" tr (check screenshot). And the last plugin in the list has a "third" border/box shadow.
  4. Inspect the source code and you will see the script tag after each plugin (check screenshot).

Not good - source code

But if a plugin for example has an update available, you will see there's no "third" border/box shadow added.
Again, this is only relevant if the plugin is the last one at the plugins page.

Good - no extra border

@Guido07111975
Copy link
Collaborator Author

If we replace the script to inside the tr (so 1 line up), it still adds the update class to the main tr and also solves this PR (without the CSS fix from this PR).

Reverted the CSS as suggested in my reply. Moving the JS to inside the tr does also fix it.
As suggested in my reply. Moving the JS to inside the tr does also fix it.
@KTS915 KTS915 added type: bug Something isn't working and removed status: wontfix This will not be worked on or feature request declined. labels Oct 24, 2025
@KTS915 KTS915 added this to the 2.6 milestone Oct 24, 2025
Copy link
Member

@KTS915 KTS915 left a comment

Choose a reason for hiding this comment

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

Avoiding breaking the list of <tr>s is the way to go!

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

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants