-
Notifications
You must be signed in to change notification settings - Fork 56
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-6813] FE PR for Preprints DOI Versioning #2447
Conversation
- Ticket: [ENG-6447] - Feature flag: n/a ## Purpose - Update the Preprint model to add new version-specific fields ## Summary of Changes - Add new `preprintVersion` and `isLatestVersion` attrs to Preprint - Add new `versions` relationship to Preprint - This won't be returned from the API, but the preprint response should have a `preprint_version` URL that can be used to get versions, hence the chicanery with the preprint-serializer - Add new mirage view to handle fetching versions - Add new trait to preprint factory to quickly create versions for a given preprint
- Ticket: [ENG-6448] - Feature flag: n/a ## Purpose - Update preprint-doi component to handle versions ## Summary of Changes - Update Preprints::PreprintDoi component - Takes an array of versions, rather than a single preprint - Add dropdown to select a specific version - Tests
) - Ticket: [ENG-6434] - Feature flag: n/a ## Purpose - Add logic to show/hide the file upload step on the preprint submission/edit workflow ## Summary of Changes - Add a new flag `displayFileUploadStep` that controls whether or not the file upload step is shown - Should be shown for initial preprint submission - Should be shown for rejected preprint re-submission
…#2423) - Ticket: [ENG-6459] [ENG-6637] [ENG-6638] - Feature flag: n/a ## Purpose - Add a new "Create new version" button to the preprint detail page ## Summary of Changes - Add a new `canCreateNewVersion` attr to preprint model - Only admins can create a new version - Only preprints that is the latest version can create a new version - Only preprints that are were published at some point (whether they are withdrawn or not, doesn't matter) - Update tombstone page for preprint versions
- Ticket: [ENG-6460] [ENG-6640] - Feature flag: n/a ## Purpose - Add a new workflow to create a new preprint version ## Summary of Changes - Add a new `preprint.new-version` route - Add a new `newVersion` argument to the submission-flow component - Invoke `submission-flow` component in the new-version route
- Ticket: [ENG-6470] - Feature flag: n/a ## Purpose - Add a version select dropdown to the tombstone page ## Summary of Changes - Add dropdown to tombstone page header to view prior versions - Update tests
Pull Request Test Coverage Report for Build 12916217179Details
💛 - Coveralls |
- Ticket: [ENG-6471] - Feature flag: n/a ## Purpose - Add version statuses for pending, rejected, and withdrawn versions ## Summary of Changes - Add version status to Version DOI selector - Add version status to Withdrawn page's version selector dropdown
- Ticket: [ENG-6803] - Feature flag: n/a ## Purpose - Indicate currently viewed version in the preprint DOI selection dropdown ## Summary of Changes - Add a `currentVersion` param to the preprint-doi component - Have this version be the selected one by default - Add bold font style to current version
- Ticket: [ENG-6804] - Feature flag: n/a ## Purpose - Add a link to the version when selecting a different version in the DOI selection dropdown ## Summary of Changes - Add link to preprint DOI dropdown - Update tests
- Ticket: [ENG-6814] - Feature flag: n/a ## Purpose - Show helpful toast message if the request to create a new version returns a 409 error ## Summary of Changes - Fix logic for how to display toast error - Update template so the "Create new version" button is disabled when the task is running - Update page-not-found reroute logic to be more robust
- Ticket: [ENG-6815] [ENG-6843] - Feature flag: n/a ## Purpose - Fix issues of "Edit" and "Edit and Resubmit" button showing up at inappropriate preprint states ## Summary of Changes - Update condition to show Edit button - Only read-write and admin contributors should be able to edit - Only latest version should be editable - Non-initial, rejected (pre-mod) versions should not be editable
- Ticket: [ENG-6822] [ENG-6871] - Feature flag: n/a ## Purpose - Fix an issue where the preprint status banner doesn't update when selecting a different version ## Summary of Changes - Refactor status banner component to use arguments instead of a cached arg reference
- Ticket: [ENG-6461] [ENG-6462] - Feature flag: n/a ## Purpose - Move "Withdraw" button out of the edit workflow and onto preprint detail page ## Summary of Changes - Move the "Withdraw" button out of the `ActionFlow` component and onto the detail page - Move logic for fetching preprint/withdraw-request state out of the `ActionFlow` component and into route's `model` hook - Move `onWithdrawal` callback to detail controller - Refactor `withdraw-preprint` component to take multiple arguments instead of relying on a manager component
- Ticket: [ENG-6931] - Feature flag: n/a ## Purpose - Update the file version shown in mfr window when changing preprint versions ## Summary of Changes - Don't use cached preprint or file-version in file renderer component
- Ticket: [ENG-6950](https://openscience.atlassian.net/browse/ENG-6950) - Feature flag: n/a ## Purpose - Add versioning language to withdraw modal ## Summary of Changes - Add new translation
…2482) - Ticket: [] - Feature flag: n/a ## Purpose - Fix bug which prevented users from seeing moderator feedback ## Summary of Changes - Decouple fetching the latest review-action to preprint-state - Allow all preprint contributors to see moderator feedback
…nt requests (#2485) * Reimplement bug fix, but this time better (maybe) * Fix status banner modal bug
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.
A couple of minor things, including some commented-out code with a TODO and some potentially unused services, plus one post-release BE change that would affect the FE.
app/preprints/-components/submit/preprint-state-machine/component.ts
Outdated
Show resolved
Hide resolved
import OsfSerializer from './osf-serializer'; | ||
|
||
export default class PreprintSerializer extends OsfSerializer { | ||
normalize(modelClass: Model, resourceHash: Resource) { | ||
const result = super.normalize(modelClass, resourceHash); | ||
// Insert a `versions` relationship to the model |
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.
I did not realize we weren't serializing this on the back end. Ick. Not blocking, but I'm not super-happy about it.
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.
Yea, I recall there was some oddity (potential self-reference/recursiveness) that prevented us from serializing it in the backend?
And it looks like we want to merge develop into here at some point soon. |
Purpose
Summary of Changes
Screenshot(s)
N/A
Side Effects
N/A
QA Notes
N/A