-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
softwarefactory-project-zuul
merged 6 commits into
ansible:devel
from
mabashian:outdated-revision
Jun 8, 2021
Merged
Adds ability to refresh project revision on sync'd rows in the project list #10334
softwarefactory-project-zuul
merged 6 commits into
ansible:devel
from
mabashian:outdated-revision
Jun 8, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build succeeded.
|
jakemcdermott
suggested changes
Jun 2, 2021
awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx
Outdated
Show resolved
Hide resolved
stubs added for this on https://github.com/ansible/tower-qa/pull/6393/files |
…is done syncing. Automatically refresh project data on project detail when it's done syncing.
mabashian
force-pushed
the
outdated-revision
branch
from
June 7, 2021 18:07
c3a39ee
to
121db42
Compare
Build succeeded.
|
Build succeeded.
|
jakemcdermott
approved these changes
Jun 7, 2021
akus062381
approved these changes
Jun 8, 2021
There was a problem hiding this 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!
Build succeeded (gate pipeline).
|
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
When a particular row finishes syncing the user should see this in place of the revision:
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:
A few other notes:
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.Here are the identifiers on the various bits:
Note that the identifiers on the project rows have the
id
of the project appended to them for uniqueness.ISSUE TYPE
COMPONENT NAME