DevTools/Features/RulesView: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{FeatureStatus
{{FeatureStatus
|Feature name=CSS Rules View
|Feature name=CSS Rules View
|Feature stage=Draft
|Feature stage=Complete
|Feature status=Complete
|Feature version=Firefox 10
|Feature health=OK
|Feature health=OK
}}
}}
{{FeatureTeam
{{FeatureTeam
|Feature product manager=Kevin Dangoor
|Feature product manager=Kevin Dangoor
|Feature feature manager=Dave Camp
|Feature feature manager=Kevin Dangoor
|Feature lead engineer=Dave Camp
|Feature lead engineer=Dave Camp
}}
}}
Line 18: Line 20:
|Feature requirements=* Collection of rules that apply to the element selected by the Page Inspector
|Feature requirements=* Collection of rules that apply to the element selected by the Page Inspector
* Sorted from most specific to least specific
* Sorted from most specific to least specific
* Integrates with the Style Inspector


Desired, but not required for shipping:
Desired, but not required for shipping:
* Integrates with the Style Inspector
* Ability to edit values
* Ability to edit values
* Ability to toggle property/value pairs
* Ability to toggle property/value pairs
Line 27: Line 29:
|Feature functional spec===== From the Page Inspector ====
|Feature functional spec===== From the Page Inspector ====


Clicking the Styles button on the Page Inspector's toolbar will open up the Rules View/Style Inspector (F1). Those two views of styles will be presented together. The last view chosen will be remembered and displayed by default the next time (F2). Ideally, we would use Telemetry to keep track of how many people use each view and how often (requirement needs to be more specific).
Clicking the Styles button on the Page Inspector's toolbar will open up the Rules View/Style Inspector <span id="F1">(F1)</span>. Those two views of styles will be presented together. The last view chosen will be remembered and displayed by default the next time <span id="F2">(F2)</span>. Ideally, we would use Telemetry to keep track of how many people use each view and how often (requirement needs to be more specific).


==== Initial Display ====
==== Initial Display ====


Like similar tools, the rules that apply to the selected page element will be displayed in a style that is similar to a CSS file (F3). They will be sorted by specificity (F4).
Like similar tools, the rules that apply to the selected page element will be displayed in a style that is similar to a CSS file <span id="F3">(F3)</span>. They will be sorted by specificity <span id="F4">(F4)</span>.


Rules that have been overridden will be displayed differently (eg strikethrough or de-emphasized) than the active rules (F5).
Rules that have been overridden will be displayed differently (eg strikethrough or de-emphasized) than the active rules <span id="F5">(F5)</span>.


==== Links ====
==== Links ====


Each rule will include a link to the stylesheet (F6). Ideally, this link will go to the Style Editor on the appropriate line. If the Style Editor is not ready, link to that line in View Source. On hover, display the complete URL (F7).
Each rule will include a link to the stylesheet <span id="F6">(F6)</span>. Ideally, this link will go to the Style Editor on the appropriate line. If the Style Editor is not ready, link to that line in View Source. On hover, display the complete URL <span id="F7">(F7)</span>.


For each property, a link to MDN will be provided, as it is in the Style Inspector (F8). (optional, but high value) A control available at the property level will switch to the Style Inspector view for that property (F9).
For each property, a link to MDN will be provided, as it is in the Style Inspector <span id="F8">(F8)</span>. (optional, but high value) A control available at the property level will switch to the Style Inspector view for that property <span id="F9">(F9)</span>.


==== Editing ====
==== Editing ====
Line 45: Line 47:
This section is not a blocker for shipping.
This section is not a blocker for shipping.


Each property will have a toggle control (F10). Similarly, each rule will have a toggle control (F11).
Each property will have a toggle control <span id="F10">(F10)</span>. Similarly, each rule will have a toggle control <span id="F11">(F11)</span>.


A single click on a value will provide a text box for editing that value (F12). A single click on the property name will provide a text box for editing the property name (F13). Superior alternative: clicking the property name makes the whole line editable with the property name selected (F14).
A single click on a value will provide a text box for editing that value <span id="F12">(F12)</span>. A single click on the property name will provide a text box for editing the property name <span id="F13">(F13)</span>. When editing the property name, pressing <tt>tab</tt>, <tt>:</tt> or <tt>enter</tt> will switch the entry over to the value. <span id="F14">(F14)</span>


If a property or value is invalid, there should be an error indicator but the property/value pair will not be thrown away (F15).
If a property or value is invalid, there should be an error indicator but the property/value pair will not be thrown away for edits made in the tool <span id="F15">(F15)</span>. Ideally, styles that were in the stylesheet but were invalid would not be thrown away as well <span id="F20">(F20)</span>.


==== Adding Rules and Properties ====
==== Adding Rules and Properties ====
Line 55: Line 57:
As with editing, this section is optional.
As with editing, this section is optional.


New property/value pairs can be added to existing rules (F16), ideally in a single text box.
New property/value pairs can be added to existing rules <span id="F16">(F16)</span> with entry behavior that is similar to the editing behavior provided for existing property/value pairs.


Element styles can also be edited and extended with new properties (F17).
Element styles can also be edited and extended with new properties <span id="F17">(F17)</span>.


Entirely new rules can be added (F18).
Entirely new rules can be added <span id="F18">(F18)</span>.


==== Media Queries ====
==== Media Queries ====
Line 65: Line 67:
Optional.
Optional.


There was a [https://bugs.webkit.org/show_bug.cgi?id=65626 straightforward suggestion for WebKit] that would make sense for this tool as well (F19).
There was a [https://bugs.webkit.org/show_bug.cgi?id=65626 straightforward suggestion for WebKit] that would make sense for this tool as well <span id="F19">(F19)</span>.
}}
}}
{{FeatureInfo
{{FeatureInfo
|Feature priority=Unprioritized
|Feature priority=P1
|Feature rank=5
|Feature roadmap=Developer Tools
|Feature roadmap=Developer Tools
|Feature list=Desktop
|Feature list=Desktop
|Feature engineering team=DevTools
|Feature engineering team=DevTools
}}
}}
{{FeatureTeamStatus}}
{{FeatureTeamStatus
|Feature security status=sec-review-complete
|Feature security health=OK
|Feature security notes=* Reviewed on 2011.12.09
* * [[Security/reviews/firefox/PageInspectorHighlighter | Notes]]
}}

Latest revision as of 13:43, 30 August 2012

Please use "Edit with form" above to edit this page.

Status

CSS Rules View
Stage Complete
Status Complete
Release target Firefox 10
Health OK
Status note `

{{#set:Feature name=CSS Rules View

|Feature stage=Complete |Feature status=Complete |Feature version=Firefox 10 |Feature health=OK |Feature status note=` }}

Team

Product manager Kevin Dangoor
Directly Responsible Individual Kevin Dangoor
Lead engineer Dave Camp
Security lead `
Privacy lead `
Localization lead `
Accessibility lead `
QA lead `
UX lead `
Product marketing lead `
Operations lead `
Additional members `

{{#set:Feature product manager=Kevin Dangoor

|Feature feature manager=Kevin Dangoor |Feature lead engineer=Dave Camp |Feature security lead=` |Feature privacy lead=` |Feature localization lead=` |Feature accessibility lead=` |Feature qa lead=` |Feature ux lead=` |Feature product marketing lead=` |Feature operations lead=` |Feature additional members=` }}

Open issues/risks

`

Stage 1: Definition

1. Feature overview

The Style Inspector provides a new view of CSS that is a hybrid between a computed styles view and the traditional rules-oriented view. While this view is useful and will become more useful over time, there are use cases for which the traditional rules-based view is better.

2. Users & use cases

All web developers use this view at one time or other.

Exploring the Hierarchy of Styles on an Element

When picking up a page from someone else (either a third party or an earlier developer within an organization) the rules view helps discover the organization of the stylesheets.

3. Dependencies

`

4. Requirements

  • Collection of rules that apply to the element selected by the Page Inspector
  • Sorted from most specific to least specific

Desired, but not required for shipping:

  • Integrates with the Style Inspector
  • Ability to edit values
  • Ability to toggle property/value pairs
  • Integration with the Style Editor
  • Media query support

Non-goals

`

Stage 2: Design

5. Functional specification

From the Page Inspector

Clicking the Styles button on the Page Inspector's toolbar will open up the Rules View/Style Inspector (F1). Those two views of styles will be presented together. The last view chosen will be remembered and displayed by default the next time (F2). Ideally, we would use Telemetry to keep track of how many people use each view and how often (requirement needs to be more specific).

Initial Display

Like similar tools, the rules that apply to the selected page element will be displayed in a style that is similar to a CSS file (F3). They will be sorted by specificity (F4).

Rules that have been overridden will be displayed differently (eg strikethrough or de-emphasized) than the active rules (F5).

Links

Each rule will include a link to the stylesheet (F6). Ideally, this link will go to the Style Editor on the appropriate line. If the Style Editor is not ready, link to that line in View Source. On hover, display the complete URL (F7).

For each property, a link to MDN will be provided, as it is in the Style Inspector (F8). (optional, but high value) A control available at the property level will switch to the Style Inspector view for that property (F9).

Editing

This section is not a blocker for shipping.

Each property will have a toggle control (F10). Similarly, each rule will have a toggle control (F11).

A single click on a value will provide a text box for editing that value (F12). A single click on the property name will provide a text box for editing the property name (F13). When editing the property name, pressing tab, : or enter will switch the entry over to the value. (F14)

If a property or value is invalid, there should be an error indicator but the property/value pair will not be thrown away for edits made in the tool (F15). Ideally, styles that were in the stylesheet but were invalid would not be thrown away as well (F20).

Adding Rules and Properties

As with editing, this section is optional.

New property/value pairs can be added to existing rules (F16) with entry behavior that is similar to the editing behavior provided for existing property/value pairs.

Element styles can also be edited and extended with new properties (F17).

Entirely new rules can be added (F18).

Media Queries

Optional.

There was a straightforward suggestion for WebKit that would make sense for this tool as well (F19).

6. User experience design

`

Stage 3: Planning

7. Implementation plan

`

8. Reviews

Security review

`

Privacy review

`

Localization review

`

Accessibility

`

Quality Assurance review

`

Operations review

`

Stage 4: Development

9. Implementation

`

Stage 5: Release

10. Landing criteria

` {{#set:Feature open issues and risks=` |Feature overview=The Style Inspector provides a new view of CSS that is a hybrid between a computed styles view and the traditional rules-oriented view. While this view is useful and will become more useful over time, there are use cases for which the traditional rules-based view is better. |Feature users and use cases=All web developers use this view at one time or other.

Exploring the Hierarchy of Styles on an Element

When picking up a page from someone else (either a third party or an earlier developer within an organization) the rules view helps discover the organization of the stylesheets. |Feature dependencies=` |Feature requirements=* Collection of rules that apply to the element selected by the Page Inspector

  • Sorted from most specific to least specific

Desired, but not required for shipping:

  • Integrates with the Style Inspector
  • Ability to edit values
  • Ability to toggle property/value pairs
  • Integration with the Style Editor
  • Media query support

|Feature non-goals=` |Feature functional spec===== From the Page Inspector ====

Clicking the Styles button on the Page Inspector's toolbar will open up the Rules View/Style Inspector (F1). Those two views of styles will be presented together. The last view chosen will be remembered and displayed by default the next time (F2). Ideally, we would use Telemetry to keep track of how many people use each view and how often (requirement needs to be more specific).

Initial Display

Like similar tools, the rules that apply to the selected page element will be displayed in a style that is similar to a CSS file (F3). They will be sorted by specificity (F4).

Rules that have been overridden will be displayed differently (eg strikethrough or de-emphasized) than the active rules (F5).

Links

Each rule will include a link to the stylesheet (F6). Ideally, this link will go to the Style Editor on the appropriate line. If the Style Editor is not ready, link to that line in View Source. On hover, display the complete URL (F7).

For each property, a link to MDN will be provided, as it is in the Style Inspector (F8). (optional, but high value) A control available at the property level will switch to the Style Inspector view for that property (F9).

Editing

This section is not a blocker for shipping.

Each property will have a toggle control (F10). Similarly, each rule will have a toggle control (F11).

A single click on a value will provide a text box for editing that value (F12). A single click on the property name will provide a text box for editing the property name (F13). When editing the property name, pressing tab, : or enter will switch the entry over to the value. (F14)

If a property or value is invalid, there should be an error indicator but the property/value pair will not be thrown away for edits made in the tool (F15). Ideally, styles that were in the stylesheet but were invalid would not be thrown away as well (F20).

Adding Rules and Properties

As with editing, this section is optional.

New property/value pairs can be added to existing rules (F16) with entry behavior that is similar to the editing behavior provided for existing property/value pairs.

Element styles can also be edited and extended with new properties (F17).

Entirely new rules can be added (F18).

Media Queries

Optional.

There was a straightforward suggestion for WebKit that would make sense for this tool as well (F19). |Feature ux design=` |Feature implementation plan=` |Feature security review=` |Feature privacy review=` |Feature localization review=` |Feature accessibility review=` |Feature qa review=` |Feature operations review=` |Feature implementation notes=` |Feature landing criteria=` }}

Feature details

Priority P1
Rank 5
Theme / Goal `
Roadmap Developer Tools
Secondary roadmap `
Feature list Desktop
Project `
Engineering team DevTools

{{#set:Feature priority=P1

|Feature rank=5 |Feature theme=` |Feature roadmap=Developer Tools |Feature secondary roadmap=` |Feature list=Desktop |Feature project=` |Feature engineering team=DevTools }}

Team status notes

  status notes
Products ` `
Engineering ` `
Security sec-review-complete * Reviewed on 2011.12.09
Privacy ` `
Localization ` `
Accessibility ` `
Quality assurance ` `
User experience ` `
Product marketing ` `
Operations ` `

{{#set:Feature products status=`

|Feature products notes=` |Feature engineering status=` |Feature engineering notes=` |Feature security status=sec-review-complete |Feature security health=OK |Feature security notes=* Reviewed on 2011.12.09

|Feature privacy status=` |Feature privacy notes=` |Feature localization status=` |Feature localization notes=` |Feature accessibility status=` |Feature accessibility notes=` |Feature qa status=` |Feature qa notes=` |Feature ux status=` |Feature ux notes=` |Feature product marketing status=` |Feature product marketing notes=` |Feature operations status=` |Feature operations notes=` }}