Original Route Design

Header view:

  • Inluded in all routes
  • Has a hyperlink to /list-patches route
  • Has a hyperlink to root directory of repo

Routes:

  • /
    • Selected Values:
      • branch: current
      • path: /
  • /path/:path
    • Selected Values:
      • branch: current
      • path
  • /branch/:branch_name
    • Selected Values:
      • branch_name
      • path: /
  • /branch/:branch_name/:path
    • Selected Values:
      • branch_name
      • path

Directory View:

  • Shows read dir view of current directory
  • Displays the markdown view for the README.md file in the current directory

File view:

  • Shows the name of the current file
  • Shows information about the file, such as file permissions?
  • If markdown filetype, shows the markdown view of the file
    • This view can be toggled to the source code view without changing routes
  • If not markdown, shows the source code view of the current file

Read dir view:

  • Can be in diff-mode
  • Shows the name of each entry
  • Shows the record message of the last patch on that entry as a hyperlink, along with the date of the patch
    • The hyperlink leads to the /patch/:patch/:path route for that entry on the latest patch

Markdown view:

  • Shows the parsed markdown file

Source code view:

  • Can be in diff-mode
  • Shows the source code of the current file

Subheader view:

  • Only available for above routes
  • Has a drop-down of branches this path exists within
  • Has a drop-down of patches that affected this path

Handling the current state of the repo (only possible from the above routes):

  • If the current state of the repo differs from the latest patch of the selected branch:

    • Show in diff-mode, similar to route /patch/:patch/:path. Showing the differences between the current state and the latest patch of the selected branch (if any).
      • The only difference between this and the /patch/:patch/:path route is the need to include and mark untracked files.
  • If the current state of the repo does not differ from the latest patch of the selected branch, don't show any differences and show the latest patch.

  • /patch/:patch

    • Links to /patch/:patch/:path routes
    • Values:
      • patch
  • /patch/:patch/:path

    • Has a drop-down of patches that affected this path
    • Values:
      • patch
      • path

Patch subheader view:

  • For two above routes

  • Record message

  • Author

  • Date

  • Branches this patch exists within

  • /list-patches

  • Links to /patch/:patch routes

  • Record message

  • Author

  • Date