Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview Improvements #906

Merged
merged 3 commits into from
Sep 29, 2024
Merged

Preview Improvements #906

merged 3 commits into from
Sep 29, 2024

Commits on Sep 29, 2024

  1. Configuration menu
    Copy the full SHA
    34d6d99 View commit details
    Browse the repository at this point in the history
  2. code: Compare the string representation of URIs

    For some reason, the object representation of the same URI is not stable
    leading to synchronised scrolling breaking after scrolling the preview
    window.
    
    Instead, compare the string representation of the uris which should
    work around the differences that should not matter.
    alcarney committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    4dab038 View commit details
    Browse the repository at this point in the history
  3. sphinx-agent: Rewrite internal links

    As part of its initial setup, the injected `webview.js` script now
    rewrites any `a.internal` links to include the port number of the
    current websocket connection. This ensures that as the user navigates
    by clicking on links on the page the websocket connection to the
    language server is preserved.
    
    Also by doing an initial scroll sync on page load, this ensures that
    the editor is kept in sync with the change! There is a chance for this
    to be a bit flaky as this in direct conflict with the initial sync an
    editor might want to make if it initiates the preview of a page.
    
    By introducing a small delay on the sync made by the webview, we are
    relying on the editor winning the race and getting its message in
    first... I'm sure that will never cause an issue in the future!
    alcarney committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    b7cb5dd View commit details
    Browse the repository at this point in the history