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

Scroll to most recent item when opening a notification #7

Open
sudormrfbin opened this issue Dec 25, 2022 · 1 comment
Open

Scroll to most recent item when opening a notification #7

sudormrfbin opened this issue Dec 25, 2022 · 1 comment
Labels
P-medium Priority - Medium

Comments

@sudormrfbin
Copy link
Owner

sudormrfbin commented Dec 25, 2022

Retrievable from the REST notifications API from the latest_comment_url key:

  • https://api.github.com/repos/helix-editor/helix/issues/comments/1303710666 (from API, latest_comment_url)
  • https://github.com/helix-editor/helix/issues/290#issuecomment-1303710666 (from web UI)

Essentially handle permalinks to issue comments. 1303710666 is the databaseId, retrievable from the GraphQL API:

query { 
  repository(owner:"helix-editor", name:"helix") {
    issue(number: 290) {
      comments(after: "Y3Vyc29yOnYyOpHOTAOjmg==", first:1) { # the after string is a cursor; irrelavant to this query
        nodes {
          databaseId
          body
        }
      }
    }
  }
}

Response:

{
  "data": {
    "repository": {
      "issue": {
        "comments": {
          "nodes": [
            {
              "databaseId": 1303710666,
              "body": "I think we're missing the fact that most process crashes aren't due to internal panic but external factors, ie unexpected system shutdown, out-of-memory, some idiot forgetting his laptop is set to automatically log out after an hour of inactivity.\r\n\r\nSo while a panic handler is great, a swap file or operation journal is vital feature."
            }
          ]
        }
      }
    }
  }
}
@sudormrfbin sudormrfbin added P-low Priority - Low P-medium Priority - Medium and removed P-low Priority - Low labels Dec 25, 2022
@sudormrfbin
Copy link
Owner Author

Notifications also have an updated_at field that could be used to find comment to jump to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Priority - Medium
Projects
None yet
Development

No branches or pull requests

1 participant