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

Repository Config list page #19039

Merged
merged 17 commits into from
Nov 14, 2023
Merged

Repository Config list page #19039

merged 17 commits into from
Nov 14, 2023

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Nov 8, 2023

Description

Updates the Repository Configuration list page to implement the latest designs. There's still some work to do, but wanted to get this as a first milestone to keep the PR from growing too big. Most of the look and feel are here, and basic functionality of searching/paging should work as well. There are some details around loading indicators, and pagination related state that I plan on addressing in the next round of this UI.

Header Header Header
image image image

Things that aren't accounted for yet but will be in followups. I've called them out in comments in the code, but for summary:

  • Need the prebuild status filter
  • Ability to change rows per page (it's set to 5 now to ease development).
  • Search input is missing some details (icon, proper search input type). I plan on pulling this into podkit and formalizing it a bit from our current TextInput component.
  • Import modal needs attention and swapping to use new grpc api
  • Pagination/Search state handling (need to update api response to include some more pagination details and need to shift state into query params instead of component state).
Summary generated by Copilot

🤖 Generated by Copilot at 09d9d9e

Fixed pagination bug in getProjects method of ConfigurationServiceAPI. This method lists the user's projects in the dashboard.

Related Issue(s)

Fixes EXP-876

How to test

  • Import at least 6 repositories (so you have some paging)
  • Play with paging a bit (there are some edge cases I need to address still but happy path should work)
  • Make sure dark mode & light mode look right w/ the Table components

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

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

I look at service side look good to me, i did not look at frontend code or tested it. cc @filiptronicek could you do it please?

@filiptronicek filiptronicek mentioned this pull request Nov 10, 2023
14 tasks
@selfcontained selfcontained marked this pull request as draft November 13, 2023 15:34
@selfcontained selfcontained changed the title Fixing pagination logic Repository Config list page Nov 13, 2023
<thead className="[&_th]:p-3 [&_th]:bg-gray-100 [&_th:first-child]:rounded-tl-md [&_th:last-child]:rounded-tr-md text-semibold">
<tr className="border-b">
<th className="w-48">Name</th>
<th className="hidden md:table-cell">Repository URL</th>
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can strip the "URL" part, as the value we're showing is not really a URL? In the context of this page, "Repository" seems self-explanatory and fine.

@@ -31,25 +59,80 @@ const RepositoryListPage: FC = () => {

return (
Copy link
Member

Choose a reason for hiding this comment

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

There are some parts which dark mode does not like very much - notably the table header and the row separators.

image

@roboquat roboquat added size/XXL and removed size/XL labels Nov 13, 2023
@@ -37,3 +31,12 @@ export interface ProjectDB extends TransactionalDB<ProjectDB> {
getProjectUsage(projectId: string): Promise<ProjectUsage | undefined>;
updateProjectUsage(projectId: string, usage: Partial<ProjectUsage>): Promise<void>;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lifted these args into an object as the ordering/number of them was getting pretty hairy, especially w/ a couple being optional.

searchTerm: searchOptions.searchTerm || "",
organizationId: searchOptions.organizationId,
});
// TODO: adjust this to not filter entities, but log errors if any are not accessible for current user
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to tackle this in a followup and leave it filtering for now

@selfcontained selfcontained marked this pull request as ready for review November 14, 2023 00:25
@@ -78,9 +78,11 @@ export class ConfigurationServiceAPI implements ServiceImpl<typeof Configuration
}

const limit = req.pagination?.pageSize || 25;
Copy link
Member

Choose a reason for hiding this comment

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

Should we have max page size and return invalid argument if a user requests more?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For sure, I'll add this in a followup, need to do some work around pagination/cursors anyways.

Copy link
Member

Choose a reason for hiding this comment

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

yeah, sorry for the confusion in this area yet, i hope we can settle it today

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is blocking since it is under FF, we can resolve with follow up PR?

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.

Found this to work reliably — nice work! I haven't tested multiple users per org, but because all the repos are currently public, I don't believe that will make a difference. (org invite in case you'd want to last-minute test it yourself :).

Changing orgs behaves as expected and the pagionation as well.

@selfcontained selfcontained force-pushed the brad/exp-876-repositories-list-page branch from d6facf0 to c8558ed Compare November 14, 2023 15:51
@selfcontained
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit eaae6cc into main Nov 14, 2023
12 of 13 checks passed
@roboquat roboquat deleted the brad/exp-876-repositories-list-page branch November 14, 2023 16:49
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.

4 participants