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

Adds ability to refresh project revision on sync'd rows in the project list #10334

Merged

Conversation

mabashian
Copy link
Member

SUMMARY

This PR also adds the revision to the project details view as well as handles updating the revision on the project details view when the project is done syncing.

Since the project revision is not included in the websocket payload, when a project is done syncing the displayed revision may be out of date. As such, we wanted to expose that information to the user and give them the ability to "refresh" and fetch the new revision.

Here's what that flow looks like:

project_list_sync

When a particular row finishes syncing the user should see this in place of the revision:

Screen Shot 2021-06-02 at 9 57 10 AM

Clicking on that refresh button goes out and fetches the updated project (and with it the potentially updated revision).

We don't do this automatically on the projects list (and force the user to click on the refresh button) is due to issues we've had in the past with the UI triggering API calls based on websocket events.

The flow when a user is on the project details view is a little different because I wasn't as worried about spamming the API with requests.

When a project finishes syncing and the user is viewing the details I do go ahead and automatically refresh the project data (and with it, the revision). Here's what that looks like:

project_detail_sync

A few other notes:

  1. @tiagodread @akus062381 @one-t I'm almost certain this is going to break some tests because I removed the ClipboardCopyButton in favor of PF's ClipboardCopy component. This component looks and behaves slightly differently from our home grown solution. Additionally, the PF ClipboardCopy button does not expose the ouiaId prop so I had to add a data-cy on that component. You'll likely have to use that identifier to then grab the button inside in order to test out the clipboard copy functionality.
  2. Source Control Revision is a net-new detail in the project details. I think this was simply missed on our initial build of this page.

Here are the identifiers on the various bits:

Screen Shot 2021-06-02 at 10 10 24 AM

Screen Shot 2021-06-02 at 10 11 21 AM

Screen Shot 2021-06-02 at 10 10 48 AM

Note that the identifiers on the project rows have the id of the project appended to them for uniqueness.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • UI

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@akus062381
Copy link
Member

stubs added for this on https://github.com/ansible/tower-qa/pull/6393/files

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@akus062381 akus062381 left a comment

Choose a reason for hiding this comment

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

@mabashian I manually tested this, all is working as expected. good to merge!

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

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