Closed Bug 1348471 Opened 8 years ago Closed 7 years ago

Grid outline should handle extreme cases

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: micah, Assigned: micah)

References

Details

Attachments

(1 file, 2 obsolete files)

The grid outline should handle extreme cases where a grid layout cannot be effectively fitted inside the layout panel. Some extreme cases can be grids that are 1000x1000, or if a grid is 1 thin column with 100 rows. Cases like these make the grid outline's cells way too small for it to be usable.
Priority: -- → P3
Assignee: nobody → tigleym
Status: NEW → ASSIGNED
Comment on attachment 8861745 [details] Bug 1348471 - Grid outline should handle extreme cases. https://reviewboard.mozilla.org/r/133732/#review140918 Clearing review since this will need to be rebased on top of bug 1359759. Let's block this until that is landed.
Attachment #8861745 - Flags: review?(gl)
Depends on: 1359759
Comment on attachment 8861745 [details] Bug 1348471 - Grid outline should handle extreme cases. https://reviewboard.mozilla.org/r/133732/#review142618 ::: devtools/client/inspector/grids/components/GridOutline.js:173 (Diff revision 2) > rowNumber, columnNumber); > } > }, > > /** > + * Displays a message text "Cannot Show Outline for this Grid". "Cannot show outline for this grid" ::: devtools/client/inspector/grids/components/GridOutline.js:177 (Diff revision 2) > /** > + * Displays a message text "Cannot Show Outline for this Grid". > + * > + */ > + renderCannotShowOutlineText() { > + return dom.div( I wonder if we need to separate this into its own render function. I am kinda indifferent on it. ::: devtools/client/inspector/grids/components/GridOutline.js:181 (Diff revision 2) > + renderCannotShowOutlineText() { > + return dom.div( > + { > + className: "grid-outline-text" > + }, > + "Cannot Show Outline for this Grid" "Cannot show outline for this grid" ::: devtools/client/inspector/grids/components/GridOutline.js:216 (Diff revision 2) > width = GRID_CELL_SCALE_FACTOR * (cols.tracks[columnNumber - 1].breadth / 100); > > + // If a grid cell is less than the minimum pixels in width or height, > + // do not render the outline at all. > + if (width < MIN_CELL_WIDTH || height < MIN_CELL_HEIGHT) { > + this.setState({showOutline: false}); this.setState({ showOutline: false }) ::: devtools/client/inspector/grids/components/GridOutline.js:449 (Diff revision 2) > > onShowGridLineNamesHighlight(grids[id].nodeFront, fragmentIndex, color, > lineNumber, type); > }, > > - render() { > + showOutline() { s/showOutline/renderOutline ::: devtools/client/inspector/grids/components/GridOutline.js:453 (Diff revision 2) > > - render() { > + showOutline() { > const { selectedGrid, height, width } = this.state; > > - return selectedGrid ? > + return this.state.showOutline ? > - dom.svg( > + dom.svg( Keep this indented.
Attachment #8861745 - Flags: review?(gl) → review+
Comment on attachment 8861745 [details] Bug 1348471 - Grid outline should handle extreme cases. Gonna ask pbro for a ui review on the display of the message.
Attachment #8861745 - Flags: review?(pbrosset)
http://gridbyexample.com/examples/code/layout4.html would be an example of a grid that cannot be displayed in the grid outline.
Comment on attachment 8861745 [details] Bug 1348471 - Grid outline should handle extreme cases. Sorry, I'm under a bit of a review overload, I'll pass this over to Matteo.
Attachment #8861745 - Flags: review?(pbrosset) → review?(zer0)
(In reply to Patrick Brosset <:pbro> from comment #7) > Sorry, I'm under a bit of a review overload, I'll pass this over to Matteo. *a bit under*
Attachment #8861745 - Flags: review?(zer0)
Attached file 1348471.patch (obsolete) (deleted) —
Attachment #8861745 - Attachment is obsolete: true
Attachment #8872505 - Flags: review+
Attached patch 1348471.patch (deleted) — Splinter Review
Attachment #8872505 - Attachment is obsolete: true
Attachment #8872511 - Flags: review+
Pushed by gabriel.luong@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/fc3bbe02ce7d Display a message when the grid outline cannot effectively be fitted inside the layout panel. r=gl
Attachment #8872511 - Attachment is patch: true
Backout by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2a5ce0b6f2cd Backed out changeset fc3bbe02ce7d for test failures in browser_misused_characters_in_strings.js
Pushed by gabriel.luong@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/327ecc8de029 Display a message when the grid outline cannot effectively be fitted inside the layout panel. r=gl
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
(In reply to Carsten Book [:Tomcat] from comment #13) > had to backout for failures like > https://treeherder.mozilla.org/logviewer.html#?job_id=102952826&repo=mozilla- > inbound Has been resolved.
Flags: needinfo?(tigleym)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: