Closed Bug 735576 Opened 12 years ago Closed 12 years ago

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

Categories

(DevTools :: Inspector, defect, P2)

x86
All
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 18

People

(Reporter: paul, Assigned: miker)

Details

(Whiteboard: [ruleview])

Attachments

(1 file, 3 obsolete files)

Right now, you have to hit enter to know if the value is correct or not.
triage, filter on centaur
Priority: -- → P2
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
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 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.
(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.
Attached patch Now with live values (obsolete) — Splinter Review
Now we toggle the property and update the property live.
Attachment #613556 - Attachment is obsolete: true
Attachment #616991 - Flags: review?(dcamp)
Attached patch Removed live update (obsolete) — Splinter Review
Attachment #616991 - Attachment is obsolete: true
Attachment #616991 - Flags: review?(dcamp)
Attachment #618240 - Flags: review?(dcamp)
Attachment #618240 - Attachment is obsolete: true
Attachment #618240 - Flags: review?(dcamp)
Attachment #666993 - Flags: review?(dcamp)
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
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [ruleview][fixed-in-fx-team] → [ruleview]
Target Milestone: --- → Firefox 18
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: