-
Notifications
You must be signed in to change notification settings - Fork 63
[ENG-2841] Delete Revision In Progress Button #1341
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
[ENG-2841] Delete Revision In Progress Button #1341
Conversation
…ForOpenScience/ember-osf-web into feature/versioning-mirage Merging upstream changes from feature/versioning-mirage.
…r template strings.
app/models/registration.ts
Outdated
| @attr('array') providerSpecificMetadata!: ProviderMetadata[]; | ||
| @attr('fixstring') revisionState!: RevisionReviewStates; | ||
| @attr('fixstring') revisionState?: RevisionReviewStates; | ||
| @attr('object') latestSchemaResponse?: SchemaResponseModel; |
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.
the latestSchemaRespons is not an attribute serialized through the API, therefore defining it here does not do anything.
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.
Ok that make sense, thank you Yuhuai. Would removing and committing those changes affect any other part of the code? I just looked and do not see it on registration.ts so should be good now.
|
|
||
| // Write-only attributes | ||
| @attr('array') includedNodeIds?: string[]; | ||
| @attr('boolean') createDoi?: boolean; |
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.
Why is this included?
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.
This was from the most recent merge commit 5e3f4e9 to resolve conflicts. I believe I was asked to keep it, but should it be removed?
| // Write-only relationships | ||
| @belongsTo('draft-registration', { inverse: null }) | ||
| draftRegistration!: DraftRegistrationModel; | ||
| static reviewsState: string; |
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.
This also doesn't do anything.
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.
Ok, I had removed that for another PR as well. It is now removed here too.
| @action | ||
| delete() { | ||
| this.set('deleteEdit', false); | ||
| const node = this.toDelete; |
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.
Where do we set this.toDelete in the first place?
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.
Hey, after our discussion this morning this a lot more sense. I will wait to discuss with you later before removing this, to make sure the changes are how you envision.
| toDelete: SchemaResponseModel | null; | ||
| deleteEdit = false; | ||
|
|
||
| reloadList?: (page?: number) => void; // bound by paginated-list |
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.
What list are we reloading?
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.
This logic is not complete but was in place for if a list of revision ids were needed, the logic would reload the list and pull the last object of the schema id from the list after the deletion and redirect to its overview page.
… to handlebars file.
…o feature/registries-delete-revision-button
|
Closed in favor of #1348 |
Purpose
The purpose of this change was to enable users to delete revisions in progress.
Summary of Changes
-Added a delete button to the registries-left-nav
-Added logic to the component.ts file to the registries-left-nav file to enable the delete
Screenshot(s)
Side Effects
This change may potentially conflict with other permission or moderations states and should be tested for each of the RegistrationReviewStates and RevisionReviewStates.
QA Notes