Skip to content

Deep-linking to any content inside a page #57

@michael

Description

@michael

Since everything has an id already the first thing to do is to expose id="cHakxekvzavEawKMsPmfVWr" (not just data-id) on all the elements. Then you can start deep linking to /projects#cHakxekvzavEawKMsPmfVWr etc.

Next step - UX:

In order to "grab" those deep links (e.g. by opening the page you want to link to in another tab) I think EW might need a right-click context menu feature.

Image

This should even work for normal visitors in read mode. But for editors it's particularly a cool tool to deep link from one page to another reliably.

Still I do have some concerns:

  • overriding the native context menu may cause usability issues (that's a serious one to me)
    • e.g. select some text, right click copy
    • I'd need to include all those actions in the custom context menu (can I really include them all, and will they work? E.g. inspect or show page source?
  • There's already "Link to highlight" functionality in browsers for deep linking. So the question is: why not just promote using that?
    • what's better about EW deep-linking is that it allows linking to structural elements in a robust way, not just text anchors (which may not work anymore as soon as the page's content changes)

More considerations:

  • I don't want to spoil the link tool with deep linking (that will get messy and confusing, and you don't want to do deep linking so often)
  • I don't want any UI clutter. E.g. in read mode some tooltips like the classic hover over heading to then grab the link. Because this will never work with all the possible layouts. I needs to be UI-less.
  • Honestly at this moment I can't hink of a better gesture than right click, because in viewer-mode this allows you to "reveal" the closest parent block of where you clicked (which is the thing to be highlighted)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions