Closed Bug 1057547 Opened 6 years ago Closed 2 months ago

There is no indication when I use styles that are unsupported in wiki page content

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect)

All
Other
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sheppy, Unassigned)

Details

(Whiteboard: [specification][type:feature])

What problems would this solve?
===============================
We should add some sort of warning indicator next to/around/adjacent to content in the page when the contributor inserts content that uses undefined CSS classes, or the |style| attribute.

Either of these cases is almost certainly a mistake, and in the latter case should not be done at all (we only allow style because we do have a few unfortunate cases where we have no choice yet).

Who would use this?
===================
Any contributor would benefit from this notification.

What would users see?
=====================
Some kind of highlighting of the affected block, with a notification box that there's a problem.

What would users do? What would happen as a result?
===================================================
When the user makes this mistake, mousing over the highlighted area would present an explanation of the mistake somewhere ("The class 'foobar' is undefined and should not be used. Please remove it from this block." or "This block uses the style attribute, which we strongly discourage. Please remove it. The style is: <attribute's value here>."

Perhaps we even have a button that will remove the offender for them, plus a "remove all" button if there's more than one?

Is there anything else we should know?
======================================
We'd either need to know (a) the pattern or (b) the class list.  There's a decent chance this isn't feasible.
(In reply to David Walsh :davidwalsh from comment #1)
> We'd either need to know (a) the pattern or (b) the class list.  There's a
> decent chance this isn't feasible.

What do you mean by "the pattern" here?

As for a class list, given that we provide the CSS for our pages, there ought to be a way to have a list of available classes to restrict the user to.

And warning on the |style| attribute should be trivial (other than deciding on the mechanism by which to provide this warning/indication).
(Keep in mind that for |style| we would want to warn on any use of the attribute; the value doesn't matter at all)
The |style| thing is feasible, but the classname thing sounds horribly inefficient.
Severity: normal → minor
Component: General → Wiki pages
Summary: Present some sort of indicator when unknown classes or |style| attribute are used → There is no indication when I use styles that are unsupported in wiki page content
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.