Open Bug 1492370 Opened 7 years ago Updated 1 year ago

"CSS Grid is not in use on this page" displayed even when it is

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: birtles, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

Attached file Test
On the current Nightly (I just updated about ~1hr ago) with the attached file on Windows I am seeing "CSS Grid is not in use on this page" even when it clearly is. Patrick tells me that with the same file on MacOS and Windows for him though. Weird. STR: 1. Open file. 2. Open DevTools (F12) 3. Open the Inspector and expand the elements until the <form> element shows. 4. Click the <form> element. I've tried closing and re-opening DevTools and serving the file from a local web server and it hasn't made a difference.
Attached image Screenshot
Also, if I click the "grid" item on the left, the highlighting works, but the "Grid" section doesn't change.
Assignee: nobody → gl
Blocks: dt-grid
Status: NEW → ASSIGNED
Priority: -- → P3
I can repro this with my work profile but not my home profile. I'll try later to narrow down the difference although there's nothing obvious so far. I can repro it using that same work profile on Windows and Linux so updating the platform to All.
OS: Windows 10 → All
Hardware: x86_64 → All
I think I worked it out. My work profile had an empty string as the value for the devtools.inspector.activeSidebar pref. I have no idea how that got set. But even if I set that now, I can reproduce the problem. If I reset the pref then the bug is fixed.
We should make the code more resilient here to avoid this from happening again. For instance, after this line: https://searchfox.org/mozilla-central/rev/94e37e71ffbfd39e6ad73ebcda5d77cce8d341ae/devtools/client/inspector/inspector.js#905 we should set a hard-coded default value for the default tab if the value is empty.

This bug has not been updated in the last 3 months. Resetting the assignee field.
Please, feel free to pick it up again and add a comment outlining your plans for it if you do still intend to work on it.
This is just trying to clean our backlog of bugs and make bugs available for people.

Assignee: gl → nobody
Status: ASSIGNED → NEW
Severity: normal → S3

I know a ton of work has gone into the devtools' Grid viewer in the Layout tab, but this bug is still present (and annoying as hell) as of 2024-10-31 in Firefox 133.0b2 (64-bit) on macOS. I'd be happy to help others reproduce the issue on their machine, or at least help troubleshoot why this is happening on mine.

Also, the devtools.inspector.activeSidebar pref in my profile is set to layoutview, if this helps.

Here are my profile's gridinspector prefs, if it helps.

And here are my inspector prefs.

(In reply to Ryan Sobol [:ryansobol] from comment #7)

I know a ton of work has gone into the devtools' Grid viewer in the Layout tab, but this bug is still present (and annoying as hell) as of 2024-10-31 in Firefox 133.0b2 (64-bit) on macOS. I'd be happy to help others reproduce the issue on their machine, or at least help troubleshoot why this is happening on mine.

Hello Ryan, thanks for your report.
Can you share the page you're seeing this on?
Are you seeing this while doing a specific scenario (adding the display grid declaration from the inspector or the styleeditor, or triggering some other things), or is happen when the page loads? Any detailed step to reproduce would help us diagnose the issue.

Flags: needinfo?(hello)

Hello Ryan, thanks for your report.

You're welcome! :)

Can you share the page you're seeing this on?

https://admin-platform-ryansobol.vercel.app/orders

Grid is being used on the <main> tag, as well as on a few tags nested within.

Are you seeing this while doing a specific scenario (adding the display grid declaration from the inspector or the styleeditor, or triggering some other things), or is happen when the page loads?

It's happening on page load.

Flags: needinfo?(hello)

Thanks Ryan, I think I found the culprit, the grid container has a display: contents ancestor which seems to cause our function to not detect the grid.
I can reproduce it on this simple page: data:text/html,<meta charset=utf8><style>span { display: grid; } .content { display: contents; } </style></div><div class="content"><span>grid inside a <code>display: contents</code></span></div>

Ryan, since this is self contained, I filed Bug 1934619, so the discussion is easier to follow than in this bug

Thanks Ryan, I think I found the culprit, the grid container has a display: contents ancestor which seems to cause our function to not detect the grid

Thanks for tackling this issue and sharing your discovery. Well done!

This is going to affect developers of every site using SvelteKit currently; that's what bit me today.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: