[ruleview] The warning icon should disappear as soon as the value is correct

RESOLVED FIXED in Firefox 18

Status

()

Firefox
Developer Tools: Inspector
P2
normal
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: paul, Assigned: miker)

Tracking

Trunk
Firefox 18
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ruleview])

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

6 years ago
Right now, you have to hit enter to know if the value is correct or not.
(Reporter)

Comment 1

6 years ago
triage, filter on centaur
Priority: -- → P2

Updated

6 years ago
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Created attachment 613556 [details] [diff] [review]
Patch

This was held up due to a hard to find leak (fixed by somebody else).

This fix almost seems too easy :o/
Attachment #613556 - Flags: review?(dcamp)
Whiteboard: [ruleview][has-patch]

Comment 3

6 years ago
Comment on attachment 613556 [details] [diff] [review]
Patch

Review of attachment 613556 [details] [diff] [review]:
-----------------------------------------------------------------

This causes spew to the error console while typing - a warning for every keystroke that doesn't parse.

We should be able to prevent this spew by wrapping the setProperty() with something like:

let prefVal = getPref("layout.css.report_errors");
setPref("layout.css.report_errors", false);
try {
  setProperty()
} finally {
  setPref("layout.css.report_errors, prefVal");
}

but it would be worth asking the layout guys if there's a better solution.

If we fix that it might be worth updating the live stylesheet as you type so that you don't need to press enter every time you want to try a value...
Attachment #613556 - Flags: review?(dcamp) → review-
(In reply to Dave Camp (:dcamp) from comment #3)
> Comment on attachment 613556 [details] [diff] [review]
> Patch
> 
> Review of attachment 613556 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> This causes spew to the error console while typing - a warning for every
> keystroke that doesn't parse.
> 
> We should be able to prevent this spew by wrapping the setProperty() with
> something like:
> 
> let prefVal = getPref("layout.css.report_errors");
> setPref("layout.css.report_errors", false);
> try {
>   setProperty()
> } finally {
>   setPref("layout.css.report_errors, prefVal");
> }
> 

That makes sense, we can do that.

> but it would be worth asking the layout guys if there's a better solution.
> 

It would be cool if we could get a list of possible property values to compare against. This list could also be used for autocomplete, I will post on dev.tech.layout.

> If we fix that it might be worth updating the live stylesheet as you type so
> that you don't need to press enter every time you want to try a value...

The problem with this is that when the value is invalid the property ceases to exist in the stylesheet but we should be able to do this.

Comment 5

6 years ago
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #4)
> (In reply to Dave Camp (:dcamp) from comment #3)
> It would be cool if we could get a list of possible property values to
> compare against. This list could also be used for autocomplete, I will post
> on dev.tech.layout.

For autocomplete that might be useful, but we should let the css parser validate css.

> > If we fix that it might be worth updating the live stylesheet as you type so
> > that you don't need to press enter every time you want to try a value...
> 
> The problem with this is that when the value is invalid the property ceases
> to exist in the stylesheet but we should be able to do this.

We could do a validation and apply when valid.  This can be a separate bug.
Created attachment 616991 [details] [diff] [review]
Now with live values

Now we toggle the property and update the property live.
Attachment #613556 - Attachment is obsolete: true
Attachment #616991 - Flags: review?(dcamp)
Created attachment 618240 [details] [diff] [review]
Removed live update
Attachment #616991 - Attachment is obsolete: true
Attachment #616991 - Flags: review?(dcamp)
Attachment #618240 - Flags: review?(dcamp)
Created attachment 666993 [details] [diff] [review]
5 month review ping plus rebase
Attachment #618240 - Attachment is obsolete: true
Attachment #618240 - Flags: review?(dcamp)
Attachment #666993 - Flags: review?(dcamp)

Updated

5 years ago
Attachment #666993 - Flags: review?(dcamp) → review+
Whiteboard: [ruleview][has-patch] → [ruleview][land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/254ec57084a6
Whiteboard: [ruleview][land-in-fx-team] → [ruleview][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/254ec57084a6
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [ruleview][fixed-in-fx-team] → [ruleview]
Target Milestone: --- → Firefox 18
You need to log in before you can comment on or make changes to this bug.