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

fix: Backlinks will no longer disappear in preview upon editing #2608

Merged
merged 5 commits into from Mar 25, 2022

Conversation

tma66
Copy link
Contributor

@tma66 tma66 commented Mar 22, 2022

Background
Previously, backlinks would disappear in the preview after any edit. This is due to the backlinks being overridden during the findLinks process as well as not being propagated during the hydrate process

Changes

  1. Keep existing backlinks when processing a note body to find links
  2. Keep existing backlinks when hydrating from one note to another

TODO: This pr addresses missing backlinks. However, backlinks are still not being updated. This will be addressed during a backlinks overhaul

Dendron Extended PR Checklist

Code

Basics

Extended

  • General
    • check whether code be simplified
    • check if similar function already exist in the codebase. if so, can it be re-used?
    • check if this change adversely impact performance
  • Operations
    • when shipping this change, will it just work or will it introduce additional operational overhead due to complicated interface or known bugs?
  • Architecture
    • check if code is introducing changes on a foundational class or interface. if so, call for design review if needed

Instrumentation

Basics

  • if you are adding analytics related changes, make sure you Document changes in airtable

Extended

Tests

Basics

Extended

  • If you are adding a new language feature (graphically visible in VS Code/preview/publishing), an example is included in the test workspace

  • CSS

    • display is correct for following dimensions
      • sm: screen ≥ 576px, eg. iphonex, (375x812)
      • lg: screen ≥ 992px
      • xxl: screen ≥ 1600px eg. mac (1600x900)
    • display is correct for following browsers (across the various dimensions)
      • safari
      • firefox
      • chrome

Docs

Basics

  • if your change reflects documentation changes, also submit a PR to dendron-site and mention the doc PR link in your current PR

Basics

  • does this change introduce a new or better way of doing things that others need to be aware of? if so, an async should be created and a process added in Development or Packages

Close the Loop

Basics

Extended

  • is this a developer BREAKING change? if another person cloning from this branch will need to adjust their dependencies or mental model of the architecture, then it is. if this is the case, make sure this is communicated according to Close Loop

@tma66 tma66 force-pushed the fix/backlinks-missing-preview branch from 8a99bfd to 8281e30 Compare March 23, 2022 00:04
@tma66 tma66 marked this pull request as ready for review March 23, 2022 00:13
@auto-assign auto-assign bot requested a review from kevinslin March 23, 2022 00:13
Copy link
Contributor

@jonathanyeung jonathanyeung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a question, otherwise lgtm

packages/engine-server/src/markdown/remark/utils.ts Outdated Show resolved Hide resolved
Copy link
Member

@kevinslin kevinslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, pending existing comments. also, fyi - the reason the snapshot files updated is because in this test, you updated the backlinks which we currently have a snapshot test for.

@tma66 tma66 force-pushed the fix/backlinks-missing-preview branch from 2c73a3b to 8646744 Compare March 24, 2022 22:51
@kevinslin kevinslin merged commit 1ee16f9 into master Mar 25, 2022
@kevinslin kevinslin deleted the fix/backlinks-missing-preview branch March 25, 2022 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants