Skip to content

Responsive Design Mode - Media Query Visualizer #135

@maurusrv

Description

@maurusrv

Goal

Add a media query visualizer on firefox dev tools

summary from the discourse link

    Visualization of media query breakpoints
        Display spanning areas between breakpoints
        Highlight currently matching media queries
        Provide hints for displayed media queries
    Allow resizing to media query breakpoints
    Allow resizing to edge cases (i.e. media query breakpoint +/- 1px)
    Link breakpoints to media queries in Style Editor
    Synchronize this feature with the media query sidebar within the Style Editor

Bug / Request Documentation

Discourse

Show media queries in Responsive Design View

BugZilla

Media Query Visualizer in Responsive Design Mode
Visualize the vertical lines of media queries in the viewport when on the inspector

Implementation Plan from @nchevobbe

  1. Add a new component (e.g. MediaQueryVisualizer) rendered below the Toolbar component
  2. check how the style editor retrieves the list of media query (and react to any changes in media queries) https://searchfox.org/mozilla-central/rev/cc4a17cea338fe236626d838ca96e9bf6a775675/devtools/client/styleeditor/StyleEditorUI.jsm#1244-1248
  1. one thing we might do early is add a preference that would be set to false so we can start adding work without making it visible until we have something we're happy with (i.e. something like https://searchfox.org/mozilla-central/rev/368607c4cd5be547021945e4ae60e8eb4365b3c4/browser/app/profile/firefox.js#2461)
    we'd need to create a decicated bug for that, that would block https://bugzilla.mozilla.org/show_bug.cgi?id=1031585

References

Note

hi, let me know if this is the wrong place for documenting the current discussions and initial implementation plan for this feature. just wanted to put it in one place and make the conversation going. as suggested by @nchevobbe i will try checking the points under Implementation Plan and see how to work through it. thanks! -@maurusrv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions