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

[WIP][IN-98][Preprints] Submission form #608

Conversation

laurenbarker
Copy link
Contributor

@laurenbarker laurenbarker commented Aug 3, 2018

Related Ember-OSF PR: CenterForOpenScience/ember-osf#409
Based on #593
Mockups https://marvelapp.com/6jia421/screen/45305497
Backend PR: CenterForOpenScience/osf.io#8422

TODO

Misc

  • reenable the hasDirtyFields check which shows the warning model if a user navigates away before submission
  • DRY up the edit/submit controller
  • create preprint on save
  • make sure branded css still works on submit & edit pages
  • fix eslint errors
  • fix tests

Select a service section

  • if the user changes the provider after making other changes should probably warn them that the license and subjects will be reset

Upload section

  • fix the mess that is the existing components
  • be able to upload a file from computer
  • be able to upload a file from an existing project

Authors section

  • update the existing component so that it doesn't save immediately
  • add the current user as an author by default on submit controller

Discipline section

  • possibly show loading indicator when subjects are loading

Supplemental files

  • be able to create a new project with title and file
  • be able to select an existing project (can use the same project picker that is used for the upload section)

Purpose

Changes for the node/preprint divorce submission form changes.

Summary of Changes/Side Effects

  • switch the save icons to checks and Xs to show validation
  • upgraded ember-collapsible-panel and removed the modified component we were using in favor of vanilla ember-collapsible-panel
  • replaced jquery-tags-input with ember-tag-input
  • switched the basics section from bootstrap to flexbox layout
  • moved components only used in Preprints from ember-osf to ember-osf-preprints
  • separated the edit controller from the submit controller because it made it easier to think about -- these should be DRY'd up when done

Testing Notes

This ticket will need to be expanded on.

Ticket

https://openscience.atlassian.net/browse/IN-98

Notes for Reviewer

A lot of the things I did could be improved upon -- just depends how much work you want to put into the refactor.

My main goal, and why I ended up touching so many files, was for the logic to be simple enough to fix bugs. The way it was before would have made it very difficult to fix if anything went wrong. It is also easier to fix bugs/hotfix issues when the components live in the same repository which is why I moved them from ember-osf to preprints (also so we can kill ember-osf ASAP).

The "preview" components don't need to exist as they are only templates that are used in one file. It was just easier to keep them separate when I was moving the preview stuff out of the header component.

Reviewer Checklist

  • meets requirements
  • easy to understand
  • DRY
  • testable and includes test(s)
  • changes described in CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants