Closed Bug 669656 Opened 13 years ago Closed 13 years ago

[highlighter] Once a node is locked, the highlighter should give a visual feedback

Categories

(DevTools :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: paul, Assigned: paul)

References

Details

(Whiteboard: [minotaur][fixed-in-fx-team] )

Attachments

(2 files, 5 obsolete files)

When the user locks a node, the highlighter should give a visual feedback. A different style (colors?) for the selection box could be a good approach.
Blocks: 663830
No longer depends on: 669652
Attached patch patch v1 (obsolete) — Splinter Review
The approach here is to make the selection box borders half transparent while inspecting, and totally opaque while locked. The difference is not big, but it should be enough. Also, I removed the stopInspecting call in closeInspectorUI, because it would call onlock, which is useless. We called stopInspecting because it was removing some listeners. So I removed stopInspecting and add instead detachPageListeners().
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #544486 - Flags: review?(rcampbell)
Comment on attachment 544486 [details] [diff] [review] patch v1 Naming nit: Not sure I like the onlock and onunlock method names. They suggest that they're callbacks but they're being called directly. Maybe rename them locked and unlocked? Further, since you're just adding and removing classList entries in onlock/unlock, maybe just do that directly instead of calling a full method? I decoded the CSS and think it looks reasonable. In my local version though, I have outline: 2px and offset: -2px. I think that would look better and be slightly more visible than a 1px half-transparent border. r+ with the methods removed.
Attachment #544486 - Flags: review?(rcampbell) → review+
ps, do the unittests still pass with the stopInspecting call removed?
Attached patch patch v1.1 (obsolete) — Splinter Review
Addressed Rob's comments. I think the selection border should be 1px, not 2px. I just feel like 2px is too "rough". We are delimiting a surface here, and 1px is what all the designer tools do.
Attachment #544486 - Attachment is obsolete: true
Attachment #544814 - Flags: review?(dao)
Comment on attachment 544814 [details] [diff] [review] patch v1.1 We should add the same kind of feedback in the HTML panel as well. Working on it.
Attachment #544814 - Flags: review?(dao)
Attached patch patch v1.3 (obsolete) — Splinter Review
Change the style of the dashed border in the highlighter and change the color of the selection in the HTML Inspector.
Attachment #544814 - Attachment is obsolete: true
Attachment #546013 - Flags: review?(rcampbell)
Attached patch patch v1.4 (obsolete) — Splinter Review
Sorry, made a mistake in the previous patch.
Attachment #546013 - Attachment is obsolete: true
Attachment #546027 - Flags: review?(rcampbell)
Attachment #546013 - Flags: review?(rcampbell)
Blocks: 671689
Comment on attachment 546027 [details] [diff] [review] patch v1.4 >+ this.highlighter.highlighterContainer.classList.add("locked"); Classes should be reusable and distinctive in mozilla code (i.e. using .locked with no id put in front would need to make sense throughout -- at least -- browser.xul). Here you should set an attribute rather than a class since you only want to put this particular element in a certain mode. Also, why is this highlighterContainer rather than veilTransparentBox?
Attachment #546027 - Flags: review-
Whiteboard: [minotaur]
(In reply to comment #8) > Comment on attachment 546027 [details] [diff] [review] [review] > patch v1.4 > > >+ this.highlighter.highlighterContainer.classList.add("locked"); > > Classes should be reusable and distinctive in mozilla code (i.e. using > .locked with no id put in front would need to make sense throughout -- at > least -- browser.xul). Here you should set an attribute rather than a class > since you only want to put this particular element in a certain mode. Will do. > Also, why is this highlighterContainer rather than veilTransparentBox? In the future, some other elements in the controls box could be affected too (we are working on a floating info bar lying in the controls box, and its style will be affected too).
Attached patch patch v1.5 (obsolete) — Splinter Review
Use a "locked" attribute instead of a class. I removed the HTML panel related code (will do that in another bug).
Attachment #546027 - Attachment is obsolete: true
Attachment #547661 - Flags: review?(dao)
Attachment #546027 - Flags: review?(rcampbell)
Is there a downside to setting the attribute directly on highlighter-veil-transparentbox?
Not really. But we will have to move it back to highlighterContainer later (which is not a problem).
I'm asking because the descendent selector should be avoided. https://developer.mozilla.org/en/Writing_Efficient_CSS#Avoid_the_descendant_selector
Attached patch patch v1.6Splinter Review
(In reply to comment #13) > I'm asking because the descendent selector should be avoided. > https://developer.mozilla.org/en/ > Writing_Efficient_CSS#Avoid_the_descendant_selector I see. Patch updated.
Attachment #547661 - Attachment is obsolete: true
Attachment #547732 - Flags: review?(dao)
Attachment #547661 - Flags: review?(dao)
Comment on attachment 547732 [details] [diff] [review] patch v1.6 > outline: 1px dashed rgba(255,255,255,0.5); > outline-offset: -1px; > } >+ >+#highlighter-veil-transparentbox[locked] { >+ box-shadow: 0 0 0 1px rgba(0,0,0,1); >+ outline: 1px dashed rgba(255,255,255,1); >+} "rgba(0,0,0,1)" should just be "black". "outline: 1px dashed rgba(255,255,255,1)" should just be "outline-color: white". r=me with that By the way, please use 8 lines context in patches.
Attachment #547732 - Flags: review?(dao) → review+
Thanks for the r+ Dao.
Whiteboard: [minotaur] → [minotaur][land-in-fx-team]
Whiteboard: [minotaur][land-in-fx-team] → [minotaur][fixed-in-fx-team]
Attachment #547739 - Attachment description: patch v1.7 → [checked-in] patch v1.7
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: