EnixCoda/Gitako

Enhance jump-to-file experience in PR

EnixCoda opened this issue · 2 comments

Clicking on PR file items only triggers a whole-page reload instead of scrolling to the corresponding file.

It can be fixed by removing data-turbo-frame="repo-content-turbo-frame" from the file items.

Partially fixed in v3.8.0

Now jump to file is not very stable, it could add dup records to browser history, user would have to go back for more times than expected

Example steps:

  1. open a PR, e.g. #197
  2. Go to files page via Gitako sidebar
  3. Click another file item in GItako sidebar, page focus should be update to the new item
  4. Navigate back (e.g. via browser back button)
  5. Browser's address bar would become https://github.com/EnixCoda/Gitako/pull/197/files, which has no hash appended