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

Consider merging ProjectList / ProjectsDashboard / Copiloting dashboard #4714

Open
mikerkelly opened this issue Oct 28, 2024 · 1 comment
Open

Comments

@mikerkelly
Copy link
Contributor

mikerkelly commented Oct 28, 2024

There are three views on the staff pages that list projects, with overlapping functionality and duplicated code:

  • ProjectList (site link) is a simple ListView with filters by org and project name, and a link to create an interactive project.
  • Copiloting dashboard (site link) displays a more sophisticated table that lists, sorts, and filters by name, org, co-pilot, project/repo status, workspaces, requests, first/last run, and files released.
    • It excludes non-copilot orgs.
    • It uses get_repos_with_status_and_url to discover repo privacy.
  • ProjectsDashboard (site link) lists, sorts, and filters similarly to Copiloting but does not include project status, repo status (and therefore does not use GitHub) and last run.

All three are intended to help staff locate project pages. Can we merge some or all to streamline the codebase?

Copiloting is the most comprehensive and likely the best candidate to keep. ProjectsDashboard was forked from it, duplicating code and violating DRY principles. ProjectList takes ~50ms to load wheras the dashboard ~8/900ms, perhaps this is acceptable on these rarely used pages. If full unification isn’t possible, could we refactor to share common code? Copiloting and ProjectsDashboard directly share much of the same code. They have some implementation differences but nothing materials and perform basically the same job. Additionally, Copiloting's exclusion of specific orgs could likely be implemented as a filter.

@mikerkelly
Copy link
Contributor Author

According to this Honeycomb trace users have visited /staff/projects (ProjectList) 472 times in the past 60 days, and haven't visited the dashboards at all.

In this Slack message Catherine Stables notes she sometimes uses the dashboards.

According to the commit message that created ProjectsDashboard:

This is ostensibly identical to the copilots dashboard but doesn't
exclude the Datalab or LSHTM orgs. We expect these dashboards to
diverge over time, hence putting them on separate pages.

Perhaps it would be better to have parameterised the copiloting dashboard rather than forking the code.

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

No branches or pull requests

1 participant