Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Jump to HTML Code in Brackets by Selecting in Browser (Live Development) #8996

@pthiess

Description

@pthiess

As a user, I want to be able to click on an HTML element in the browser and have Brackets jump the cursor to the HTML tag corresponding to that element (assuming it was not dynamically generated or reparented at runtime).

Requirements

  • Only works in Live HTML mode running off of Bracket's Node Server
    • When running from a user's server, the button is grayed out with a tooltip that provides info about why it's grayed out.
  • (Pending feedback from Larz) have a button in the browser window that enters the user into "Jump to Brackets" mode
  • Button should be hidable
  • Design consideration: We will eventually want to expand the functionality of the in-browser button
  • Mouseover feedback that highlights the bounds of the element below the mouse cursor
  • Clicking on the highlighted element jumps to that HTML in Brackets.
  • Should work the same way as jump to definition/quick open where it opens the file and selects the line where that element starts.
  • Brackets should be active and brought to the front.
  • If the selected HTML element can't be mapped back for any reason
    • Activate Brackets and bring it to the front
    • Select the nearest parent element that we can find a match for
    • Display an error (using the Quick Edit error notification pattern) that tells the user why we couldn't find that exact element.

Open Questions/Items for Larz

  • Design of the button
  • Design of the mouse over affordance to highlight the element that will be jumped to.

Out of Scope

  • Supporting a users' server
  • CSS

See also the Jump to CSS code Trello card and this original story in the backlog for additional comments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions