Skip to content

Setup data loading for repos list #18935

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

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Oct 17, 2023

Description

This sets up basics to load the first page of configured repositories (projects) and lists them w/ links to their respective detail pages. This is all behind a flag still and is meant to enable followup/adjacent work.

This isn't intended to match our design target, just unlock some functionality and get data on the UI.

  • Renamed the current useListProjectsQuery to useListAllProjectsQuery as that's what it was doing.
  • Added a useListProjectsQuery that loads a single page of projects instead.
  • Added a @podkit alias for the src/components/podkit folder
  • Added a cn() helper to assist in merging tailwind classNames (as suggested here in shadcn)
  • Added a <Text> and <TextMuted> component to encapsulate text colors & dark mode (I'm not sure if this is the best way to go about this yet, but wanted to start w/ it).

image

Summary generated by Copilot

🤖 Generated by Copilot at 48f8c15

Added a new query hook and component for listing all projects without pagination, and updated existing components to use either the new or the old query hook depending on the context. This improves the performance and usability of the dashboard for creating and managing projects and their repositories. The affected files are create-project-mutation.ts, project-context.tsx, Projects.tsx, ProjectSettings.tsx, CreateWorkspacePage.tsx, list-all-projects-query.ts, list-projects-query.ts, and RepositoryList.tsx.

Related Issue(s)

Fixes EXP-795 & EXP-802 & EXP-796

How to test

  • Create at least one project on the preview env.
  • Manually visit /repositories and verify your project you created is listed.
  • Click the View link and verify it links to the corresponding detail page, /repositories/:id (data not loaded there yet, verify url)

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@roboquat roboquat added size/XL and removed size/L labels Oct 17, 2023
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
tailwind-merge 1.14.0 environment +0 765 kB dcas

@selfcontained selfcontained marked this pull request as ready for review October 17, 2023 17:17
@selfcontained selfcontained requested a review from a team as a code owner October 17, 2023 17:17
Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

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

Looks great!

Love the @podkit alias and the old Projects page seems to still work as expected. Thank you

project: Project;
};
export const RepositoryListItem: FC<Props> = ({ project }) => {
const url = usePrettyRepoURL(project.cloneUrl);
Copy link
Member

Choose a reason for hiding this comment

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

We could potentially change this to omit the scheme in the future, as I don't think it makes much of a difference with all of them being http/https.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, I'll def do that in a followup, mostly an oversight 😄

@selfcontained
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 436375f into main Oct 17, 2023
@roboquat roboquat deleted the brad/exp-797-list-repo-configs branch October 17, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants