Skip to content

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Nov 20, 2023

Description

Implementing sorting for ListConfigurations api and the corresponding UI.

Name and Created headers are sortable.
image

I was hitting a lot of issues trying to keep the headers accessible with proper buttons and the global button styles... so I decided to bite the bullet and remove them, and update all occurrences of <button> to use our component. There were just a couple spots that I chose to inline the old styles to the button class name to avoid changing things too drastically. There are a couple places that were using the danger.secondary style that I just swapped to use the destructive variant.

I did my best to test each change and make sure I didn't break anything. Any additional testing would be helpful as well.

Summary generated by Copilot

🤖[deprecated] Generated by Copilot at c489f42

This pull request adds sorting functionality to the configuration service and the configuration list page, using a common sorting model defined in the new sorting.proto file. It also updates the public API and the dashboard components to support sorting by different fields. It temporarily disables sorting for the repository list page until the repository service supports it.

Related Issue(s)

Fixes EXP-946
Fixes EXP-838

How to test

  • Import a few repos (maybe name them so you can remember what order they were created in)
  • Try sorting from the list page by name and created headers. It should toggle.
  • Try hitting a bunch of the surface areas of the UI as well to see if you notice anything odd with buttons since I migrated away from the global styles.

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
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • 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

@selfcontained selfcontained changed the title Brad/repo-configs-sortable-headers Add sorting to imported repos list and corresponding API Nov 20, 2023
@roboquat roboquat added size/XXL and removed size/M labels Nov 21, 2023
@selfcontained selfcontained marked this pull request as ready for review November 21, 2023 01:40
@selfcontained selfcontained requested a review from a team as a code owner November 21, 2023 01:40
}

message Sort {
string field = 1;
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment here that it is a field name in camel case 🙏

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.

api/server looks good, I did not look at UI, cc @filiptronicek

/hold

Copy link
Member

Choose a reason for hiding this comment

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

🥳

@selfcontained selfcontained force-pushed the brad/repo-configs-sortable-headers branch from 578f71c to 145cb77 Compare November 21, 2023 19:15
@selfcontained
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 73a1c76 into main Nov 21, 2023
@roboquat roboquat deleted the brad/repo-configs-sortable-headers branch November 21, 2023 22:09
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