Conversation
|
Size Change: +405 B (+0.01%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 991f5aa. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22153568622
|
|
I appreciate the instinct, and would not want to block this. The motivation is valid. In general those instincts also veer me towards thinking in as generic terms as possible: is this a navigation-block-list-panel feature only or can it also support, say, "Buttons" with the list panel? And is there a way this can be implemented the same in this panel list view as in the major list view itself? I do worry if we diverge on these two paths, it might cause some drift for something that's ideally close in concepts. As far as the application, I wonder if there's a different thing we can try: a blue unread dot next to the text itself, not necessarily right-aligned. It could have the same tooltip. Is that possible/reasonable? |
|
@jasmussen Thanks for your feedback and thoughts on this!
Any component could receive it. How generalized should we go? I'm very in favor of a generalized solution that works for all instances. Also, the solutions I'm making are Private for now so we can test them in core before committing to the API publicly, but they would be available for the List View too.
Totally reasonable. I'd want some different levels of urgency though. Could we do more than just the blue dot? I could do something that allows returning:
What do you think? |
|
I feel it's abundantly clear that we need a generalized linting API, with those different levels you refer to. Contrast issues against any text, missing links, empty placeholders, that's just a few. And this applies to every core block, and every plugin block. The main question is when to draw a line in the sand and say: this much UI without a linting console, and no further. I realize a true linting console could be a large project unless we're careful, and where that line is, is fuzzy! But the thing is, the list view—both the main one and the panel—are already very burdened with all that they can show. I feel like it's at the limit for more stuff in that UI. That's not me being a blocker for this, but rather to say: everything you describe is valid, and it sounds like a linting console. Notice, warning, error, missing links, draft. All of it is important and important for every block, every link. |
|
@jasmussen - I'm totally fine punting on this for now if we don't have alignment over the direction to head. @getdave, do you feel a full, generalized linting console would work to address the main issue, #72622? |
What?
Closes #72622
Allow ListView to receive a custom badge + tooltip area.
Why?
Allow ListView to surface badge indicators for relevant info. This PR implements it to indicate if your navigation item has issues (Draft post, Invalid link, etc).
How?
Pass a custom badge icon and tooltip for display in the list view, overriding the anchor text area.
Testing Instructions
Invalid entity shows Red Triangle Error Icon
Missing Link shows Red Triangle Error Icon
Draft pages shows yellow warning icon
Testing Instructions for Keyboard
Screenshots or screencast